OLD | NEW |
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 EventSink, Future; | 7 import 'dart:async' show EventSink, 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 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 | 671 |
672 ClosedWorldRefiner closedWorldRefiner = closeResolution(); | 672 ClosedWorldRefiner closedWorldRefiner = closeResolution(); |
673 ClosedWorld closedWorld = closedWorldRefiner.closedWorld; | 673 ClosedWorld closedWorld = closedWorldRefiner.closedWorld; |
674 | 674 |
675 reporter.log('Inferring types...'); | 675 reporter.log('Inferring types...'); |
676 globalInference.runGlobalTypeInference( | 676 globalInference.runGlobalTypeInference( |
677 mainFunction, closedWorld, closedWorldRefiner); | 677 mainFunction, closedWorld, closedWorldRefiner); |
678 | 678 |
679 if (stopAfterTypeInference) return; | 679 if (stopAfterTypeInference) return; |
680 | 680 |
681 backend.onTypeInferenceComplete(); | 681 backend.onTypeInferenceComplete(globalInference.results); |
682 | 682 |
683 reporter.log('Compiling...'); | 683 reporter.log('Compiling...'); |
684 phase = PHASE_COMPILING; | 684 phase = PHASE_COMPILING; |
685 | 685 |
686 Enqueuer codegenEnqueuer = enqueuer.createCodegenEnqueuer(closedWorld); | 686 Enqueuer codegenEnqueuer = enqueuer.createCodegenEnqueuer(closedWorld); |
687 _codegenWorldBuilder = codegenEnqueuer.worldBuilder; | 687 _codegenWorldBuilder = codegenEnqueuer.worldBuilder; |
688 codegenEnqueuer.applyImpact( | 688 codegenEnqueuer.applyImpact( |
689 backend.onCodegenStart(closedWorld, _codegenWorldBuilder)); | 689 backend.onCodegenStart(closedWorld, _codegenWorldBuilder)); |
690 if (compileAll) { | 690 if (compileAll) { |
691 libraryLoader.libraries.forEach((LibraryElement library) { | 691 libraryLoader.libraries.forEach((LibraryElement library) { |
(...skipping 1270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1962 if (library != null && library.isSynthesized) { | 1962 if (library != null && library.isSynthesized) { |
1963 return null; | 1963 return null; |
1964 } | 1964 } |
1965 if (library == null && required) { | 1965 if (library == null && required) { |
1966 throw new SpannableAssertionFailure( | 1966 throw new SpannableAssertionFailure( |
1967 library, "The library '${uri}' was not found."); | 1967 library, "The library '${uri}' was not found."); |
1968 } | 1968 } |
1969 return library; | 1969 return library; |
1970 } | 1970 } |
1971 } | 1971 } |
OLD | NEW |