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

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

Issue 1180973003: dart2js cps: Support function types in 'is' and 'as' operators. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update doc comment for TypeCast Created 5 years, 6 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 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1178 1178
1179 void registerClosureWithFreeTypeVariables( 1179 void registerClosureWithFreeTypeVariables(
1180 Element closure, 1180 Element closure,
1181 Enqueuer enqueuer, 1181 Enqueuer enqueuer,
1182 Registry registry) { 1182 Registry registry) {
1183 if (enqueuer.isResolutionQueue || methodNeedsRti(closure)) { 1183 if (enqueuer.isResolutionQueue || methodNeedsRti(closure)) {
1184 registerComputeSignature(enqueuer, registry); 1184 registerComputeSignature(enqueuer, registry);
1185 } 1185 }
1186 } 1186 }
1187 1187
1188 /// Call during codegen if an instance of [closure] is being created.
1189 void registerInstantiatedClosure(LocalFunctionElement closure,
1190 CodegenRegistry registry) {
1191 if (methodNeedsRti(closure)) {
1192 registerComputeSignature(compiler.enqueuer.codegen, registry);
1193 }
1194 }
1195
1188 void registerBoundClosure(Enqueuer enqueuer) { 1196 void registerBoundClosure(Enqueuer enqueuer) {
1189 boundClosureClass.ensureResolved(compiler); 1197 boundClosureClass.ensureResolved(compiler);
1190 enqueuer.registerInstantiatedType( 1198 enqueuer.registerInstantiatedType(
1191 boundClosureClass.rawType, 1199 boundClosureClass.rawType,
1192 // Precise dependency is not important here. 1200 // Precise dependency is not important here.
1193 compiler.globalDependencies); 1201 compiler.globalDependencies);
1194 } 1202 }
1195 1203
1196 void registerGetOfStaticFunction(Enqueuer enqueuer) { 1204 void registerGetOfStaticFunction(Enqueuer enqueuer) {
1197 closureClass.ensureResolved(compiler); 1205 closureClass.ensureResolved(compiler);
(...skipping 1777 matching lines...) Expand 10 before | Expand all | Expand 10 after
2975 } 2983 }
2976 } 2984 }
2977 2985
2978 /// Records that [constant] is used by the element behind [registry]. 2986 /// Records that [constant] is used by the element behind [registry].
2979 class Dependency { 2987 class Dependency {
2980 final ConstantValue constant; 2988 final ConstantValue constant;
2981 final Element annotatedElement; 2989 final Element annotatedElement;
2982 2990
2983 const Dependency(this.constant, this.annotatedElement); 2991 const Dependency(this.constant, this.annotatedElement);
2984 } 2992 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/type_propagation.dart ('k') | pkg/compiler/lib/src/js_backend/codegen/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698