Index: pkg/compiler/lib/src/native/enqueue.dart |
diff --git a/pkg/compiler/lib/src/native/enqueue.dart b/pkg/compiler/lib/src/native/enqueue.dart |
index a7c7af93565c8b2a6a2d561e566748be15049e51..7d698b65f489d168b40cfe942e79d3d48d5b20aa 100644 |
--- a/pkg/compiler/lib/src/native/enqueue.dart |
+++ b/pkg/compiler/lib/src/native/enqueue.dart |
@@ -54,6 +54,18 @@ class NativeEnqueuer { |
// TODO(sra): The entry from codegen will not have a resolver. |
void registerJsEmbeddedGlobalCall(Send node, ResolverVisitor resolver) {} |
+ /** |
+ * Handles JS-compiler builtin calls, which can be an instantiation point for |
+ * types. |
+ * |
+ * For example, the following code instantiates and returns a String class |
+ * |
+ * JS_BUILTIN('String', 'int2string', 0) |
+ * |
+ */ |
+ // TODO(sra): The entry from codegen will not have a resolver. |
+ void registerJsBuiltinCall(Send node, ResolverVisitor resolver) {} |
+ |
/// Emits a summary information using the [log] function. |
void logSummary(log(message)) {} |
@@ -492,6 +504,14 @@ abstract class NativeEnqueuerBase implements NativeEnqueuer { |
flushQueue(); |
} |
+ void registerJsBuiltinCall(Send node, ResolverVisitor resolver) { |
+ NativeBehavior behavior = |
+ NativeBehavior.ofJsBuiltinCall(node, compiler, resolver); |
+ processNativeBehavior(behavior, node); |
+ nativeBehaviors[node] = behavior; |
+ flushQueue(); |
+ } |
+ |
NativeBehavior getNativeBehaviorOf(Send node) => nativeBehaviors[node]; |
processNativeBehavior(NativeBehavior behavior, cause) { |