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

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

Issue 2467493003: Compute NativeBehavior for native methods and fields. (Closed)
Patch Set: Updated cf. comments Created 4 years, 1 month 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/kernel_ast_adapter.dart ('k') | tests/compiler/dart2js/kernel/impact_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/kernel_impact.dart
diff --git a/pkg/compiler/lib/src/ssa/kernel_impact.dart b/pkg/compiler/lib/src/ssa/kernel_impact.dart
index 6439008f6b5d3a5a68d72ffbd82de0d638d3c425..c035c2d14c66d041e20b8d1484cd660c9351af4a 100644
--- a/pkg/compiler/lib/src/ssa/kernel_impact.dart
+++ b/pkg/compiler/lib/src/ssa/kernel_impact.dart
@@ -113,6 +113,12 @@ class KernelImpactBuilder extends ir.Visitor {
} else {
impactBuilder.registerFeature(Feature.FIELD_WITHOUT_INITIALIZER);
}
+ if (field.isInstanceMember && astAdapter.isNative(field.enclosingClass)) {
+ impactBuilder
+ .registerNativeData(astAdapter.getNativeBehaviorForFieldLoad(field));
+ impactBuilder
+ .registerNativeData(astAdapter.getNativeBehaviorForFieldStore(field));
+ }
return impactBuilder;
}
@@ -142,6 +148,11 @@ class KernelImpactBuilder extends ir.Visitor {
compiler.reporter.internalError(resolvedAst.element,
"Unexpected async marker: ${procedure.function.asyncMarker}");
}
+ if (procedure.isExternal &&
+ !astAdapter.isForeignLibrary(procedure.enclosingLibrary)) {
+ impactBuilder
+ .registerNativeData(astAdapter.getNativeBehaviorForMethod(procedure));
+ }
return impactBuilder;
}
« no previous file with comments | « pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart ('k') | tests/compiler/dart2js/kernel/impact_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698