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

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

Issue 795933005: Create a Tree IR builder for JavaScript specific nodes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Move identicalFunction. Created 6 years 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/dart_backend/backend.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f6ca56bfc34076969630ddc08aaab9893b253706..ffc975a87b12dc758986537ea24de4ac2c6e1e04 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,13 @@ class Branch extends Expression {
accept(Visitor visitor) => visitor.visitBranch(this);
}
-class Identical extends Primitive {
+/// 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 {}
+
+class Identical extends Primitive implements JsSpecificNode {
final Reference<Primitive> left;
final Reference<Primitive> right;
Identical(Primitive left, Primitive right)
@@ -463,7 +469,7 @@ class Identical extends Primitive {
accept(Visitor visitor) => visitor.visitIdentical(this);
}
-class Interceptor extends Primitive {
+class Interceptor extends Primitive implements JsSpecificNode {
final Reference<Primitive> input;
final Set<ClassElement> interceptedClasses;
Interceptor(Primitive input, this.interceptedClasses)
« no previous file with comments | « no previous file | pkg/compiler/lib/src/dart_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698