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

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

Issue 2984783002: Fix and assert getLocalFunction invariant (Closed)
Patch Set: Created 3 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/kernel/element_map_impl.dart ('k') | pkg/compiler/lib/src/ssa/kernel_ast_adapter.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_kernel.dart
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
index d97fe22aaa4c95a60c2667a3c3d337f01869ed55..d8bf389c78644c63550203e3249d39beb1b46133 100644
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
@@ -2944,7 +2944,7 @@ class KernelSsaGraphBuilder extends ir.Visitor
@override
visitFunctionNode(ir.FunctionNode node) {
- Local methodElement = _elementMap.getLocalFunction(node);
+ Local methodElement = _elementMap.getLocalFunction(node.parent);
ClosureRepresentationInfo closureInfo =
closureDataLookup.getClosureRepresentationInfo(methodElement);
ClassEntity closureClassEntity = closureInfo.closureClassEntity;
@@ -2965,7 +2965,7 @@ class KernelSsaGraphBuilder extends ir.Visitor
visitFunctionDeclaration(ir.FunctionDeclaration declaration) {
assert(isReachable);
declaration.function.accept(this);
- Local localFunction = _elementMap.getLocalFunction(declaration.function);
+ Local localFunction = _elementMap.getLocalFunction(declaration);
localsHandler.updateLocal(localFunction, pop());
}
« no previous file with comments | « pkg/compiler/lib/src/kernel/element_map_impl.dart ('k') | pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698