Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Unified Diff: pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart

Issue 920703002: cps2js: Clean up some obsolete TODOs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
index d1f51fcadabcd01738f0f0f8957c1e78c8f09fc7..f1d56163157da376b22d540653a20edb6d686c7e 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
@@ -454,7 +454,8 @@ class SetMutableVariable extends Expression implements InteriorNode {
///
/// let rec [variable] = [definition] in [body]
///
-class DeclareFunction extends Expression implements InteriorNode {
+class DeclareFunction extends Expression
+ implements InteriorNode, DartSpecificNode {
final MutableVariable variable;
final FunctionDefinition definition;
Expression body;
@@ -528,9 +529,12 @@ class Branch extends Expression {
/// Marker interface for nodes that are only handled in the JavaScript backend.
///
-/// These nodes are generated by the unsugar step and need special translation
-/// to the Tree IR, which is implemented in JsTreeBuilder.
-abstract class JsSpecificNode {}
+/// These nodes are generated by the unsugar step or the [JsIrBuilder] and need
+/// special translation to the Tree IR, which is implemented in JsTreeBuilder.
+abstract class JsSpecificNode implements Node {}
+
+/// Marker interface for nodes that are only handled inthe Dart backend.
+abstract class DartSpecificNode implements Node {}
/// Directly assigns to a field on a given object.
class SetField extends Expression implements InteriorNode, JsSpecificNode {
@@ -656,7 +660,7 @@ class LiteralMap extends Primitive {
}
/// Create a non-recursive function.
-class CreateFunction extends Primitive {
+class CreateFunction extends Primitive implements DartSpecificNode {
final FunctionDefinition definition;
CreateFunction(this.definition);
@@ -795,7 +799,7 @@ class FunctionDefinition extends Node
bool get isAbstract => body == null;
}
-abstract class Initializer extends Node {}
+abstract class Initializer extends Node implements DartSpecificNode {}
class FieldInitializer extends Initializer {
final FieldElement element;

Powered by Google App Engine
This is Rietveld 408576698