| 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 const VERBOSE_OPTIMIZER_HINTS = false; | 7 const VERBOSE_OPTIMIZER_HINTS = false; |
| 8 | 8 |
| 9 class JavaScriptItemCompilationContext extends ItemCompilationContext { | 9 class JavaScriptItemCompilationContext extends ItemCompilationContext { |
| 10 final Set<HInstruction> boundsChecked = new Set<HInstruction>(); | 10 final Set<HInstruction> boundsChecked = new Set<HInstruction>(); |
| (...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1058 void registerAbstractClassInstantiation(TreeElements elements) { | 1058 void registerAbstractClassInstantiation(TreeElements elements) { |
| 1059 enqueueInResolution(getThrowAbstractClassInstantiationError(), elements); | 1059 enqueueInResolution(getThrowAbstractClassInstantiationError(), elements); |
| 1060 // Also register the types of the arguments passed to this method. | 1060 // Also register the types of the arguments passed to this method. |
| 1061 enqueueClass(compiler.enqueuer.resolution, compiler.stringClass, elements); | 1061 enqueueClass(compiler.enqueuer.resolution, compiler.stringClass, elements); |
| 1062 } | 1062 } |
| 1063 | 1063 |
| 1064 void registerFallThroughError(TreeElements elements) { | 1064 void registerFallThroughError(TreeElements elements) { |
| 1065 enqueueInResolution(getFallThroughError(), elements); | 1065 enqueueInResolution(getFallThroughError(), elements); |
| 1066 } | 1066 } |
| 1067 | 1067 |
| 1068 void registerCheckDeferredIsLoaded(TreeElements elements) { | |
| 1069 enqueueInResolution(getCheckDeferredIsLoaded(), elements); | |
| 1070 // Also register the types of the arguments passed to this method. | |
| 1071 enqueueClass(compiler.enqueuer.resolution, compiler.stringClass, elements); | |
| 1072 } | |
| 1073 | |
| 1074 void enableNoSuchMethod(Enqueuer world) { | 1068 void enableNoSuchMethod(Enqueuer world) { |
| 1075 enqueue(world, getCreateInvocationMirror(), compiler.globalDependencies); | 1069 enqueue(world, getCreateInvocationMirror(), compiler.globalDependencies); |
| 1076 world.registerInvocation(compiler.noSuchMethodSelector); | 1070 world.registerInvocation(compiler.noSuchMethodSelector); |
| 1077 } | 1071 } |
| 1078 | 1072 |
| 1079 void registerSuperNoSuchMethod(TreeElements elements) { | 1073 void registerSuperNoSuchMethod(TreeElements elements) { |
| 1080 enqueueInResolution(getCreateInvocationMirror(), elements); | 1074 enqueueInResolution(getCreateInvocationMirror(), elements); |
| 1081 enqueueInResolution( | 1075 enqueueInResolution( |
| 1082 compiler.objectClass.lookupLocalMember(Compiler.NO_SUCH_METHOD), | 1076 compiler.objectClass.lookupLocalMember(Compiler.NO_SUCH_METHOD), |
| 1083 elements); | 1077 elements); |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1525 } | 1519 } |
| 1526 | 1520 |
| 1527 Element getAssertSubtype() { | 1521 Element getAssertSubtype() { |
| 1528 return compiler.findHelper('assertSubtype'); | 1522 return compiler.findHelper('assertSubtype'); |
| 1529 } | 1523 } |
| 1530 | 1524 |
| 1531 Element getCheckSubtypeOfRuntimeType() { | 1525 Element getCheckSubtypeOfRuntimeType() { |
| 1532 return compiler.findHelper('checkSubtypeOfRuntimeType'); | 1526 return compiler.findHelper('checkSubtypeOfRuntimeType'); |
| 1533 } | 1527 } |
| 1534 | 1528 |
| 1535 Element getCheckDeferredIsLoaded() { | |
| 1536 return compiler.findHelper('checkDeferredIsLoaded'); | |
| 1537 } | |
| 1538 | |
| 1539 Element getAssertSubtypeOfRuntimeType() { | 1529 Element getAssertSubtypeOfRuntimeType() { |
| 1540 return compiler.findHelper('assertSubtypeOfRuntimeType'); | 1530 return compiler.findHelper('assertSubtypeOfRuntimeType'); |
| 1541 } | 1531 } |
| 1542 | 1532 |
| 1543 Element getThrowNoSuchMethod() { | 1533 Element getThrowNoSuchMethod() { |
| 1544 return compiler.findHelper('throwNoSuchMethod'); | 1534 return compiler.findHelper('throwNoSuchMethod'); |
| 1545 } | 1535 } |
| 1546 | 1536 |
| 1547 Element getCreateRuntimeType() { | 1537 Element getCreateRuntimeType() { |
| 1548 return compiler.findHelper('createRuntimeType'); | 1538 return compiler.findHelper('createRuntimeType'); |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1915 } | 1905 } |
| 1916 } | 1906 } |
| 1917 | 1907 |
| 1918 /// Records that [constant] is used by [user.element]. | 1908 /// Records that [constant] is used by [user.element]. |
| 1919 class Dependency { | 1909 class Dependency { |
| 1920 final Constant constant; | 1910 final Constant constant; |
| 1921 final TreeElements user; | 1911 final TreeElements user; |
| 1922 | 1912 |
| 1923 const Dependency(this.constant, this.user); | 1913 const Dependency(this.constant, this.user); |
| 1924 } | 1914 } |
| OLD | NEW |