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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 } | 253 } |
254 | 254 |
255 void assertNodeIsSynthetic(ir.Node node) { | 255 void assertNodeIsSynthetic(ir.Node node) { |
256 assert( | 256 assert( |
257 kernel.syntheticNodes.contains(node), | 257 kernel.syntheticNodes.contains(node), |
258 failedAt( | 258 failedAt( |
259 CURRENT_ELEMENT_SPANNABLE, "No synthetic marker found for $node")); | 259 CURRENT_ELEMENT_SPANNABLE, "No synthetic marker found for $node")); |
260 } | 260 } |
261 | 261 |
262 @override | 262 @override |
263 Local getLocal(ir.VariableDeclaration variable) { | 263 Local getLocalVariable(ir.VariableDeclaration variable) { |
264 // If this is a synthetic local, return the synthetic local | 264 // If this is a synthetic local, return the synthetic local |
265 if (variable.name == null) { | 265 if (variable.name == null) { |
266 return _syntheticLocals.putIfAbsent( | 266 return _syntheticLocals.putIfAbsent( |
267 variable, () => new SyntheticLocal("x", null, null)); | 267 variable, () => new SyntheticLocal("x", null, null)); |
268 } | 268 } |
269 return getElement(variable) as LocalElement; | 269 return getElement(variable) as LocalElement; |
270 } | 270 } |
271 | 271 |
272 @override | 272 @override |
273 JumpTarget getJumpTargetForBreak(ir.BreakStatement node) { | 273 JumpTarget getJumpTargetForBreak(ir.BreakStatement node) { |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
710 TypeMask selectorTypeOf(Selector selector, TypeMask mask) { | 710 TypeMask selectorTypeOf(Selector selector, TypeMask mask) { |
711 return TypeMaskFactory.inferredTypeForSelector( | 711 return TypeMaskFactory.inferredTypeForSelector( |
712 selector, mask, _globalInferenceResults); | 712 selector, mask, _globalInferenceResults); |
713 } | 713 } |
714 | 714 |
715 TypeMask typeFromNativeBehavior( | 715 TypeMask typeFromNativeBehavior( |
716 native.NativeBehavior nativeBehavior, ClosedWorld closedWorld) { | 716 native.NativeBehavior nativeBehavior, ClosedWorld closedWorld) { |
717 return TypeMaskFactory.fromNativeBehavior(nativeBehavior, closedWorld); | 717 return TypeMaskFactory.fromNativeBehavior(nativeBehavior, closedWorld); |
718 } | 718 } |
719 } | 719 } |
OLD | NEW |