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 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
936 DartType bound) { | 936 DartType bound) { |
937 rti.registerTypeVariableBoundsSubtypeCheck(typeArgument, bound); | 937 rti.registerTypeVariableBoundsSubtypeCheck(typeArgument, bound); |
938 } | 938 } |
939 | 939 |
940 void registerCheckDeferredIsLoaded(Registry registry) { | 940 void registerCheckDeferredIsLoaded(Registry registry) { |
941 enqueueInResolution(getCheckDeferredIsLoaded(), registry); | 941 enqueueInResolution(getCheckDeferredIsLoaded(), registry); |
942 // Also register the types of the arguments passed to this method. | 942 // Also register the types of the arguments passed to this method. |
943 enqueueClass(compiler.enqueuer.resolution, compiler.stringClass, registry); | 943 enqueueClass(compiler.enqueuer.resolution, compiler.stringClass, registry); |
944 } | 944 } |
945 | 945 |
946 void enableNoSuchMethod(context, Enqueuer world) { | 946 void enableNoSuchMethod(Element context, Enqueuer world) { |
947 enqueue(world, getCreateInvocationMirror(), compiler.globalDependencies); | 947 enqueue(world, getCreateInvocationMirror(), compiler.globalDependencies); |
948 world.registerInvocation(compiler.noSuchMethodSelector); | 948 world.registerInvocation(compiler.noSuchMethodSelector); |
949 // TODO(tyoverby) send the context element to DumpInfoTask to be | |
sigurdm
2014/08/20 08:37:47
another nit:
colon after the todo, and start sent
Ty Overby (Google)
2014/08/20 17:23:51
Done.
| |
950 // blamed. | |
949 } | 951 } |
950 | 952 |
951 void enableIsolateSupport(Enqueuer enqueuer) { | 953 void enableIsolateSupport(Enqueuer enqueuer) { |
952 if (enqueuer.isResolutionQueue) { | 954 if (enqueuer.isResolutionQueue) { |
953 for (String name in const [START_ROOT_ISOLATE, | 955 for (String name in const [START_ROOT_ISOLATE, |
954 '_currentIsolate', | 956 '_currentIsolate', |
955 '_callInIsolate']) { | 957 '_callInIsolate']) { |
956 Element element = find(isolateHelperLibrary, name); | 958 Element element = find(isolateHelperLibrary, name); |
957 enqueuer.addToWorkList(element); | 959 enqueuer.addToWorkList(element); |
958 compiler.globalDependencies.registerDependency(element); | 960 compiler.globalDependencies.registerDependency(element); |
(...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2317 } | 2319 } |
2318 } | 2320 } |
2319 | 2321 |
2320 /// Records that [constant] is used by the element behind [registry]. | 2322 /// Records that [constant] is used by the element behind [registry]. |
2321 class Dependency { | 2323 class Dependency { |
2322 final Constant constant; | 2324 final Constant constant; |
2323 final Element annotatedElement; | 2325 final Element annotatedElement; |
2324 | 2326 |
2325 const Dependency(this.constant, this.annotatedElement); | 2327 const Dependency(this.constant, this.annotatedElement); |
2326 } | 2328 } |
OLD | NEW |