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

Unified Diff: dart/pkg/compiler/lib/src/compiler.dart

Issue 841653004: Recover from read errors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r42871 Created 5 years, 11 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
« no previous file with comments | « dart/pkg/compiler/lib/src/apiimpl.dart ('k') | dart/pkg/compiler/lib/src/elements/modelx.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/pkg/compiler/lib/src/compiler.dart
diff --git a/dart/pkg/compiler/lib/src/compiler.dart b/dart/pkg/compiler/lib/src/compiler.dart
index c6fc23abdec20b5e700f67a43c99cc5172fead9e..dbf06e4f2fb3a86f89de6a5c6ab3dbf7228bcc4c 100644
--- a/dart/pkg/compiler/lib/src/compiler.dart
+++ b/dart/pkg/compiler/lib/src/compiler.dart
@@ -1378,7 +1378,8 @@ abstract class Compiler implements DiagnosticListener {
_coreTypes.iterableClass = lookupCoreClass('Iterable');
_coreTypes.symbolClass = lookupCoreClass('Symbol');
if (!missingCoreClasses.isEmpty) {
- internalError(coreLibrary,
+ internalError(
+ coreLibrary,
'dart:core library does not contain required classes: '
'$missingCoreClasses');
}
@@ -1437,11 +1438,7 @@ abstract class Compiler implements DiagnosticListener {
});
}
}).then((_) {
- if (!compilationFailed) {
- // TODO(johnniwinther): Reenable analysis of programs with load failures
- // when these are handled as erroneous libraries/compilation units.
- compileLoadedLibraries();
- }
+ compileLoadedLibraries();
});
}
@@ -1504,7 +1501,9 @@ abstract class Compiler implements DiagnosticListener {
mainFunction = errorElement;
}
}
- if (errorElement != null && errorElement.isSynthesized) {
+ if (errorElement != null &&
+ errorElement.isSynthesized &&
+ !mainApp.isSynthesized) {
reportWarning(
errorElement, errorElement.messageKind,
errorElement.messageArguments);
@@ -1924,6 +1923,13 @@ abstract class Compiler implements DiagnosticListener {
return null;
}
+ /// Compatible with [readScript] and used by [LibraryLoader] to create
+ /// synthetic scripts to recover from read errors and bad URIs.
+ Future<Script> synthesizeScript(Spannable node, Uri readableUri) {
+ unimplemented(node, 'Compiler.synthesizeScript');
+ return null;
+ }
+
Element lookupElementIn(ScopeContainerElement container, String name) {
Element element = container.localLookup(name);
if (element == null) {
« no previous file with comments | « dart/pkg/compiler/lib/src/apiimpl.dart ('k') | dart/pkg/compiler/lib/src/elements/modelx.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698