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

Unified Diff: pkg/compiler/lib/src/ssa/optimize.dart

Issue 2721403006: Split NativeData (Closed)
Patch Set: Updated cf. comments. 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
« no previous file with comments | « pkg/compiler/lib/src/ssa/codegen.dart ('k') | pkg/compiler/lib/src/types/types.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/optimize.dart
diff --git a/pkg/compiler/lib/src/ssa/optimize.dart b/pkg/compiler/lib/src/ssa/optimize.dart
index e3e5a51d1a54d60f761c59b540b24a37b12a8f65..2893b87fa61fa69deead301cfc8c4a0837576215 100644
--- a/pkg/compiler/lib/src/ssa/optimize.dart
+++ b/pkg/compiler/lib/src/ssa/optimize.dart
@@ -468,7 +468,7 @@ class SsaInstructionSimplifier extends HBaseVisitor
node.selector.applies(element)) {
MethodElement method = element;
- if (backend.isNative(method)) {
+ if (backend.nativeData.isNativeMember(method)) {
HInstruction folded = tryInlineNativeMethod(node, method);
if (folded != null) return folded;
} else {
@@ -494,7 +494,8 @@ class SsaInstructionSimplifier extends HBaseVisitor
element.isField &&
element.name == node.selector.name) {
FieldEntity field = element;
- if (!backend.isNative(field) && !node.isCallOnInterceptor(closedWorld)) {
+ if (!backend.nativeData.isNativeMember(field) &&
+ !node.isCallOnInterceptor(closedWorld)) {
HInstruction receiver = node.getDartReceiver(closedWorld);
TypeMask type = TypeMaskFactory.inferredTypeForElement(
field as Entity, globalInferenceResults);
@@ -569,7 +570,7 @@ class SsaInstructionSimplifier extends HBaseVisitor
// Strengthen instruction type from annotations to help optimize
// dependent instructions.
native.NativeBehavior nativeBehavior =
- backend.getNativeMethodBehavior(method);
+ backend.nativeData.getNativeMethodBehavior(method);
TypeMask returnType =
TypeMaskFactory.fromNativeBehavior(nativeBehavior, closedWorld);
HInvokeDynamicMethod result =
@@ -958,12 +959,12 @@ class SsaInstructionSimplifier extends HBaseVisitor
}
HInstruction directFieldGet(HInstruction receiver, FieldEntity field) {
- bool isAssignable = !closedWorld.fieldNeverChanges(field as MemberEntity);
+ bool isAssignable = !closedWorld.fieldNeverChanges(field);
TypeMask type;
- if (backend.isNative(field.enclosingClass)) {
+ if (backend.nativeData.isNativeClass(field.enclosingClass)) {
type = TypeMaskFactory.fromNativeBehavior(
- backend.getNativeFieldLoadBehavior(field), closedWorld);
+ backend.nativeData.getNativeFieldLoadBehavior(field), closedWorld);
} else {
type = TypeMaskFactory.inferredTypeForElement(
field as Entity, globalInferenceResults);
« no previous file with comments | « pkg/compiler/lib/src/ssa/codegen.dart ('k') | pkg/compiler/lib/src/types/types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698