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

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

Issue 2990983002: Handle NativeTypedArray in closed_world_from_dill_test (Closed)
Patch Set: Created 3 years, 5 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/elements/modelx.dart » ('j') | pkg/compiler/lib/src/elements/modelx.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/common_elements.dart
diff --git a/pkg/compiler/lib/src/common_elements.dart b/pkg/compiler/lib/src/common_elements.dart
index d9d9a5584bca52c946d7dc32f22c54bd77b9c7e1..0c7edc97a9f675256dfbbb8030bcdf82b1e22482 100644
--- a/pkg/compiler/lib/src/common_elements.dart
+++ b/pkg/compiler/lib/src/common_elements.dart
@@ -13,6 +13,7 @@ import 'elements/names.dart' show PublicName;
import 'elements/types.dart';
import 'js_backend/backend.dart' show JavaScriptBackend;
import 'js_backend/constant_system_javascript.dart';
+import 'js_backend/native_data.dart' show NativeBasicData;
import 'universe/call_structure.dart' show CallStructure;
import 'universe/selector.dart' show Selector;
import 'universe/call_structure.dart';
@@ -1176,6 +1177,17 @@ class CommonElements {
cls == jsInterceptorClass ||
cls == jsNullClass;
}
+
+ ClassEntity getDefaultSuperclass(
+ ClassEntity cls, NativeBasicData nativeBasicData) {
+ if (nativeBasicData.isJsInteropClass(cls)) {
+ return jsJavaScriptObjectClass;
+ }
+ // Native classes inherit from Interceptor.
+ return nativeBasicData.isNativeClass(cls)
+ ? jsInterceptorClass
+ : objectClass;
+ }
}
/// Interface for accessing libraries, classes and members.
« no previous file with comments | « no previous file | pkg/compiler/lib/src/elements/modelx.dart » ('j') | pkg/compiler/lib/src/elements/modelx.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698