| 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 885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 896 enqueueInResolution(helper.getElement(compiler), elements); | 896 enqueueInResolution(helper.getElement(compiler), elements); |
| 897 // We also need the native variant of the check (for DOM types). | 897 // We also need the native variant of the check (for DOM types). |
| 898 helper = getNativeCheckedModeHelper(type, typeCast: true); | 898 helper = getNativeCheckedModeHelper(type, typeCast: true); |
| 899 if (helper != null) { | 899 if (helper != null) { |
| 900 enqueueInResolution(helper.getElement(compiler), elements); | 900 enqueueInResolution(helper.getElement(compiler), elements); |
| 901 } | 901 } |
| 902 } | 902 } |
| 903 | 903 |
| 904 void registerThrowNoSuchMethod(TreeElements elements) { | 904 void registerThrowNoSuchMethod(TreeElements elements) { |
| 905 enqueueInResolution(getThrowNoSuchMethod(), elements); | 905 enqueueInResolution(getThrowNoSuchMethod(), elements); |
| 906 // Also register the types of the arguments passed to this method. |
| 907 compiler.enqueuer.resolution.registerInstantiatedClass( |
| 908 compiler.listClass, elements); |
| 909 compiler.enqueuer.resolution.registerInstantiatedClass( |
| 910 compiler.stringClass, elements); |
| 906 } | 911 } |
| 907 | 912 |
| 908 void registerThrowRuntimeError(TreeElements elements) { | 913 void registerThrowRuntimeError(TreeElements elements) { |
| 909 enqueueInResolution(getThrowRuntimeError(), elements); | 914 enqueueInResolution(getThrowRuntimeError(), elements); |
| 915 // Also register the types of the arguments passed to this method. |
| 916 compiler.enqueuer.resolution.registerInstantiatedClass( |
| 917 compiler.stringClass, elements); |
| 910 } | 918 } |
| 911 | 919 |
| 912 void registerAbstractClassInstantiation(TreeElements elements) { | 920 void registerAbstractClassInstantiation(TreeElements elements) { |
| 913 enqueueInResolution(getThrowAbstractClassInstantiationError(), elements); | 921 enqueueInResolution(getThrowAbstractClassInstantiationError(), elements); |
| 922 // Also register the types of the arguments passed to this method. |
| 923 compiler.enqueuer.resolution.registerInstantiatedClass( |
| 924 compiler.stringClass, elements); |
| 914 } | 925 } |
| 915 | 926 |
| 916 void registerFallThroughError(TreeElements elements) { | 927 void registerFallThroughError(TreeElements elements) { |
| 917 enqueueInResolution(getFallThroughError(), elements); | 928 enqueueInResolution(getFallThroughError(), elements); |
| 918 } | 929 } |
| 919 | 930 |
| 920 void registerSuperNoSuchMethod(TreeElements elements) { | 931 void registerSuperNoSuchMethod(TreeElements elements) { |
| 921 enqueueInResolution(getCreateInvocationMirror(), elements); | 932 enqueueInResolution(getCreateInvocationMirror(), elements); |
| 922 enqueueInResolution( | 933 enqueueInResolution( |
| 923 compiler.objectClass.lookupLocalMember(Compiler.NO_SUCH_METHOD), | 934 compiler.objectClass.lookupLocalMember(Compiler.NO_SUCH_METHOD), |
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1583 copy(constant.values); | 1594 copy(constant.values); |
| 1584 copy(constant.protoValue); | 1595 copy(constant.protoValue); |
| 1585 copy(constant); | 1596 copy(constant); |
| 1586 } | 1597 } |
| 1587 | 1598 |
| 1588 void visitConstructed(ConstructedConstant constant) { | 1599 void visitConstructed(ConstructedConstant constant) { |
| 1589 copy(constant.fields); | 1600 copy(constant.fields); |
| 1590 copy(constant); | 1601 copy(constant); |
| 1591 } | 1602 } |
| 1592 } | 1603 } |
| OLD | NEW |