OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 library dart2js.kernel.backend_strategy; | 5 library dart2js.kernel.backend_strategy; |
6 | 6 |
7 import 'package:kernel/ast.dart' as ir; | 7 import 'package:kernel/ast.dart' as ir; |
8 | 8 |
9 import '../backend_strategy.dart'; | 9 import '../backend_strategy.dart'; |
10 import '../closure.dart'; | 10 import '../closure.dart'; |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 } | 264 } |
265 | 265 |
266 @override | 266 @override |
267 void leaveInlinedMember(MemberEntity member) { | 267 void leaveInlinedMember(MemberEntity member) { |
268 assert(member == currentMember); | 268 assert(member == currentMember); |
269 _members.removeLast(); | 269 _members.removeLast(); |
270 } | 270 } |
271 | 271 |
272 @override | 272 @override |
273 JumpTarget getJumpTarget(ir.TreeNode node, {bool isContinueTarget: false}) { | 273 JumpTarget getJumpTarget(ir.TreeNode node, {bool isContinueTarget: false}) { |
274 throw new UnimplementedError('KernelToLocalsMapImpl.getJumpTarget'); | 274 // TODO(johnniwinther): Support jump targets. |
| 275 return null; |
275 } | 276 } |
276 | 277 |
277 @override | 278 @override |
278 Local getLocal(ir.VariableDeclaration node) { | 279 Local getLocal(ir.VariableDeclaration node) { |
279 return _map.putIfAbsent(node, () { | 280 return _map.putIfAbsent(node, () { |
280 return new KLocal(node.name, currentMember); | 281 return new KLocal(node.name, currentMember); |
281 }); | 282 }); |
282 } | 283 } |
283 | 284 |
284 @override | 285 @override |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 Iterable<ClassEntity> sortClasses(Iterable<ClassEntity> classes) { | 404 Iterable<ClassEntity> sortClasses(Iterable<ClassEntity> classes) { |
404 return classes.toList() | 405 return classes.toList() |
405 ..sort((ClassEntity a, ClassEntity b) { | 406 ..sort((ClassEntity a, ClassEntity b) { |
406 int r = _compareLibraries(a.library, b.library); | 407 int r = _compareLibraries(a.library, b.library); |
407 if (r != 0) return r; | 408 if (r != 0) return r; |
408 return _compareNodes( | 409 return _compareNodes( |
409 a, elementMap.getClassNode(a), b, elementMap.getClassNode(b)); | 410 a, elementMap.getClassNode(a), b, elementMap.getClassNode(b)); |
410 }); | 411 }); |
411 } | 412 } |
412 } | 413 } |
OLD | NEW |