| 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..cae0cb7339b50ac418c18a2a305efacba1654413 100644
|
| --- a/pkg/compiler/lib/src/js_model/locals.dart
|
| +++ b/pkg/compiler/lib/src/js_model/locals.dart
|
| @@ -132,10 +132,17 @@ class KernelToLocalsMapImpl implements KernelToLocalsMap {
|
| }
|
|
|
| @override
|
| + // TODO(johnniwinther): Split this out into two methods -- one for
|
| + // FunctionDeclaration and one for FunctionExpression, since basically the
|
| + // whole thing is different depending on the node type. The reason it's not
|
| + // done yet is the version of this function that it's overriding has a little
|
| + // bit of commonality.
|
| Local getLocalFunction(ir.TreeNode node) {
|
| 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;
|
|
|