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

Unified Diff: pkg/compiler/lib/src/closure.dart

Issue 3011433002: Revert "Reduce use of getClosureInfoForMember and cleanup closure_test" (Closed)
Patch Set: 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 | « no previous file | pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/closure.dart
diff --git a/pkg/compiler/lib/src/closure.dart b/pkg/compiler/lib/src/closure.dart
index cdc4083b34b5e3379d0749367aaed6ad0c47618d..3eda671d6a0d42fe9729cd29a2d6a65edff49054 100644
--- a/pkg/compiler/lib/src/closure.dart
+++ b/pkg/compiler/lib/src/closure.dart
@@ -46,12 +46,15 @@ abstract class ClosureDataLookup<T> {
/// This returns the same information as ScopeInfo, but can be called in
/// situations when you are sure you are dealing with a closure specifically.
- // TODO(johnniwinther,efortuna): Remove the need for this. It is now only
- // used in inference.
+ // TODO(johnniwinther,efortuna): Can we use [getScopeInfo] instead?
ClosureRepresentationInfo getClosureInfoForMember(MemberEntity member);
ClosureRepresentationInfo getClosureInfo(T localFunction);
+ ClosureRepresentationInfo getClosureInfoForMemberTesting(MemberEntity member);
+
+ ClosureRepresentationInfo getClosureInfoForTesting(T localFunction);
+
/// Look up information about a loop, in case any variables it declares need
/// to be boxed/snapshotted.
CapturedLoopScope getCapturedLoopScope(T loopNode);
@@ -296,6 +299,16 @@ class ClosureTask extends ClosureConversionTask<Node> {
return _getClosureMapping(node);
}
+ ClosureRepresentationInfo getClosureInfoForMemberTesting(
+ MemberEntity member) {
+ return getClosureInfoForMember(member);
+ }
+
+ ClosureRepresentationInfo getClosureInfoForTesting(
+ covariant FunctionExpression node) {
+ return getClosureInfo(node);
+ }
+
CapturedLoopScope getCapturedLoopScope(Node loopNode) {
var value = _closureInfoMap[loopNode];
return value == null ? const CapturedLoopScope() : value;
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698