Chromium Code Reviews| 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; |