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

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

Issue 2826673002: Remove JavaScriptBackend from ClosedWorldBase (Closed)
Patch Set: Fix 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 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 resolveLibraryMetadata(); 625 resolveLibraryMetadata();
626 reporter.log('Resolving...'); 626 reporter.log('Resolving...');
627 MethodElement mainMethod; 627 MethodElement mainMethod;
628 if (mainFunction != null && !mainFunction.isMalformed) { 628 if (mainFunction != null && !mainFunction.isMalformed) {
629 mainFunction.computeType(resolution); 629 mainFunction.computeType(resolution);
630 mainMethod = mainFunction; 630 mainMethod = mainFunction;
631 } 631 }
632 632
633 processQueue(resolutionEnqueuer, mainMethod, libraryLoader.libraries, 633 processQueue(resolutionEnqueuer, mainMethod, libraryLoader.libraries,
634 onProgress: showResolutionProgress); 634 onProgress: showResolutionProgress);
635 backend.onResolutionEnd();
635 resolutionEnqueuer.logSummary(reporter.log); 636 resolutionEnqueuer.logSummary(reporter.log);
636 637
637 _reporter.reportSuppressedMessagesSummary(); 638 _reporter.reportSuppressedMessagesSummary();
638 639
639 if (compilationFailed) { 640 if (compilationFailed) {
640 if (!options.generateCodeWithCompileTimeErrors) return; 641 if (!options.generateCodeWithCompileTimeErrors) return;
641 if (!backend 642 if (!backend
642 .enableCodegenWithErrorsIfSupported(NO_LOCATION_SPANNABLE)) { 643 .enableCodegenWithErrorsIfSupported(NO_LOCATION_SPANNABLE)) {
643 return; 644 return;
644 } 645 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 693
693 backend.onCodegenEnd(); 694 backend.onCodegenEnd();
694 695
695 checkQueues(resolutionEnqueuer, codegenEnqueuer); 696 checkQueues(resolutionEnqueuer, codegenEnqueuer);
696 }); 697 });
697 698
698 /// Perform the steps needed to fully end the resolution phase. 699 /// Perform the steps needed to fully end the resolution phase.
699 ClosedWorldRefiner closeResolution() { 700 ClosedWorldRefiner closeResolution() {
700 phase = PHASE_DONE_RESOLVING; 701 phase = PHASE_DONE_RESOLVING;
701 702
702 ClosedWorldImpl world = resolutionWorldBuilder.closeWorld(reporter); 703 ClosedWorldImpl world = resolutionWorldBuilder.closeWorld();
703 // Compute whole-program-knowledge that the backend needs. (This might 704 // Compute whole-program-knowledge that the backend needs. (This might
704 // require the information computed in [world.closeWorld].) 705 // require the information computed in [world.closeWorld].)
705 backend.onResolutionComplete(world, world); 706 backend.onResolutionClosedWorld(world, world);
706 707
707 deferredLoadTask.onResolutionComplete(mainFunction); 708 deferredLoadTask.onResolutionComplete(mainFunction);
708 709
709 // TODO(johnniwinther): Move this after rti computation but before 710 // TODO(johnniwinther): Move this after rti computation but before
710 // reflection members computation, and (re-)close the world afterwards. 711 // reflection members computation, and (re-)close the world afterwards.
711 closureToClassMapper.createClosureClasses(world); 712 closureToClassMapper.createClosureClasses(world);
712 return world; 713 return world;
713 } 714 }
714 715
715 /// Compute the [WorldImpact] for accessing all elements in [library]. 716 /// Compute the [WorldImpact] for accessing all elements in [library].
(...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1958 ResolutionFunctionType getLocalFunctionType(LocalFunctionElement function) { 1959 ResolutionFunctionType getLocalFunctionType(LocalFunctionElement function) {
1959 return function.type; 1960 return function.type;
1960 } 1961 }
1961 1962
1962 @override 1963 @override
1963 ResolutionDartType getUnaliasedType(ResolutionDartType type) { 1964 ResolutionDartType getUnaliasedType(ResolutionDartType type) {
1964 type.computeUnaliased(_resolution); 1965 type.computeUnaliased(_resolution);
1965 return type.unaliased; 1966 return type.unaliased;
1966 } 1967 }
1967 } 1968 }
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