JS/Inlining: rename IneffectiveStatementElimination to RedundantStatementElimination

This commit is contained in:
Alexey Andreev
2016-06-06 12:42:39 +03:00
parent 07d5a4506c
commit f0e64f8e38
13 changed files with 3 additions and 3 deletions
@@ -26,7 +26,7 @@ class FunctionPostProcessor(root: JsFunction) {
{ IfStatementReduction(root.body).apply() },
{ DeadCodeElimination(root.body).apply() },
{ RedundantVariableDeclarationElimination(root.body).apply() },
{ IneffectiveStatementElimination(root).apply() }
{ RedundantStatementElimination(root).apply() }
)
// TODO: reduce to A || B, A && B if possible
@@ -23,7 +23,7 @@ import com.google.dart.compiler.backend.js.ast.metadata.synthetic
import org.jetbrains.kotlin.js.inline.util.collectLocalVariables
import org.jetbrains.kotlin.js.translate.utils.JsAstUtils
class IneffectiveStatementElimination(private val root: JsFunction) {
class RedundantStatementElimination(private val root: JsFunction) {
private val localVars = root.collectLocalVariables()
private var hasChanges = false
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.js.test.optimizer
import org.junit.Test
class IneffectiveStatementEliminationTest() : BasicOptimizerTest("ineffective-statement-elimination") {
class RedundantStatementEliminationTest() : BasicOptimizerTest("redundant-statement-elimination") {
@Test fun binary() = box()
@Test fun unary() = box()