OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 import 'package:kernel/ast.dart' as ir; | 5 import 'package:kernel/ast.dart' as ir; |
6 | 6 |
7 import '../closure.dart'; | 7 import '../closure.dart'; |
8 import '../common.dart'; | 8 import '../common.dart'; |
9 import '../compiler.dart'; | 9 import '../compiler.dart'; |
10 import '../constants/expressions.dart'; | 10 import '../constants/expressions.dart'; |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 } | 258 } |
259 | 259 |
260 void assertNodeIsSynthetic(ir.Node node) { | 260 void assertNodeIsSynthetic(ir.Node node) { |
261 assert( | 261 assert( |
262 kernel.syntheticNodes.contains(node), | 262 kernel.syntheticNodes.contains(node), |
263 failedAt( | 263 failedAt( |
264 CURRENT_ELEMENT_SPANNABLE, "No synthetic marker found for $node")); | 264 CURRENT_ELEMENT_SPANNABLE, "No synthetic marker found for $node")); |
265 } | 265 } |
266 | 266 |
267 @override | 267 @override |
268 Local getLocalVariable(ir.VariableDeclaration variable) { | 268 Local getLocalVariable(ir.VariableDeclaration variable, |
| 269 {bool isClosureCallMethod}) { |
269 // If this is a synthetic local, return the synthetic local | 270 // If this is a synthetic local, return the synthetic local |
270 if (variable.name == null) { | 271 if (variable.name == null) { |
271 return _syntheticLocals.putIfAbsent( | 272 return _syntheticLocals.putIfAbsent( |
272 variable, () => new SyntheticLocal("x", null, null)); | 273 variable, () => new SyntheticLocal("x", null, null)); |
273 } | 274 } |
274 return getElement(variable) as LocalElement; | 275 return getElement(variable) as LocalElement; |
275 } | 276 } |
276 | 277 |
277 @override | 278 @override |
278 JumpTarget getJumpTargetForBreak(ir.BreakStatement node) { | 279 JumpTarget getJumpTargetForBreak(ir.BreakStatement node) { |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
720 TypeMask selectorTypeOf(Selector selector, TypeMask mask) { | 721 TypeMask selectorTypeOf(Selector selector, TypeMask mask) { |
721 return TypeMaskFactory.inferredTypeForSelector( | 722 return TypeMaskFactory.inferredTypeForSelector( |
722 selector, mask, _globalInferenceResults); | 723 selector, mask, _globalInferenceResults); |
723 } | 724 } |
724 | 725 |
725 TypeMask typeFromNativeBehavior( | 726 TypeMask typeFromNativeBehavior( |
726 native.NativeBehavior nativeBehavior, ClosedWorld closedWorld) { | 727 native.NativeBehavior nativeBehavior, ClosedWorld closedWorld) { |
727 return TypeMaskFactory.fromNativeBehavior(nativeBehavior, closedWorld); | 728 return TypeMaskFactory.fromNativeBehavior(nativeBehavior, closedWorld); |
728 } | 729 } |
729 } | 730 } |
OLD | NEW |