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

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

Issue 1918903004: Make support for async/await syntax optional in the frontend. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 EMPTY_VALUE, 220 EMPTY_VALUE,
221 TYPEVARIABLE_REFERENCE, // Reference to a type in reflection data. 221 TYPEVARIABLE_REFERENCE, // Reference to a type in reflection data.
222 NAME 222 NAME
223 } 223 }
224 224
225 class JavaScriptBackend extends Backend { 225 class JavaScriptBackend extends Backend {
226 String get patchVersion => emitter.patchVersion; 226 String get patchVersion => emitter.patchVersion;
227 227
228 bool get supportsReflection => emitter.emitter.supportsReflection; 228 bool get supportsReflection => emitter.emitter.supportsReflection;
229 229
230 bool get supportsAsyncAwait => true;
231
230 final Annotations annotations; 232 final Annotations annotations;
231 233
232 /// Set of classes that need to be considered for reflection although not 234 /// Set of classes that need to be considered for reflection although not
233 /// otherwise visible during resolution. 235 /// otherwise visible during resolution.
234 Iterable<ClassElement> get classesRequiredForReflection { 236 Iterable<ClassElement> get classesRequiredForReflection {
235 // TODO(herhut): Clean this up when classes needed for rti are tracked. 237 // TODO(herhut): Clean this up when classes needed for rti are tracked.
236 return [helpers.closureClass, helpers.jsIndexableClass]; 238 return [helpers.closureClass, helpers.jsIndexableClass];
237 } 239 }
238 240
239 FunctionCompiler functionCompiler; 241 FunctionCompiler functionCompiler;
(...skipping 2776 matching lines...) Expand 10 before | Expand all | Expand 10 after
3016 3018
3017 @override 3019 @override
3018 void onImpactUsed(ImpactUseCase impactUse) { 3020 void onImpactUsed(ImpactUseCase impactUse) {
3019 if (impactUse == DeferredLoadTask.IMPACT_USE && !supportSerialization) { 3021 if (impactUse == DeferredLoadTask.IMPACT_USE && !supportSerialization) {
3020 // TODO(johnniwinther): Allow emptying when serialization has been 3022 // TODO(johnniwinther): Allow emptying when serialization has been
3021 // performed. 3023 // performed.
3022 resolution.emptyCache(); 3024 resolution.emptyCache();
3023 } 3025 }
3024 } 3026 }
3025 } 3027 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698