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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 } | 304 } |
305 | 305 |
306 @override | 306 @override |
307 Local getLocal(ir.VariableDeclaration node) { | 307 Local getLocal(ir.VariableDeclaration node) { |
308 return _map.putIfAbsent(node, () { | 308 return _map.putIfAbsent(node, () { |
309 return new KLocal(node.name, currentMember); | 309 return new KLocal(node.name, currentMember); |
310 }); | 310 }); |
311 } | 311 } |
312 | 312 |
313 @override | 313 @override |
314 LoopClosureRepresentationInfo getClosureRepresentationInfoForLoop( | 314 ClosureBase getClosureRepresentationInfoForLoop( |
315 ClosureDataLookup closureLookup, ir.TreeNode node) { | 315 ClosureDataLookup closureLookup, ir.TreeNode node) { |
316 return closureLookup.getClosureRepresentationInfoForLoop(node); | 316 return closureLookup.getClosureRepresentationInfoForLoop(node); |
317 } | 317 } |
318 } | 318 } |
319 | 319 |
320 class KLocal implements Local { | 320 class KLocal implements Local { |
321 final String name; | 321 final String name; |
322 final MemberEntity memberContext; | 322 final MemberEntity memberContext; |
323 | 323 |
324 KLocal(this.name, this.memberContext); | 324 KLocal(this.name, this.memberContext); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 Iterable<ClassEntity> sortClasses(Iterable<ClassEntity> classes) { | 381 Iterable<ClassEntity> sortClasses(Iterable<ClassEntity> classes) { |
382 return classes.toList() | 382 return classes.toList() |
383 ..sort((ClassEntity a, ClassEntity b) { | 383 ..sort((ClassEntity a, ClassEntity b) { |
384 int r = _compareLibraries(a.library, b.library); | 384 int r = _compareLibraries(a.library, b.library); |
385 if (r != 0) return r; | 385 if (r != 0) return r; |
386 return _compareNodes( | 386 return _compareNodes( |
387 a, elementMap.getClassNode(a), b, elementMap.getClassNode(b)); | 387 a, elementMap.getClassNode(a), b, elementMap.getClassNode(b)); |
388 }); | 388 }); |
389 } | 389 } |
390 } | 390 } |
OLD | NEW |