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

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

Issue 3002953002: Split getClosureRepresentationInfo into MemberEntity and (ir/ast) nodes (Closed)
Patch Set: Update cf. comments Created 3 years, 4 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/builder_kernel.dart ('k') | tests/compiler/dart2js/closure/closure_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_ast_adapter.dart
diff --git a/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart b/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
index 5f2bb0357974d4b26a58541b5f5967c38489c53d..c6e14f3103591995b0212630b497131d962ae64c 100644
--- a/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
+++ b/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
@@ -136,7 +136,7 @@ class KernelAstAdapter extends KernelToElementMapBaseMixin
MethodElement originTargetFunction = originTarget;
ClosureRepresentationInfo classMap = _compiler
.backendStrategy.closureDataLookup
- .getClosureRepresentationInfo(originTargetFunction);
+ .getClosureInfoForMember(originTargetFunction);
if (classMap.closureEntity != null) {
target = kernel.localFunctions[classMap.closureEntity];
}
@@ -399,6 +399,13 @@ class KernelAstAdapter extends KernelToElementMapBaseMixin
ClosureDataLookup closureLookup, ir.TreeNode node) {
return closureLookup.getCapturedLoopScope(getNode(node));
}
+
+ @override
+ ClosureRepresentationInfo getClosureRepresentationInfo(
+ ClosureDataLookup closureLookup, ir.TreeNode node) {
+ LocalFunctionElement localFunction = getElement(node);
+ return closureLookup.getClosureInfo(localFunction.node);
+ }
}
/// Visitor that converts kernel dart types into [ResolutionDartType].
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder_kernel.dart ('k') | tests/compiler/dart2js/closure/closure_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698