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

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

Issue 1238783003: Handle deferred access as pre-step in SemanticSendVisitor. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 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 | « pkg/compiler/lib/src/resolved_visitor.dart ('k') | tests/compiler/dart2js/proxy_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/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 133567486ff7df32adf2493e20b90bed4e0f285f..573bde0e1cbcdb6b9450ad38de725eb87952740b 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -3417,10 +3417,13 @@ class SsaBuilder extends ast.Visitor
}
}
+ @override
+ void previsitDeferredAccess(ast.Send node, PrefixElement prefix, _) {
+ generateIsDeferredLoadedCheckIfNeeded(prefix, node);
+ }
+
/// Read a static or top level [field].
void generateStaticFieldGet(ast.Send node, FieldElement field) {
- generateIsDeferredLoadedCheckOfSend(node);
-
ConstantExpression constant =
backend.constants.getConstantForVariable(field);
SourceInformation sourceInformation =
@@ -3455,7 +3458,6 @@ class SsaBuilder extends ast.Visitor
if (getter.isDeferredLoaderGetter) {
generateDeferredLoaderGet(node, getter, sourceInformation);
} else {
- generateIsDeferredLoadedCheckOfSend(node);
pushInvokeStatic(node, getter, <HInstruction>[],
sourceInformation: sourceInformation);
}
@@ -3470,7 +3472,6 @@ class SsaBuilder extends ast.Visitor
/// Generate a closurization of the static or top level [function].
void generateStaticFunctionGet(ast.Send node, MethodElement function) {
- generateIsDeferredLoadedCheckOfSend(node);
// TODO(5346): Try to avoid the need for calling [declaration] before
// creating an [HStatic].
SourceInformation sourceInformation =
@@ -5185,8 +5186,6 @@ class SsaBuilder extends ast.Visitor
ast.Send node,
FunctionElement function,
CallStructure callStructure) {
- generateIsDeferredLoadedCheckOfSend(node);
-
List<HInstruction> inputs = makeStaticArgumentList(
callStructure,
node.arguments,
@@ -5457,7 +5456,6 @@ class SsaBuilder extends ast.Visitor
/// Generate the constant value for a constant type literal.
void generateConstantTypeLiteral(ast.Send node) {
- generateIsDeferredLoadedCheckOfSend(node);
// TODO(karlklose): add type representation
if (node.isCall) {
// The node itself is not a constant but we register the selector (the
« no previous file with comments | « pkg/compiler/lib/src/resolved_visitor.dart ('k') | tests/compiler/dart2js/proxy_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698