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

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

Issue 2467493003: Compute NativeBehavior for native methods and fields. (Closed)
Patch Set: Updated cf. comments Created 4 years, 1 month 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 | « pkg/compiler/lib/src/inferrer/map_tracer.dart ('k') | pkg/compiler/lib/src/kernel/constant_visitor.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0e95ce5288f8e928b41202ec67a6b00b2bf9d23c..f2f8e0b9685214dca46c156e2d157f5fb6326bbf 100644
--- a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
@@ -12,6 +12,7 @@ import '../constants/values.dart' show ConstantValue, IntConstantValue;
import '../core_types.dart' show CoreClasses, CoreTypes;
import '../dart_types.dart' show DartType;
import '../elements/elements.dart';
+import '../js_backend/backend_helpers.dart';
import '../js_backend/js_backend.dart' as js;
import '../native/native.dart' as native;
import '../resolution/operators.dart' as op;
@@ -1839,7 +1840,9 @@ class SimpleTypeInferrerVisitor<T>
TypeMask mask = elements.getTypeMask(node);
String name = element.name;
handleStaticSend(node, selector, mask, element, arguments);
- if (name == 'JS' || name == 'JS_EMBEDDED_GLOBAL' || name == 'JS_BUILTIN') {
+ if (name == BackendHelpers.JS ||
+ name == BackendHelpers.JS_EMBEDDED_GLOBAL ||
+ name == BackendHelpers.JS_BUILTIN) {
native.NativeBehavior nativeBehavior = elements.getNativeData(node);
sideEffects.add(nativeBehavior.sideEffects);
return inferrer.typeOfNativeBehavior(nativeBehavior);
« no previous file with comments | « pkg/compiler/lib/src/inferrer/map_tracer.dart ('k') | pkg/compiler/lib/src/kernel/constant_visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698