| 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.element_map; | 5 library dart2js.kernel.element_map; |
| 6 | 6 |
| 7 import 'package:kernel/ast.dart' as ir; | 7 import 'package:kernel/ast.dart' as ir; |
| 8 import 'package:kernel/clone.dart'; | 8 import 'package:kernel/clone.dart'; |
| 9 import 'package:kernel/type_algebra.dart'; | 9 import 'package:kernel/type_algebra.dart'; |
| 10 | 10 |
| (...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 } | 673 } |
| 674 | 674 |
| 675 FunctionType _getFunctionType(KFunction function) { | 675 FunctionType _getFunctionType(KFunction function) { |
| 676 _FunctionData data = _memberList[function.memberIndex]; | 676 _FunctionData data = _memberList[function.memberIndex]; |
| 677 return data.getFunctionType(this); | 677 return data.getFunctionType(this); |
| 678 } | 678 } |
| 679 | 679 |
| 680 ResolutionImpact computeWorldImpact(KMember member) { | 680 ResolutionImpact computeWorldImpact(KMember member) { |
| 681 return _memberList[member.memberIndex].getWorldImpact(this); | 681 return _memberList[member.memberIndex].getWorldImpact(this); |
| 682 } | 682 } |
| 683 |
| 684 @override |
| 685 Spannable getSpannable(MemberEntity member, ir.Node node) { |
| 686 return member; |
| 687 } |
| 683 } | 688 } |
| 684 | 689 |
| 685 /// Environment for fast lookup of program libraries. | 690 /// Environment for fast lookup of program libraries. |
| 686 class _KEnv { | 691 class _KEnv { |
| 687 final Set<ir.Program> programs = new Set<ir.Program>(); | 692 final Set<ir.Program> programs = new Set<ir.Program>(); |
| 688 | 693 |
| 689 Map<Uri, _KLibraryEnv> _libraryMap; | 694 Map<Uri, _KLibraryEnv> _libraryMap; |
| 690 | 695 |
| 691 /// TODO(johnniwinther): Handle arbitrary load order if needed. | 696 /// TODO(johnniwinther): Handle arbitrary load order if needed. |
| 692 ir.Member get mainMethod => programs.first?.mainMethod; | 697 ir.Member get mainMethod => programs.first?.mainMethod; |
| (...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1503 return node.isExternal && | 1508 return node.isExternal && |
| 1504 !elementMap.isForeignLibrary(node.enclosingLibrary); | 1509 !elementMap.isForeignLibrary(node.enclosingLibrary); |
| 1505 } | 1510 } |
| 1506 | 1511 |
| 1507 @override | 1512 @override |
| 1508 bool isJsInteropMember(MemberEntity element) { | 1513 bool isJsInteropMember(MemberEntity element) { |
| 1509 // TODO(johnniwinther): Compute this. | 1514 // TODO(johnniwinther): Compute this. |
| 1510 return false; | 1515 return false; |
| 1511 } | 1516 } |
| 1512 } | 1517 } |
| OLD | NEW |