| 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;
|
|
|