Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart

Issue 382063002: Redo "Information about which functions require other functions is gathered in the enqueuer." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 } 835 }
836 if (TRACE_CALLS) { 836 if (TRACE_CALLS) {
837 traceHelper = findHelper('traceHelper'); 837 traceHelper = findHelper('traceHelper');
838 assert(traceHelper != null); 838 assert(traceHelper != null);
839 enqueueInResolution(traceHelper, registry); 839 enqueueInResolution(traceHelper, registry);
840 } 840 }
841 registerCheckedModeHelpers(registry); 841 registerCheckedModeHelpers(registry);
842 } 842 }
843 843
844 onResolutionComplete() { 844 onResolutionComplete() {
845 super.onResolutionComplete();
845 computeMembersNeededForReflection(); 846 computeMembersNeededForReflection();
846 rti.computeClassesNeedingRti(); 847 rti.computeClassesNeedingRti();
847 } 848 }
848 849
849 void registerGetRuntimeTypeArgument(Registry registry) { 850 void registerGetRuntimeTypeArgument(Registry registry) {
850 enqueueInResolution(getGetRuntimeTypeArgument(), registry); 851 enqueueInResolution(getGetRuntimeTypeArgument(), registry);
851 enqueueInResolution(getGetTypeArgumentByIndex(), registry); 852 enqueueInResolution(getGetTypeArgumentByIndex(), registry);
852 enqueueInResolution(getCopyTypeArguments(), registry); 853 enqueueInResolution(getCopyTypeArguments(), registry);
853 } 854 }
854 855
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 DartType bound) { 937 DartType bound) {
937 rti.registerTypeVariableBoundsSubtypeCheck(typeArgument, bound); 938 rti.registerTypeVariableBoundsSubtypeCheck(typeArgument, bound);
938 } 939 }
939 940
940 void registerCheckDeferredIsLoaded(Registry registry) { 941 void registerCheckDeferredIsLoaded(Registry registry) {
941 enqueueInResolution(getCheckDeferredIsLoaded(), registry); 942 enqueueInResolution(getCheckDeferredIsLoaded(), registry);
942 // Also register the types of the arguments passed to this method. 943 // Also register the types of the arguments passed to this method.
943 enqueueClass(compiler.enqueuer.resolution, compiler.stringClass, registry); 944 enqueueClass(compiler.enqueuer.resolution, compiler.stringClass, registry);
944 } 945 }
945 946
946 void enableNoSuchMethod(Enqueuer world) { 947 void enableNoSuchMethod(context, Enqueuer world) {
sigurdm 2014/08/19 06:51:15 DBC: Missing a type
Ty Overby (Google) 2014/08/19 19:44:13 Done.
947 enqueue(world, getCreateInvocationMirror(), compiler.globalDependencies); 948 enqueue(world, getCreateInvocationMirror(), compiler.globalDependencies);
948 world.registerInvocation(compiler.noSuchMethodSelector); 949 world.registerInvocation(context, compiler.noSuchMethodSelector);
949 } 950 }
950 951
951 void enableIsolateSupport(Enqueuer enqueuer) { 952 void enableIsolateSupport(Enqueuer enqueuer) {
952 if (enqueuer.isResolutionQueue) { 953 if (enqueuer.isResolutionQueue) {
953 for (String name in const [START_ROOT_ISOLATE, 954 for (String name in const [START_ROOT_ISOLATE,
954 '_currentIsolate', 955 '_currentIsolate',
955 '_callInIsolate']) { 956 '_callInIsolate']) {
956 Element element = find(isolateHelperLibrary, name); 957 Element element = find(isolateHelperLibrary, name);
957 enqueuer.addToWorkList(element); 958 enqueuer.addToWorkList(element);
958 compiler.globalDependencies.registerDependency(element); 959 compiler.globalDependencies.registerDependency(element);
(...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after
2302 } 2303 }
2303 2304
2304 /// Records that [constant] is used by the element behind [registry]. 2305 /// Records that [constant] is used by the element behind [registry].
2305 class Dependency { 2306 class Dependency {
2306 final Constant constant; 2307 final Constant constant;
2307 // TODO(johnniwinther): Change to [Element] when dependency nodes are added. 2308 // TODO(johnniwinther): Change to [Element] when dependency nodes are added.
2308 final Registry registry; 2309 final Registry registry;
2309 2310
2310 const Dependency(this.constant, this.registry); 2311 const Dependency(this.constant, this.registry);
2311 } 2312 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698