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

Unified Diff: pkg/compiler/lib/src/types/types.dart

Issue 2731163002: Split js interop registration into library/class/member elements (Closed)
Patch Set: Updated cf. comments Created 3 years, 9 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
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | tests/compiler/dart2js/serialization/native_data_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/types/types.dart
diff --git a/pkg/compiler/lib/src/types/types.dart b/pkg/compiler/lib/src/types/types.dart
index a11c61de64691f5f1725ee9daf47469fd22203bc..d4565d5fadd0b7d73604ebe14af363ba80628e8e 100644
--- a/pkg/compiler/lib/src/types/types.dart
+++ b/pkg/compiler/lib/src/types/types.dart
@@ -206,13 +206,20 @@ class GlobalTypeInferenceResults {
var key = (element is SynthesizedCallMethodElementX)
? element.memberContext
: element;
+ bool isJsInterop = false;
+ if (element is MemberElement) {
+ isJsInterop = _compiler.backend.nativeData.isJsInteropMember(element);
+ } else if (element is ClassElement) {
+ // TODO(johnniwinther): Can we meet classes here?
+ isJsInterop = _compiler.backend.nativeData.isJsInteropClass(element);
+ }
return _elementResults.putIfAbsent(
element,
() => new GlobalTypeInferenceElementResultImpl(
element,
_inferrer.inferrer.inTreeData[key],
_inferrer,
- _compiler.backend.nativeData.isJsInterop(element),
+ isJsInterop,
dynamicType));
}
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | tests/compiler/dart2js/serialization/native_data_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698