| 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 92686b37c328385ccf962feb44afae3bc5e5a345..dcb8d949ad4c1ceacab0e0bf7078df510ff95913 100644
|
| --- a/pkg/compiler/lib/src/js_model/locals.dart
|
| +++ b/pkg/compiler/lib/src/js_model/locals.dart
|
| @@ -25,7 +25,7 @@ class GlobalLocalsMap {
|
|
|
| class KernelToLocalsMapImpl implements KernelToLocalsMap {
|
| final List<MemberEntity> _members = <MemberEntity>[];
|
| - Map<ir.TreeNode, JLocal> _map = <ir.TreeNode, JLocal>{};
|
| + Map<ir.VariableDeclaration, JLocal> _map = <ir.VariableDeclaration, JLocal>{};
|
| Map<ir.TreeNode, JJumpTarget> _jumpTargetMap;
|
| Set<ir.BreakStatement> _breaksAsContinue;
|
|
|
| @@ -142,28 +142,6 @@ 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'));
|
| - 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;
|
| - } else if (node is ir.FunctionExpression) {
|
| - name = '';
|
| - }
|
| - return new JLocal(name, currentMember);
|
| - });
|
| - }
|
| -
|
| - @override
|
| CapturedLoopScope getCapturedLoopScope(
|
| ClosureDataLookup closureLookup, ir.TreeNode node) {
|
| return closureLookup.getCapturedLoopScope(node);
|
|
|