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

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

Issue 2828873002: Revert "Remove JavaScriptBackend from ClosedWorldBase" (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/backend.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 'closure.dart' as closureMapping show ClosureTask; 10 import 'closure.dart' as closureMapping show ClosureTask;
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 resolveLibraryMetadata(); 619 resolveLibraryMetadata();
620 reporter.log('Resolving...'); 620 reporter.log('Resolving...');
621 MethodElement mainMethod; 621 MethodElement mainMethod;
622 if (mainFunction != null && !mainFunction.isMalformed) { 622 if (mainFunction != null && !mainFunction.isMalformed) {
623 mainFunction.computeType(resolution); 623 mainFunction.computeType(resolution);
624 mainMethod = mainFunction; 624 mainMethod = mainFunction;
625 } 625 }
626 626
627 processQueue(resolutionEnqueuer, mainMethod, libraryLoader.libraries, 627 processQueue(resolutionEnqueuer, mainMethod, libraryLoader.libraries,
628 onProgress: showResolutionProgress); 628 onProgress: showResolutionProgress);
629 backend.onResolutionEnd();
630 resolutionEnqueuer.logSummary(reporter.log); 629 resolutionEnqueuer.logSummary(reporter.log);
631 630
632 _reporter.reportSuppressedMessagesSummary(); 631 _reporter.reportSuppressedMessagesSummary();
633 632
634 if (compilationFailed) { 633 if (compilationFailed) {
635 if (!options.generateCodeWithCompileTimeErrors) return; 634 if (!options.generateCodeWithCompileTimeErrors) return;
636 if (!backend 635 if (!backend
637 .enableCodegenWithErrorsIfSupported(NO_LOCATION_SPANNABLE)) { 636 .enableCodegenWithErrorsIfSupported(NO_LOCATION_SPANNABLE)) {
638 return; 637 return;
639 } 638 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 697
699 backend.onCodegenEnd(); 698 backend.onCodegenEnd();
700 699
701 checkQueues(resolutionEnqueuer, codegenEnqueuer); 700 checkQueues(resolutionEnqueuer, codegenEnqueuer);
702 }); 701 });
703 702
704 /// Perform the steps needed to fully end the resolution phase. 703 /// Perform the steps needed to fully end the resolution phase.
705 ClosedWorldRefiner closeResolution() { 704 ClosedWorldRefiner closeResolution() {
706 phase = PHASE_DONE_RESOLVING; 705 phase = PHASE_DONE_RESOLVING;
707 706
708 ClosedWorldImpl world = resolutionWorldBuilder.closeWorld(); 707 ClosedWorldImpl world = resolutionWorldBuilder.closeWorld(reporter);
709 // Compute whole-program-knowledge that the backend needs. (This might 708 // Compute whole-program-knowledge that the backend needs. (This might
710 // require the information computed in [world.closeWorld].) 709 // require the information computed in [world.closeWorld].)
711 backend.onResolutionClosedWorld(world, world); 710 backend.onResolutionComplete(world, world);
712 711
713 deferredLoadTask.onResolutionComplete(mainFunction); 712 deferredLoadTask.onResolutionComplete(mainFunction);
714 713
715 // TODO(johnniwinther): Move this after rti computation but before 714 // TODO(johnniwinther): Move this after rti computation but before
716 // reflection members computation, and (re-)close the world afterwards. 715 // reflection members computation, and (re-)close the world afterwards.
717 closureToClassMapper.createClosureClasses(world); 716 closureToClassMapper.createClosureClasses(world);
718 return world; 717 return world;
719 } 718 }
720 719
721 /// Compute the [WorldImpact] for accessing all elements in [library]. 720 /// Compute the [WorldImpact] for accessing all elements in [library].
(...skipping 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after
1999 ResolutionFunctionType getLocalFunctionType(LocalFunctionElement function) { 1998 ResolutionFunctionType getLocalFunctionType(LocalFunctionElement function) {
2000 return function.type; 1999 return function.type;
2001 } 2000 }
2002 2001
2003 @override 2002 @override
2004 ResolutionDartType getUnaliasedType(ResolutionDartType type) { 2003 ResolutionDartType getUnaliasedType(ResolutionDartType type) {
2005 type.computeUnaliased(_resolution); 2004 type.computeUnaliased(_resolution);
2006 return type.unaliased; 2005 return type.unaliased;
2007 } 2006 }
2008 } 2007 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698