| 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 js_backend; | 5 part of js_backend; |
| 6 | 6 |
| 7 class JavaScriptItemCompilationContext extends ItemCompilationContext { | 7 class JavaScriptItemCompilationContext extends ItemCompilationContext { |
| 8 final Set<HInstruction> boundsChecked; | 8 final Set<HInstruction> boundsChecked; |
| 9 | 9 |
| 10 JavaScriptItemCompilationContext() | 10 JavaScriptItemCompilationContext() |
| (...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 DartType type = constant.computeType(compiler); | 750 DartType type = constant.computeType(compiler); |
| 751 registerInstantiatedConstantType(type, elements); | 751 registerInstantiatedConstantType(type, elements); |
| 752 | 752 |
| 753 if (constant.isFunction()) { | 753 if (constant.isFunction()) { |
| 754 FunctionConstant function = constant; | 754 FunctionConstant function = constant; |
| 755 compiler.enqueuer.codegen.registerGetOfStaticFunction(function.element); | 755 compiler.enqueuer.codegen.registerGetOfStaticFunction(function.element); |
| 756 } else if (constant.isInterceptor()) { | 756 } else if (constant.isInterceptor()) { |
| 757 // An interceptor constant references the class's prototype chain. | 757 // An interceptor constant references the class's prototype chain. |
| 758 InterceptorConstant interceptor = constant; | 758 InterceptorConstant interceptor = constant; |
| 759 registerInstantiatedConstantType(interceptor.dispatchedType, elements); | 759 registerInstantiatedConstantType(interceptor.dispatchedType, elements); |
| 760 } else if (constant.isType()) { |
| 761 TypeConstant typeConstant = constant; |
| 762 registerTypeLiteral(typeConstant.representedType.element, |
| 763 compiler.enqueuer.codegen, elements); |
| 760 } | 764 } |
| 761 } | 765 } |
| 762 | 766 |
| 763 void registerInstantiatedConstantType(DartType type, TreeElements elements) { | 767 void registerInstantiatedConstantType(DartType type, TreeElements elements) { |
| 764 Enqueuer enqueuer = compiler.enqueuer.codegen; | 768 Enqueuer enqueuer = compiler.enqueuer.codegen; |
| 765 enqueuer.registerInstantiatedType(type, elements); | 769 enqueuer.registerInstantiatedType(type, elements); |
| 766 if (type is InterfaceType && !type.treatAsRaw && | 770 if (type is InterfaceType && !type.treatAsRaw && |
| 767 classNeedsRti(type.element)) { | 771 classNeedsRti(type.element)) { |
| 768 enqueuer.registerStaticUse(getSetRuntimeTypeInfo()); | 772 enqueuer.registerStaticUse(getSetRuntimeTypeInfo()); |
| 769 } | 773 } |
| (...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1854 copy(constant.values); | 1858 copy(constant.values); |
| 1855 copy(constant.protoValue); | 1859 copy(constant.protoValue); |
| 1856 copy(constant); | 1860 copy(constant); |
| 1857 } | 1861 } |
| 1858 | 1862 |
| 1859 void visitConstructed(ConstructedConstant constant) { | 1863 void visitConstructed(ConstructedConstant constant) { |
| 1860 copy(constant.fields); | 1864 copy(constant.fields); |
| 1861 copy(constant); | 1865 copy(constant); |
| 1862 } | 1866 } |
| 1863 } | 1867 } |
| OLD | NEW |