diff --git a/src/com/google/dart/compiler/backend/js/JsRequiresSemiVisitor.java b/src/com/google/dart/compiler/backend/js/JsRequiresSemiVisitor.java
index 229dedc5417..b2205d3160b 100644
--- a/src/com/google/dart/compiler/backend/js/JsRequiresSemiVisitor.java
+++ b/src/com/google/dart/compiler/backend/js/JsRequiresSemiVisitor.java
@@ -100,7 +100,7 @@ public class JsRequiresSemiVisitor extends JsVisitor {
@Override
public boolean visit(JsLabel x, JsContext ctx) {
- if (x.getStmt() instanceof JsEmpty) {
+ if (x.getStatement() instanceof JsEmpty) {
needsSemicolon = true;
}
return false;
diff --git a/src/com/google/dart/compiler/backend/js/JsToStringGenerationVisitor.java b/src/com/google/dart/compiler/backend/js/JsToStringGenerationVisitor.java
index 85b1ae6f09c..6476775a129 100644
--- a/src/com/google/dart/compiler/backend/js/JsToStringGenerationVisitor.java
+++ b/src/com/google/dart/compiler/backend/js/JsToStringGenerationVisitor.java
@@ -312,10 +312,10 @@ public class JsToStringGenerationVisitor extends JsVisitor {
}
private void continueOrBreakLabel(JsContinue x) {
- JsNameRef label = x.getLabel();
+ String label = x.getLabel();
if (label != null) {
space();
- _nameRef(label);
+ p.print(label);
}
}
@@ -475,8 +475,8 @@ public class JsToStringGenerationVisitor extends JsVisitor {
// The init expressions or var decl.
//
- if (x.getInitExpr() != null) {
- accept(x.getInitExpr());
+ if (x.getInitExpression() != null) {
+ accept(x.getInitExpression());
}
else if (x.getInitVars() != null) {
accept(x.getInitVars());
@@ -495,9 +495,9 @@ public class JsToStringGenerationVisitor extends JsVisitor {
// The incr expression.
//
- if (x.getIncrExpr() != null) {
+ if (x.getIncrementExpression() != null) {
spaceOpt();
- accept(x.getIncrExpr());
+ accept(x.getIncrementExpression());
}
rightParen();
@@ -619,7 +619,7 @@ public class JsToStringGenerationVisitor extends JsVisitor {
nameOf(x);
_colon();
spaceOpt();
- accept(x.getStmt());
+ accept(x.getStatement());
return false;
}
diff --git a/src/com/google/dart/compiler/backend/js/ast/JsBreak.java b/src/com/google/dart/compiler/backend/js/ast/JsBreak.java
index 3360bcb7b2f..50a23c051e2 100644
--- a/src/com/google/dart/compiler/backend/js/ast/JsBreak.java
+++ b/src/com/google/dart/compiler/backend/js/ast/JsBreak.java
@@ -12,7 +12,7 @@ public final class JsBreak extends JsContinue {
super(null);
}
- public JsBreak(JsNameRef label) {
+ public JsBreak(String label) {
super(label);
}
@@ -23,11 +23,7 @@ public final class JsBreak extends JsContinue {
@Override
public void traverse(JsVisitor v, JsContext context) {
- if (v.visit(this, context)) {
- if (label != null) {
- v.accept(label);
- }
- }
+ v.visit(this, context);
v.endVisit(this, context);
}
}
diff --git a/src/com/google/dart/compiler/backend/js/ast/JsContinue.java b/src/com/google/dart/compiler/backend/js/ast/JsContinue.java
index 65e88f25932..dcec38018f7 100644
--- a/src/com/google/dart/compiler/backend/js/ast/JsContinue.java
+++ b/src/com/google/dart/compiler/backend/js/ast/JsContinue.java
@@ -10,28 +10,24 @@ import org.jetbrains.annotations.Nullable;
* Represents the JavaScript continue statement.
*/
public class JsContinue extends JsNodeImpl implements JsStatement {
- protected final JsNameRef label;
+ protected final String label;
public JsContinue() {
this(null);
}
- public JsContinue(@Nullable JsNameRef label) {
+ public JsContinue(@Nullable String label) {
super();
this.label = label;
}
- public JsNameRef getLabel() {
+ public String getLabel() {
return label;
}
@Override
public void traverse(JsVisitor v, JsContext context) {
- if (v.visit(this, context)) {
- if (label != null) {
- v.accept(label);
- }
- }
+ v.visit(this, context);
v.endVisit(this, context);
}
diff --git a/src/com/google/dart/compiler/backend/js/ast/JsFor.java b/src/com/google/dart/compiler/backend/js/ast/JsFor.java
index 4efb65d93c8..fe6b4ad3ca5 100644
--- a/src/com/google/dart/compiler/backend/js/ast/JsFor.java
+++ b/src/com/google/dart/compiler/backend/js/ast/JsFor.java
@@ -8,7 +8,7 @@ package com.google.dart.compiler.backend.js.ast;
* A for statement. If specified at all, the initializer part is
* either a declaration of one or more variables, in which case
* {@link #getInitVars()} is used, or an expression, in which case
- * {@link #getInitExpr()} is used. In the latter case, the comma operator is
+ * {@link #getInitExpression()} is used. In the latter case, the comma operator is
* often used to create a compound expression.
*