JS backend: add NotNull annotations
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
package com.google.dart.compiler.backend.js.ast;
|
package com.google.dart.compiler.backend.js.ast;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
public class ChameleonJsExpression implements JsExpression {
|
public class ChameleonJsExpression implements JsExpression {
|
||||||
private JsExpression expression;
|
private JsExpression expression;
|
||||||
|
|
||||||
@@ -20,6 +22,7 @@ public class ChameleonJsExpression implements JsExpression {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@NotNull
|
||||||
public JsStatement makeStmt() {
|
public JsStatement makeStmt() {
|
||||||
return expression.makeStmt();
|
return expression.makeStmt();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
package com.google.dart.compiler.backend.js.ast;
|
package com.google.dart.compiler.backend.js.ast;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
public interface JsExpression extends JsNode {
|
public interface JsExpression extends JsNode {
|
||||||
boolean isLeaf();
|
boolean isLeaf();
|
||||||
|
|
||||||
|
@NotNull
|
||||||
JsStatement makeStmt();
|
JsStatement makeStmt();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
package com.google.dart.compiler.backend.js.ast;
|
package com.google.dart.compiler.backend.js.ast;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
abstract class JsExpressionImpl extends SourceInfoAwareJsNode implements JsExpression {
|
abstract class JsExpressionImpl extends SourceInfoAwareJsNode implements JsExpression {
|
||||||
@@ -20,6 +22,7 @@ abstract class JsExpressionImpl extends SourceInfoAwareJsNode implements JsExpre
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@NotNull
|
||||||
public JsStatement makeStmt() {
|
public JsStatement makeStmt() {
|
||||||
return new JsExpressionStatement(this);
|
return new JsExpressionStatement(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import static com.google.dart.compiler.backend.js.ast.JsNumberLiteral.JsIntLiter
|
|||||||
* A JavaScript program.
|
* A JavaScript program.
|
||||||
*/
|
*/
|
||||||
public final class JsProgram extends SourceInfoAwareJsNode {
|
public final class JsProgram extends SourceInfoAwareJsNode {
|
||||||
|
@NotNull
|
||||||
private final JsEmpty emptyStatement;
|
private final JsEmpty emptyStatement;
|
||||||
|
|
||||||
private JsProgramFragment[] fragments;
|
private JsProgramFragment[] fragments;
|
||||||
@@ -37,6 +38,7 @@ public final class JsProgram extends SourceInfoAwareJsNode {
|
|||||||
emptyStatement = new JsEmpty();
|
emptyStatement = new JsEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
public JsEmpty getEmptyStatement() {
|
public JsEmpty getEmptyStatement() {
|
||||||
return emptyStatement;
|
return emptyStatement;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user