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

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

Issue 2991903002: Add Closure call method to created closure class (Closed)
Patch Set: . 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
Index: pkg/compiler/lib/src/js_model/locals.dart
diff --git a/pkg/compiler/lib/src/js_model/locals.dart b/pkg/compiler/lib/src/js_model/locals.dart
index 9b714b26ef37564a68b568338f0c49a2912dd17d..8cfa431352b199ff238f1e10a754a8309f815d56 100644
--- a/pkg/compiler/lib/src/js_model/locals.dart
+++ b/pkg/compiler/lib/src/js_model/locals.dart
@@ -135,7 +135,9 @@ class KernelToLocalsMapImpl implements KernelToLocalsMap {
Local getLocalFunction(ir.TreeNode node) {
sra1 2017/07/28 22:09:40 Can we split this into two methods for FunctionExp
Emily Fortuna 2017/07/28 23:17:08 Added a TODO, for discussion with Johnni.
assert(node is ir.FunctionDeclaration || node is ir.FunctionExpression,
failedAt(currentMember, 'Invalid local function node: $node'));
- return _map.putIfAbsent(node, () {
+ var lookupName = node;
+ if (node is ir.FunctionDeclaration) lookupName = node.variable;
+ return _map.putIfAbsent(lookupName, () {
String name;
if (node is ir.FunctionDeclaration) {
name = node.variable.name;

Powered by Google App Engine
This is Rietveld 408576698