OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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.js_emitter.program_builder; | 5 library dart2js.js_emitter.program_builder; |
6 | 6 |
7 import '../../closure.dart' show ClosureFieldElement; | 7 import '../../closure.dart' show ClosureFieldElement; |
8 import '../../common.dart'; | 8 import '../../common.dart'; |
9 import '../../common/names.dart' show Names, Selectors; | 9 import '../../common/names.dart' show Names, Selectors; |
10 import '../../compiler.dart' show Compiler; | 10 import '../../compiler.dart' show Compiler; |
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
694 if (code == null) return null; | 694 if (code == null) return null; |
695 | 695 |
696 bool canTearOff = false; | 696 bool canTearOff = false; |
697 js.Name tearOffName; | 697 js.Name tearOffName; |
698 bool isClosureCallMethod = false; | 698 bool isClosureCallMethod = false; |
699 bool isNotApplyTarget = !element.isFunction || element.isAccessor; | 699 bool isNotApplyTarget = !element.isFunction || element.isAccessor; |
700 | 700 |
701 bool canBeReflected = _methodCanBeReflected(element); | 701 bool canBeReflected = _methodCanBeReflected(element); |
702 bool canBeApplied = _methodCanBeApplied(element); | 702 bool canBeApplied = _methodCanBeApplied(element); |
703 | 703 |
704 js.Name aliasName = backend.isAliasedSuperMember(element) | 704 js.Name aliasName = backend.superMemberData.isAliasedSuperMember(element) |
705 ? namer.aliasedSuperMemberPropertyName(element) | 705 ? namer.aliasedSuperMemberPropertyName(element) |
706 : null; | 706 : null; |
707 | 707 |
708 if (isNotApplyTarget) { | 708 if (isNotApplyTarget) { |
709 canTearOff = false; | 709 canTearOff = false; |
710 } else { | 710 } else { |
711 if (element.enclosingClass.isClosure) { | 711 if (element.enclosingClass.isClosure) { |
712 canTearOff = false; | 712 canTearOff = false; |
713 isClosureCallMethod = true; | 713 isClosureCallMethod = true; |
714 } else { | 714 } else { |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
970 Constant constant = new Constant(name, holder, constantValue); | 970 Constant constant = new Constant(name, holder, constantValue); |
971 _constants[constantValue] = constant; | 971 _constants[constantValue] = constant; |
972 } | 972 } |
973 } | 973 } |
974 | 974 |
975 Holder _registerStaticStateHolder() { | 975 Holder _registerStaticStateHolder() { |
976 return _registry.registerHolder(namer.staticStateHolder, | 976 return _registry.registerHolder(namer.staticStateHolder, |
977 isStaticStateHolder: true); | 977 isStaticStateHolder: true); |
978 } | 978 } |
979 } | 979 } |
OLD | NEW |