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

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

Issue 1932183003: Handle deserialized compilation of closures (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 2489 matching lines...) Expand 10 before | Expand all | Expand 10 after
2500 JSFrontendAccess(this.compiler); 2500 JSFrontendAccess(this.compiler);
2501 2501
2502 Resolution get resolution => compiler.resolution; 2502 Resolution get resolution => compiler.resolution;
2503 2503
2504 @override 2504 @override
2505 ResolutionImpact getResolutionImpact(Element element) { 2505 ResolutionImpact getResolutionImpact(Element element) {
2506 return resolution.getResolutionImpact(element); 2506 return resolution.getResolutionImpact(element);
2507 } 2507 }
2508 2508
2509 @override 2509 @override
2510 bool hasResolvedAst(Element element) {
2511 if (element is SynthesizedCallMethodElementX) {
2512 return true;
2513 } else if (element is ConstructorBodyElementX) {
2514 return true;
2515 } else if (element is FieldElementX) {
2516 return true;
2517 } else {
2518 return resolution.hasResolvedAst(element);
2519 }
2520 }
2521
2522 @override
2510 ResolvedAst getResolvedAst(Element element) { 2523 ResolvedAst getResolvedAst(Element element) {
2511 if (element is SynthesizedCallMethodElementX) { 2524 if (element is SynthesizedCallMethodElementX) {
2512 return element.resolvedAst; 2525 return element.resolvedAst;
2513 } else if (element is ConstructorBodyElementX) { 2526 } else if (element is ConstructorBodyElementX) {
2514 return element.resolvedAst; 2527 return element.resolvedAst;
2515 } else if (element is FieldElementX) { 2528 } else if (element is FieldElementX) {
2516 // TODO(johnniwinther): Find a good invariant for resolution of fields. 2529 // TODO(johnniwinther): Find a good invariant for resolution of fields.
2517 // Currently some but not all are resolved (maybe it has to do with 2530 // Currently some but not all are resolved (maybe it has to do with
2518 // initializers?) 2531 // initializers?)
2519 return element.resolvedAst; 2532 return element.resolvedAst;
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
3026 3039
3027 @override 3040 @override
3028 void onImpactUsed(ImpactUseCase impactUse) { 3041 void onImpactUsed(ImpactUseCase impactUse) {
3029 if (impactUse == DeferredLoadTask.IMPACT_USE && !supportSerialization) { 3042 if (impactUse == DeferredLoadTask.IMPACT_USE && !supportSerialization) {
3030 // TODO(johnniwinther): Allow emptying when serialization has been 3043 // TODO(johnniwinther): Allow emptying when serialization has been
3031 // performed. 3044 // performed.
3032 resolution.emptyCache(); 3045 resolution.emptyCache();
3033 } 3046 }
3034 } 3047 }
3035 } 3048 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698