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

Unified Diff: pkg/compiler/lib/src/native/behavior.dart

Issue 2863073003: Access NativeData only through ClosedWorld (Closed)
Patch Set: Created 3 years, 7 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/kernel/element_map.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/native/behavior.dart
diff --git a/pkg/compiler/lib/src/native/behavior.dart b/pkg/compiler/lib/src/native/behavior.dart
index db6357a26bb56e35593eb3bba896d69e8ffc7fb7..f02a29631b04de2e94981ae4307c44b065c5d560 100644
--- a/pkg/compiler/lib/src/native/behavior.dart
+++ b/pkg/compiler/lib/src/native/behavior.dart
@@ -13,7 +13,7 @@ import '../elements/entities.dart';
import '../elements/resolution_types.dart';
import '../elements/types.dart';
import '../js/js.dart' as js;
-import '../js_backend/native_data.dart' show NativeData;
+import '../js_backend/native_data.dart' show NativeBasicData;
import '../tree/tree.dart';
import '../universe/side_effects.dart' show SideEffects;
import '../util/util.dart';
@@ -775,7 +775,7 @@ class NativeBehavior {
}
BehaviorBuilder builder =
- new ResolverBehaviorBuilder(compiler, compiler.backend.nativeData);
+ new ResolverBehaviorBuilder(compiler, compiler.backend.nativeBasicData);
return builder.buildMethodBehavior(
type, metadata, lookupFromElement(compiler.resolution, element),
isJsInterop: isJsInterop);
@@ -793,7 +793,7 @@ class NativeBehavior {
}
BehaviorBuilder builder =
- new ResolverBehaviorBuilder(compiler, compiler.backend.nativeData);
+ new ResolverBehaviorBuilder(compiler, compiler.backend.nativeBasicData);
return builder.buildFieldLoadBehavior(
type, metadata, lookupFromElement(resolution, element),
isJsInterop: isJsInterop);
@@ -802,7 +802,7 @@ class NativeBehavior {
static NativeBehavior ofFieldElementStore(
MemberElement field, Compiler compiler) {
BehaviorBuilder builder =
- new ResolverBehaviorBuilder(compiler, compiler.backend.nativeData);
+ new ResolverBehaviorBuilder(compiler, compiler.backend.nativeBasicData);
ResolutionDartType type = field.computeType(compiler.resolution);
return builder.buildFieldStoreBehavior(type);
}
@@ -849,7 +849,7 @@ class NativeBehavior {
abstract class BehaviorBuilder {
CommonElements get commonElements;
DiagnosticReporter get reporter;
- NativeData get nativeData;
+ NativeBasicData get nativeBasicData;
bool get trustJSInteropTypeAnnotations;
Resolution get resolution => null;
@@ -946,7 +946,8 @@ abstract class BehaviorBuilder {
if (!isInterop) {
_behavior.typesInstantiated.add(type);
} else {
- if (type is InterfaceType && nativeData.isNativeClass(type.element)) {
+ if (type is InterfaceType &&
+ nativeBasicData.isNativeClass(type.element)) {
// Any declared native or interop type (isNative implies isJsInterop)
// is assumed to be allocated.
_behavior.typesInstantiated.add(type);
@@ -1034,9 +1035,9 @@ abstract class BehaviorBuilder {
class ResolverBehaviorBuilder extends BehaviorBuilder {
final Compiler compiler;
- final NativeData nativeData;
+ final NativeBasicData nativeBasicData;
- ResolverBehaviorBuilder(this.compiler, this.nativeData);
+ ResolverBehaviorBuilder(this.compiler, this.nativeBasicData);
@override
CommonElements get commonElements => compiler.commonElements;
« no previous file with comments | « pkg/compiler/lib/src/kernel/element_map.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698