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

Unified Diff: pkg/compiler/lib/src/js_backend/native_data.dart

Issue 2995643002: Support jsinterop/world_test from .dill (Closed)
Patch Set: Updated cf. comments Created 3 years, 4 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 | « no previous file | pkg/compiler/lib/src/kernel/element_map.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/native_data.dart
diff --git a/pkg/compiler/lib/src/js_backend/native_data.dart b/pkg/compiler/lib/src/js_backend/native_data.dart
index 8f96de0b86c0f807f347acbb17d8509f414dcd15..05d21bd8ca021179b77da07afbab1226534ed91e 100644
--- a/pkg/compiler/lib/src/js_backend/native_data.dart
+++ b/pkg/compiler/lib/src/js_backend/native_data.dart
@@ -291,9 +291,31 @@ class NativeBasicDataImpl implements NativeBasicData {
return jsInteropClasses.containsKey(element);
}
+ bool _isJsInteropMember(MemberEntity element) {
+ return jsInteropMembers.containsKey(element);
+ }
+
@override
bool isJsInteropMember(MemberEntity element) {
- return jsInteropMembers.containsKey(element);
+ // TODO(johnniwinther): Share this with [NativeDataImpl.isJsInteropMember].
+ if (element.isFunction ||
+ element.isConstructor ||
+ element.isGetter ||
+ element.isSetter) {
+ FunctionEntity function = element;
+ if (!function.isExternal) return false;
+
+ if (_isJsInteropMember(function)) return true;
+ if (function.enclosingClass != null) {
+ return isJsInteropClass(function.enclosingClass);
+ }
+ if (function.isTopLevel) {
+ return isJsInteropLibrary(function.library);
+ }
+ return false;
+ } else {
+ return _isJsInteropMember(element);
+ }
}
@override
« no previous file with comments | « no previous file | pkg/compiler/lib/src/kernel/element_map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698