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

Unified Diff: lib/compiler/implementation/compiler.dart

Issue 10990060: Added support for exports and re-exports. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Status updated. Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: lib/compiler/implementation/compiler.dart
diff --git a/lib/compiler/implementation/compiler.dart b/lib/compiler/implementation/compiler.dart
index 1841697b8e619677dcee013dc02cad30e7665877..aadb4a57b3d280902a684d109f5fbfe85ec2f35f 100644
--- a/lib/compiler/implementation/compiler.dart
+++ b/lib/compiler/implementation/compiler.dart
@@ -161,6 +161,7 @@ abstract class Compiler implements DiagnosticListener {
DietParserTask dietParser;
ParserTask parser;
PatchParserTask patchParser;
+ LibraryLoader libraryLoader;
TreeValidatorTask validator;
ResolverTask resolver;
closureMapping.ClosureTask closureToClassMapper;
@@ -205,6 +206,7 @@ abstract class Compiler implements DiagnosticListener {
dietParser = new DietParserTask(this);
parser = new ParserTask(this);
patchParser = new PatchParserTask(this);
+ libraryLoader = new LibraryLoaderTask(this);
validator = new TreeValidatorTask(this);
resolver = new ResolverTask(this);
closureToClassMapper = new closureMapping.ClosureTask(this);
@@ -388,31 +390,12 @@ abstract class Compiler implements DiagnosticListener {
void loadCoreImplLibrary() {
Uri coreImplUri = new Uri.fromComponents(scheme: 'dart', path: 'coreimpl');
- coreImplLibrary = scanner.loadLibrary(coreImplUri, null, coreImplUri);
+ coreImplLibrary = libraryLoader.loadLibrary(coreImplUri, null, coreImplUri);
}
void importHelperLibrary(LibraryElement library) {
if (jsHelperLibrary !== null) {
- scanner.importLibrary(library, jsHelperLibrary, null);
- }
- }
-
- void importCoreLibrary(LibraryElement library) {
- if (coreLibrary === null) {
- Uri coreUri = new Uri.fromComponents(scheme: 'dart', path: 'core');
- coreLibrary = scanner.loadLibrary(coreUri, null, coreUri);
- }
- scanner.importLibrary(library,
- coreLibrary,
- null,
- library.entryCompilationUnit);
- }
-
- void patchDartLibrary(LibraryElement library, String dartLibraryPath) {
- if (library.isPatched) return;
- Uri patchUri = resolvePatchUri(dartLibraryPath);
- if (patchUri !== null) {
- patchParser.patchLibrary(patchUri, library);
+ LibraryLoader.importLibrary(this, library, jsHelperLibrary, null);
Lasse Reichstein Nielsen 2012/10/10 08:07:33 capital 'L'?
Johnni Winther 2012/10/10 09:20:59 Done.
}
}
@@ -459,7 +442,7 @@ abstract class Compiler implements DiagnosticListener {
void runCompiler(Uri uri) {
log('compiling $uri ($BUILD_ID)');
scanBuiltinLibraries();
- mainApp = scanner.loadLibrary(uri, null, uri);
+ mainApp = libraryLoader.loadLibrary(uri, null, uri);
libraries.forEach((_, library) {
maybeEnableJSHelper(library);
});
@@ -855,5 +838,8 @@ bool invariant(Spannable spannable, var condition, {String message: null}) {
if (condition is Function){
condition = condition();
}
+ if (!condition) {
+ print('assertion failed: $message');
+ }
return spannable != null && condition;
}

Powered by Google App Engine
This is Rietveld 408576698