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

Unified Diff: pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart

Issue 954253002: dart2js: add compiler builtins to the core-runtime. (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/inferrer/simple_types_inferrer.dart
diff --git a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
index 020b81bfad39727fdcdaaf139e4eeae99c5de96d..3341474cb6f9e363e9b7de428b7ec8e71887a056 100644
--- a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
@@ -1088,10 +1088,16 @@ class SimpleTypeInferrerVisitor<T>
Selector selector = elements.getSelector(node);
String name = selector.name;
handleStaticSend(node, selector, elements[node], arguments);
- if (name == 'JS' || name == 'JS_EMBEDDED_GLOBAL') {
+ if (name == 'JS' || name == 'JS_EMBEDDED_GLOBAL' ||
+ name == 'JS_COMPILER_MACRO') {
native.NativeBehavior nativeBehavior =
compiler.enqueuer.resolution.nativeEnqueuer.getNativeBehaviorOf(node);
- sideEffects.add(nativeBehavior.sideEffects);
+ if (name == 'JS_COMPILER_MACRO') {
+ // TODO(floitsch): this shouldn't be necessary.
+ sideEffects.setAllSideEffects();
+ } else {
+ sideEffects.add(nativeBehavior.sideEffects);
+ }
return inferrer.typeOfNativeBehavior(nativeBehavior);
} else if (name == 'JS_GET_NAME'
|| name == 'JS_NULL_CLASS_NAME'

Powered by Google App Engine
This is Rietveld 408576698