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

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

Issue 10704080: Revert "Make patch file import declarations apply to the patched library too." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 | « no previous file | lib/compiler/implementation/elements/elements.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/compiler.dart
diff --git a/lib/compiler/implementation/compiler.dart b/lib/compiler/implementation/compiler.dart
index 7dd7384e3f11ed35aa005e8fbfc20e8394551259..d0ce8490d7f965b52a6449ae312fac261557af21 100644
--- a/lib/compiler/implementation/compiler.dart
+++ b/lib/compiler/implementation/compiler.dart
@@ -269,11 +269,7 @@ class Compiler implements DiagnosticListener {
// do not have enough stack space.
throw;
} catch (var ex) {
- try {
- unhandledExceptionOnElement(element);
- } catch (var doubleFault) {
- // Ignoring exceptions in exception handling.
- }
+ unhandledExceptionOnElement(element);
throw;
} finally {
_currentElement = old;
@@ -529,10 +525,6 @@ class Compiler implements DiagnosticListener {
}
void applyLibraryPatch(LibraryElement library, LibraryElement patch) {
- // We allow foreign functions in patched libraries.
- addForeignFunctions(library); // Is safe even if already added.
-
- // Copy/patch top-level elements.
Link<Element> patches = patch.topLevelElements;
while (!patches.isEmpty()) {
Element patchElement = patches.head;
@@ -556,29 +548,7 @@ class Compiler implements DiagnosticListener {
}
patches = patches.tail;
}
-
- // Copy imports.
- Map<String, LibraryElement> delayedPatches = <LibraryElement>{};
- Uri base = patch.script.uri;
- for (ScriptTag tag in patch.tags.reverse()) {
- if (tag.isImport()) {
- StringNode argument = tag.argument;
- Uri resolved = base.resolve(argument.dartString.slowToString());
- LibraryElement importedLibrary =
- scanner.loadLibrary(resolved, argument);
- scanner.importLibrary(library, importedLibrary, tag, patch);
- if (resolved.scheme == "dart") {
- delayedPatches[resolved.path] = importedLibrary;
- }
- }
- }
- // Mark library as already patched.
library.patch = patch;
- // We patch imported libraries after marking the current library as patched,
- // to avoid problems with cyclic dependencies.
- delayedPatches.forEach((String path, LibraryElement importedLibrary) {
- patchDartLibrary(importedLibrary, path);
- });
}
bool patchSignatureMatches(FunctionElement original, FunctionElement patch) {
« no previous file with comments | « no previous file | lib/compiler/implementation/elements/elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698