JS/Inlining: minor code style fixes

This commit is contained in:
Alexey Andreev
2016-05-06 15:00:26 +03:00
parent 4783c9b612
commit 5fdf7cbac9
4 changed files with 6 additions and 6 deletions
@@ -147,7 +147,7 @@ internal class ExpressionDecomposer private constructor(
val tmp = Temporary(arg1)
addStatement(tmp.variable)
var test = if (operator == JsBinaryOperator.OR) not(tmp.nameRef) else tmp.nameRef
val test = if (operator == JsBinaryOperator.OR) not(tmp.nameRef) else tmp.nameRef
val arg2Eval = withNewAdditionalStatements {
arg2 = accept(arg2)
addStatement(tmp.assign(arg2))
@@ -260,7 +260,7 @@ internal class ExpressionDecomposer private constructor(
private fun Callable.process() {
qualifier = accept(qualifier)
var matchedIndices = arguments.indicesOfExtractable
val matchedIndices = arguments.indicesOfExtractable
if (!matchedIndices.hasNext()) return
if (qualifier in containsNodeWithSideEffect) {
@@ -43,7 +43,7 @@ import static org.jetbrains.kotlin.js.translate.utils.JsAstUtils.flattenStatemen
public class JsInliner extends JsVisitorWithContextImpl {
private final IdentityHashMap<JsName, JsFunction> functions;
private final Map<JsName, JsFunction> functions;
private final Stack<JsInliningContext> inliningContexts = new Stack<JsInliningContext>();
private final Set<JsFunction> processedFunctions = CollectionUtilsKt.IdentitySet();
private final Set<JsFunction> inProcessFunctions = CollectionUtilsKt.IdentitySet();
@@ -73,7 +73,7 @@ public class JsInliner extends JsVisitorWithContextImpl {
}
private JsInliner(
@NotNull IdentityHashMap<JsName, JsFunction> functions,
@NotNull Map<JsName, JsFunction> functions,
@NotNull FunctionReader functionReader,
@NotNull DiagnosticSink trace
) {
@@ -30,7 +30,7 @@ internal class ReferenceTracker<in Reference, RemoveCandidate : JsNode> {
get() {
return reachable
.filter { !it.value }
.map { removableCandidates.get(it.key)!! }
.map { removableCandidates[it.key]!! }
}
fun addCandidateForRemoval(reference: Reference, candidate: RemoveCandidate) {
@@ -214,7 +214,7 @@ internal class TemporaryAssignmentElimination(private val root: JsBlock) {
hasChanges = true
ctx.replaceMe(replacement)
statementsToRemove += usageHolder.collectStatements()
return false;
return false
}
}
return super.visit(x, ctx)