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

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

Issue 2826673002: 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
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();
629 resolutionEnqueuer.logSummary(reporter.log); 630 resolutionEnqueuer.logSummary(reporter.log);
630 631
631 _reporter.reportSuppressedMessagesSummary(); 632 _reporter.reportSuppressedMessagesSummary();
632 633
633 if (compilationFailed) { 634 if (compilationFailed) {
634 if (!options.generateCodeWithCompileTimeErrors) return; 635 if (!options.generateCodeWithCompileTimeErrors) return;
635 if (!backend 636 if (!backend
636 .enableCodegenWithErrorsIfSupported(NO_LOCATION_SPANNABLE)) { 637 .enableCodegenWithErrorsIfSupported(NO_LOCATION_SPANNABLE)) {
637 return; 638 return;
638 } 639 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 698
698 backend.onCodegenEnd(); 699 backend.onCodegenEnd();
699 700
700 checkQueues(resolutionEnqueuer, codegenEnqueuer); 701 checkQueues(resolutionEnqueuer, codegenEnqueuer);
701 }); 702 });
702 703
703 /// Perform the steps needed to fully end the resolution phase. 704 /// Perform the steps needed to fully end the resolution phase.
704 ClosedWorldRefiner closeResolution() { 705 ClosedWorldRefiner closeResolution() {
705 phase = PHASE_DONE_RESOLVING; 706 phase = PHASE_DONE_RESOLVING;
706 707
707 ClosedWorldImpl world = resolutionWorldBuilder.closeWorld(reporter); 708 ClosedWorldImpl world = resolutionWorldBuilder.closeWorld();
708 // Compute whole-program-knowledge that the backend needs. (This might 709 // Compute whole-program-knowledge that the backend needs. (This might
709 // require the information computed in [world.closeWorld].) 710 // require the information computed in [world.closeWorld].)
710 backend.onResolutionComplete(world, world); 711 backend.onResolutionComplete(world, world);
711 712
712 deferredLoadTask.onResolutionComplete(mainFunction); 713 deferredLoadTask.onResolutionComplete(mainFunction);
713 714
714 // TODO(johnniwinther): Move this after rti computation but before 715 // TODO(johnniwinther): Move this after rti computation but before
715 // reflection members computation, and (re-)close the world afterwards. 716 // reflection members computation, and (re-)close the world afterwards.
716 closureToClassMapper.createClosureClasses(world); 717 closureToClassMapper.createClosureClasses(world);
717 return world; 718 return world;
(...skipping 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after
1998 ResolutionFunctionType getLocalFunctionType(LocalFunctionElement function) { 1999 ResolutionFunctionType getLocalFunctionType(LocalFunctionElement function) {
1999 return function.type; 2000 return function.type;
2000 } 2001 }
2001 2002
2002 @override 2003 @override
2003 ResolutionDartType getUnaliasedType(ResolutionDartType type) { 2004 ResolutionDartType getUnaliasedType(ResolutionDartType type) {
2004 type.computeUnaliased(_resolution); 2005 type.computeUnaliased(_resolution);
2005 return type.unaliased; 2006 return type.unaliased;
2006 } 2007 }
2007 } 2008 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | pkg/compiler/lib/src/js_backend/backend.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698