OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 part of dart2js.js_emitter; | 5 part of dart2js.js_emitter; |
6 | 6 |
7 /** | 7 /** |
8 * Generates the code for all used classes in the program. Static fields (even | 8 * Generates the code for all used classes in the program. Static fields (even |
9 * in classes) are ignored, since they can be treated as non-class elements. | 9 * in classes) are ignored, since they can be treated as non-class elements. |
10 * | 10 * |
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
793 unneededClasses.add(interceptor); | 793 unneededClasses.add(interceptor); |
794 } | 794 } |
795 } | 795 } |
796 | 796 |
797 // These classes are just helpers for the backend's type system. | 797 // These classes are just helpers for the backend's type system. |
798 unneededClasses.add(backend.jsMutableArrayClass); | 798 unneededClasses.add(backend.jsMutableArrayClass); |
799 unneededClasses.add(backend.jsFixedArrayClass); | 799 unneededClasses.add(backend.jsFixedArrayClass); |
800 unneededClasses.add(backend.jsExtendableArrayClass); | 800 unneededClasses.add(backend.jsExtendableArrayClass); |
801 unneededClasses.add(backend.jsUInt32Class); | 801 unneededClasses.add(backend.jsUInt32Class); |
802 unneededClasses.add(backend.jsUInt31Class); | 802 unneededClasses.add(backend.jsUInt31Class); |
| 803 unneededClasses.add(backend.jsPositiveIntClass); |
803 | 804 |
804 return (ClassElement cls) => !unneededClasses.contains(cls); | 805 return (ClassElement cls) => !unneededClasses.contains(cls); |
805 } | 806 } |
806 | 807 |
807 void emitFinishClassesInvocationIfNecessary(CodeBuffer buffer) { | 808 void emitFinishClassesInvocationIfNecessary(CodeBuffer buffer) { |
808 if (needsDefineClass) { | 809 if (needsDefineClass) { |
809 buffer.write('$finishClassesName($classesCollector,' | 810 buffer.write('$finishClassesName($classesCollector,' |
810 '$_$isolateProperties,' | 811 '$_$isolateProperties,' |
811 '${_}null)$N'); | 812 '${_}null)$N'); |
812 | 813 |
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1599 } | 1600 } |
1600 | 1601 |
1601 bool isDeferred(Element element) { | 1602 bool isDeferred(Element element) { |
1602 return compiler.deferredLoadTask.isDeferred(element); | 1603 return compiler.deferredLoadTask.isDeferred(element); |
1603 } | 1604 } |
1604 | 1605 |
1605 bool get areAnyElementsDeferred { | 1606 bool get areAnyElementsDeferred { |
1606 return compiler.deferredLoadTask.areAnyElementsDeferred; | 1607 return compiler.deferredLoadTask.areAnyElementsDeferred; |
1607 } | 1608 } |
1608 } | 1609 } |
OLD | NEW |