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

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

Issue 3000233002: Remove KernelToLocalsMap.getLocalFunction (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_model/locals.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 1d067792809db0bda33bfcdfea1dff317ad5e3b4..a35aa673d075809f4d7f7bbcd1c75289b83032fb 100644
--- a/pkg/compiler/lib/src/js_model/closure.dart
+++ b/pkg/compiler/lib/src/js_model/closure.dart
@@ -371,21 +371,10 @@ class KernelClosureClass extends JsScopeInfo
this.closureClassEntity,
ir.FunctionNode closureSourceNode,
KernelScopeInfo info,
- KernelToLocalsMap localsMap)
- : closureEntity = closureSourceNode.parent is ir.Member
- ? null
- // TODO(johnniwinther,efortuna): This is the only place we call
- // [getLocalFunction]. Therefore the [closureEntity] doesn't need
- // to be derived from the node.
- //
- // What we should do instead: If `closureSourceNode.parent` is
- // an [ir.FunctionDeclaration] we should use the local for its
- // variable. If `closureSourceNode.parent` is an
- // [ir.FunctionExpression], we should create a fresh local.
- : localsMap.getLocalFunction(closureSourceNode.parent),
- thisLocal =
- info.hasThisLocal ? new ThisLocal(localsMap.currentMember) : null,
- super.from(info, localsMap);
+ KernelToLocalsMap localsMap,
+ this.closureEntity,
+ this.thisLocal)
+ : super.from(info, localsMap);
List<Local> get createdFieldEntities => localToFieldMap.keys.toList();
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_model/locals.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698