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

Side by Side Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 1352533002: Enqueue superclasses instead of supertypes. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Unify native behavior processing Created 5 years, 2 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
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 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after
1020 Registry registry) { 1020 Registry registry) {
1021 assert(registry.isForResolution); 1021 assert(registry.isForResolution);
1022 ConstantValue constant = constants.getConstantValueForMetadata(metadata); 1022 ConstantValue constant = constants.getConstantValueForMetadata(metadata);
1023 registerCompileTimeConstant(constant, registry, addForEmission: false); 1023 registerCompileTimeConstant(constant, registry, addForEmission: false);
1024 metadataConstants.add(new Dependency(constant, annotatedElement)); 1024 metadataConstants.add(new Dependency(constant, annotatedElement));
1025 } 1025 }
1026 1026
1027 void registerInstantiatedClass(ClassElement cls, 1027 void registerInstantiatedClass(ClassElement cls,
1028 Enqueuer enqueuer, 1028 Enqueuer enqueuer,
1029 Registry registry) { 1029 Registry registry) {
1030 _processClass(cls, enqueuer, registry);
1031 }
1032
1033 void registerImplementedClass(ClassElement cls,
1034 Enqueuer enqueuer,
1035 Registry registry) {
1036 _processClass(cls, enqueuer, registry);
1037 }
1038
1039 void _processClass(ClassElement cls,
1040 Enqueuer enqueuer,
1041 Registry registry) {
1030 if (!cls.typeVariables.isEmpty) { 1042 if (!cls.typeVariables.isEmpty) {
1031 typeVariableHandler.registerClassWithTypeVariables(cls, enqueuer, 1043 typeVariableHandler.registerClassWithTypeVariables(cls, enqueuer,
1032 registry); 1044 registry);
1033 } 1045 }
1034 1046
1035 // Register any helper that will be needed by the backend. 1047 // Register any helper that will be needed by the backend.
1036 if (enqueuer.isResolutionQueue) { 1048 if (enqueuer.isResolutionQueue) {
1037 if (cls == compiler.intClass 1049 if (cls == compiler.intClass
1038 || cls == compiler.doubleClass 1050 || cls == compiler.doubleClass
1039 || cls == compiler.numClass) { 1051 || cls == compiler.numClass) {
(...skipping 2130 matching lines...) Expand 10 before | Expand all | Expand 10 after
3170 } 3182 }
3171 } 3183 }
3172 3184
3173 /// Records that [constant] is used by the element behind [registry]. 3185 /// Records that [constant] is used by the element behind [registry].
3174 class Dependency { 3186 class Dependency {
3175 final ConstantValue constant; 3187 final ConstantValue constant;
3176 final Element annotatedElement; 3188 final Element annotatedElement;
3177 3189
3178 const Dependency(this.constant, this.annotatedElement); 3190 const Dependency(this.constant, this.annotatedElement);
3179 } 3191 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/inferrer/concrete_types_inferrer.dart ('k') | pkg/compiler/lib/src/native/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698