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

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

Issue 2727253007: Add NativeClassData/NativeClassDataBuilder (Closed)
Patch Set: Created 3 years, 10 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/world.dart
diff --git a/pkg/compiler/lib/src/world.dart b/pkg/compiler/lib/src/world.dart
index 8e4ae237316bd6920f3c11c9075d5d6e75e826e0..4ea2abc7932387a412cd27815019f64a1e3f4047 100644
--- a/pkg/compiler/lib/src/world.dart
+++ b/pkg/compiler/lib/src/world.dart
@@ -22,6 +22,7 @@ import 'elements/elements.dart'
import 'elements/resolution_types.dart';
import 'js_backend/backend.dart' show JavaScriptBackend;
import 'js_backend/interceptor_data.dart' show InterceptorData;
+import 'js_backend/native_data.dart' show NativeClassData;
import 'ordered_typeset.dart';
import 'types/masks.dart' show CommonMasks, FlatTypeMask, TypeMask;
import 'universe/class_set.dart';
@@ -445,6 +446,8 @@ class ClosedWorldImpl implements ClosedWorld, ClosedWorldRefiner {
_allFunctions = functionSetBuilder.close(this);
}
+ NativeClassData get _nativeClassData => _backend.nativeClassData;
+
@override
ClosedWorld get closedWorld => this;
@@ -711,7 +714,7 @@ class ClosedWorldImpl implements ClosedWorld, ClosedWorldRefiner {
@override
ClassElement getLubOfInstantiatedSubclasses(ClassElement cls) {
assert(isClosed);
- if (_backend.nativeData.isJsInterop(cls)) {
+ if (_nativeClassData.isJsInteropClass(cls)) {
return _backend.helpers.jsJavaScriptObjectClass;
}
ClassHierarchyNode hierarchy = _classHierarchyNodes[cls.declaration];
@@ -723,7 +726,7 @@ class ClosedWorldImpl implements ClosedWorld, ClosedWorldRefiner {
@override
ClassElement getLubOfInstantiatedSubtypes(ClassElement cls) {
assert(isClosed);
- if (_backend.nativeData.isJsInterop(cls)) {
+ if (_nativeClassData.isJsInteropClass(cls)) {
return _backend.helpers.jsJavaScriptObjectClass;
}
ClassSet classSet = _classSets[cls.declaration];
@@ -1093,7 +1096,7 @@ class ClosedWorldImpl implements ClosedWorld, ClosedWorldRefiner {
bool fieldNeverChanges(MemberElement element) {
if (!element.isField) return false;
- if (_backend.nativeData.isNativeMember(element)) {
+ if (_nativeClassData.isNativeMember(element)) {
// Some native fields are views of data that may be changed by operations.
// E.g. node.firstChild depends on parentNode.removeBefore(n1, n2).
// TODO(sra): Refine the effect classification so that native effects are
« no previous file with comments | « pkg/compiler/lib/src/universe/world_builder.dart ('k') | tests/compiler/dart2js/kernel/closed_world_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698