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

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

Issue 2875313002: Access BackendUsage through ClosedWorld (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/deferred_load.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 library dart2js.compiler_base; 5 library dart2js.compiler_base;
6 6
7 import 'dart:async' show Future; 7 import 'dart:async' show Future;
8 8
9 import '../compiler_new.dart' as api; 9 import '../compiler_new.dart' as api;
10 import 'backend_strategy.dart'; 10 import 'backend_strategy.dart';
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 ClosedWorldRefiner closeResolution() { 633 ClosedWorldRefiner closeResolution() {
634 phase = PHASE_DONE_RESOLVING; 634 phase = PHASE_DONE_RESOLVING;
635 635
636 ClosedWorld closedWorld = resolutionWorldBuilder.closeWorld(); 636 ClosedWorld closedWorld = resolutionWorldBuilder.closeWorld();
637 ClosedWorldRefiner closedWorldRefiner = 637 ClosedWorldRefiner closedWorldRefiner =
638 backendStrategy.createClosedWorldRefiner(closedWorld); 638 backendStrategy.createClosedWorldRefiner(closedWorld);
639 // Compute whole-program-knowledge that the backend needs. (This might 639 // Compute whole-program-knowledge that the backend needs. (This might
640 // require the information computed in [world.closeWorld].) 640 // require the information computed in [world.closeWorld].)
641 backend.onResolutionClosedWorld(closedWorld, closedWorldRefiner); 641 backend.onResolutionClosedWorld(closedWorld, closedWorldRefiner);
642 642
643 deferredLoadTask.onResolutionComplete(mainFunction); 643 deferredLoadTask.onResolutionComplete(mainFunction, closedWorld);
644 644
645 // TODO(johnniwinther): Move this after rti computation but before 645 // TODO(johnniwinther): Move this after rti computation but before
646 // reflection members computation, and (re-)close the world afterwards. 646 // reflection members computation, and (re-)close the world afterwards.
647 backendStrategy.convertClosures(closedWorldRefiner); 647 backendStrategy.convertClosures(closedWorldRefiner);
648 return closedWorldRefiner; 648 return closedWorldRefiner;
649 } 649 }
650 650
651 /// Compute the [WorldImpact] for accessing all elements in [library]. 651 /// Compute the [WorldImpact] for accessing all elements in [library].
652 WorldImpact computeImpactForLibrary(LibraryElement library) { 652 WorldImpact computeImpactForLibrary(LibraryElement library) {
653 WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl(); 653 WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl();
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1685 _ElementScanner(this.scanner); 1685 _ElementScanner(this.scanner);
1686 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); 1686 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library);
1687 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); 1687 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit);
1688 } 1688 }
1689 1689
1690 class _EmptyEnvironment implements Environment { 1690 class _EmptyEnvironment implements Environment {
1691 const _EmptyEnvironment(); 1691 const _EmptyEnvironment();
1692 1692
1693 String valueOf(String key) => null; 1693 String valueOf(String key) => null;
1694 } 1694 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/deferred_load.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698