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

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

Issue 2975573002: Lookup getClosureScope by member instead of node (Closed)
Patch Set: Cleanup 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/closure.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_model/closure.dart
diff --git a/pkg/compiler/lib/src/js_model/closure.dart b/pkg/compiler/lib/src/js_model/closure.dart
index 01aa7ac13fb82e04a7b6f3d71c673925d199718a..7202e5ce7e733a36b12efa70d8e26e8b12da4c4e 100644
--- a/pkg/compiler/lib/src/js_model/closure.dart
+++ b/pkg/compiler/lib/src/js_model/closure.dart
@@ -126,13 +126,17 @@ class KernelClosureConversionTask extends ClosureConversionTask<ir.Node> {
return getClosureRepresentationInfo(entity);
}
- @override
// TODO(efortuna): Eventually closureScopeMap[node] should always be non-null,
// and we should just test that with an assert.
- ClosureScope getClosureScope(ir.Node node) =>
+ ClosureScope _getClosureScope(ir.Node node) =>
_closureScopeMap[node] ?? const ClosureScope();
@override
+ ClosureScope getClosureScope(MemberEntity entity) {
+ return _getClosureScope(_elementMap.getMemberNode(entity));
+ }
+
+ @override
// TODO(efortuna): Eventually closureScopeMap[node] should always be non-null,
// and we should just test that with an assert.
LoopClosureScope getLoopClosureScope(ir.Node loopNode) =>
« no previous file with comments | « pkg/compiler/lib/src/closure.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698