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 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
939 } | 939 } |
940 | 940 |
941 void registerCheckDeferredIsLoaded(Registry registry) { | 941 void registerCheckDeferredIsLoaded(Registry registry) { |
942 enqueueInResolution(getCheckDeferredIsLoaded(), registry); | 942 enqueueInResolution(getCheckDeferredIsLoaded(), registry); |
943 // Also register the types of the arguments passed to this method. | 943 // Also register the types of the arguments passed to this method. |
944 enqueueClass(compiler.enqueuer.resolution, compiler.stringClass, registry); | 944 enqueueClass(compiler.enqueuer.resolution, compiler.stringClass, registry); |
945 } | 945 } |
946 | 946 |
947 void enableNoSuchMethod(context, Enqueuer world) { | 947 void enableNoSuchMethod(context, Enqueuer world) { |
948 enqueue(world, getCreateInvocationMirror(), compiler.globalDependencies); | 948 enqueue(world, getCreateInvocationMirror(), compiler.globalDependencies); |
949 world.registerInvocation(context, compiler.noSuchMethodSelector); | 949 world.registerInvocation(compiler.noSuchMethodSelector); |
950 } | 950 } |
951 | 951 |
952 void enableIsolateSupport(Enqueuer enqueuer) { | 952 void enableIsolateSupport(Enqueuer enqueuer) { |
953 if (enqueuer.isResolutionQueue) { | 953 if (enqueuer.isResolutionQueue) { |
954 for (String name in const [START_ROOT_ISOLATE, | 954 for (String name in const [START_ROOT_ISOLATE, |
955 '_currentIsolate', | 955 '_currentIsolate', |
956 '_callInIsolate']) { | 956 '_callInIsolate']) { |
957 Element element = find(isolateHelperLibrary, name); | 957 Element element = find(isolateHelperLibrary, name); |
958 enqueuer.addToWorkList(element); | 958 enqueuer.addToWorkList(element); |
959 compiler.globalDependencies.registerDependency(element); | 959 compiler.globalDependencies.registerDependency(element); |
(...skipping 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2311 } | 2311 } |
2312 | 2312 |
2313 /// Records that [constant] is used by the element behind [registry]. | 2313 /// Records that [constant] is used by the element behind [registry]. |
2314 class Dependency { | 2314 class Dependency { |
2315 final Constant constant; | 2315 final Constant constant; |
2316 // TODO(johnniwinther): Change to [Element] when dependency nodes are added. | 2316 // TODO(johnniwinther): Change to [Element] when dependency nodes are added. |
2317 final Registry registry; | 2317 final Registry registry; |
2318 | 2318 |
2319 const Dependency(this.constant, this.registry); | 2319 const Dependency(this.constant, this.registry); |
2320 } | 2320 } |
OLD | NEW |