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

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

Issue 2731163002: Split js interop registration into library/class/member elements (Closed)
Patch Set: Cleanup. 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
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?
Siggi Cherem (dart-lang) 2017/03/14 04:48:20 I was wondering the same thing...
+ 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));
}

Powered by Google App Engine
This is Rietveld 408576698