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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 JumpTarget getJumpTarget(ir.TreeNode node, {bool isContinueTarget: false}) { | 270 JumpTarget getJumpTarget(ir.TreeNode node, {bool isContinueTarget: false}) { |
271 throw new UnimplementedError('KernelToLocalsMapImpl.getJumpTarget'); | 271 throw new UnimplementedError('KernelToLocalsMapImpl.getJumpTarget'); |
272 } | 272 } |
273 | 273 |
274 @override | 274 @override |
275 Local getLocal(ir.VariableDeclaration node) { | 275 Local getLocal(ir.VariableDeclaration node) { |
276 return _map.putIfAbsent(node, () { | 276 return _map.putIfAbsent(node, () { |
277 return new KLocal(node.name, currentMember); | 277 return new KLocal(node.name, currentMember); |
278 }); | 278 }); |
279 } | 279 } |
| 280 |
| 281 @override |
| 282 LoopClosureRepresentationInfo getClosureRepresentationInfoForLoop( |
| 283 ClosureClassMaps closureClassMaps, ir.TreeNode node) { |
| 284 return const LoopClosureRepresentationInfo(); |
| 285 } |
280 } | 286 } |
281 | 287 |
282 class KLocal implements Local { | 288 class KLocal implements Local { |
283 final String name; | 289 final String name; |
284 final MemberEntity memberContext; | 290 final MemberEntity memberContext; |
285 | 291 |
286 KLocal(this.name, this.memberContext); | 292 KLocal(this.name, this.memberContext); |
287 | 293 |
288 @override | 294 @override |
289 Entity get executableContext => memberContext; | 295 Entity get executableContext => memberContext; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 Iterable<ClassEntity> sortClasses(Iterable<ClassEntity> classes) { | 379 Iterable<ClassEntity> sortClasses(Iterable<ClassEntity> classes) { |
374 return classes.toList() | 380 return classes.toList() |
375 ..sort((ClassEntity a, ClassEntity b) { | 381 ..sort((ClassEntity a, ClassEntity b) { |
376 int r = _compareLibraries(a.library, b.library); | 382 int r = _compareLibraries(a.library, b.library); |
377 if (r != 0) return r; | 383 if (r != 0) return r; |
378 return _compareNodes( | 384 return _compareNodes( |
379 a, elementMap.getClassNode(a), b, elementMap.getClassNode(b)); | 385 a, elementMap.getClassNode(a), b, elementMap.getClassNode(b)); |
380 }); | 386 }); |
381 } | 387 } |
382 } | 388 } |
OLD | NEW |