Index: pkg/compiler/lib/src/js_backend/codegen/codegen.dart |
diff --git a/pkg/compiler/lib/src/js_backend/codegen/codegen.dart b/pkg/compiler/lib/src/js_backend/codegen/codegen.dart |
index 7042defa0147a93247b1c3aa7e22891a46c4a5e2..d7453dbf44427ebe325ca5bd2e62d4ffeb7dfa05 100644 |
--- a/pkg/compiler/lib/src/js_backend/codegen/codegen.dart |
+++ b/pkg/compiler/lib/src/js_backend/codegen/codegen.dart |
@@ -593,6 +593,16 @@ class CodeGenerator extends tree_ir.StatementVisitor |
} |
@override |
+ js.Expression visitInterceptor(tree_ir.Interceptor node) { |
+ glue.registerUseInterceptorInCodegen(); |
+ registry.registerSpecializedGetInterceptor(node.interceptedClasses); |
+ String helperName = glue.getInterceptorName(node.interceptedClasses); |
+ js.Expression globalHolder = glue.getInterceptorLibrary(); |
+ return js.js('#.#(#)', |
+ [globalHolder, helperName, visitExpression(node.input)]); |
+ } |
+ |
+ @override |
js.Expression visitGetField(tree_ir.GetField node) { |
return new js.PropertyAccess.field( |
visitExpression(node.object), |
@@ -717,6 +727,9 @@ class CodeGenerator extends tree_ir.StatementVisitor |
case BuiltinOperator.StringConcatenate: |
if (args.isEmpty) return js.string(''); |
return args.reduce((e1,e2) => new js.Binary('+', e1, e2)); |
+ case BuiltinOperator.Identical: |
+ registry.registerStaticInvocation(glue.identicalFunction); |
+ return buildStaticHelperInvocation(glue.identicalFunction, args); |
case BuiltinOperator.StrictEq: |
return new js.Binary('===', args[0], args[1]); |
case BuiltinOperator.StrictNeq: |