| 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 | 5 | 
| 6 /** | 6 /** | 
| 7  * If true, print a warning for each method that was resolved, but not | 7  * If true, print a warning for each method that was resolved, but not | 
| 8  * compiled. | 8  * compiled. | 
| 9  */ | 9  */ | 
| 10 final bool REPORT_EXCESS_RESOLUTION = false; | 10 final bool REPORT_EXCESS_RESOLUTION = false; | 
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 384       addForeignFunctions(library);  // Is safe even if already added. | 384       addForeignFunctions(library);  // Is safe even if already added. | 
| 385       applyLibraryPatch(library, patchLibrary); | 385       applyLibraryPatch(library, patchLibrary); | 
| 386     } | 386     } | 
| 387   } | 387   } | 
| 388 | 388 | 
| 389   void applyLibraryPatch(LibraryElement original, LibraryElement patch) { | 389   void applyLibraryPatch(LibraryElement original, LibraryElement patch) { | 
| 390     Link<Element> patches = patch.localMembers; | 390     Link<Element> patches = patch.localMembers; | 
| 391     applyContainerPatch(original, patches); | 391     applyContainerPatch(original, patches); | 
| 392 | 392 | 
| 393     // Copy imports from patch to original library. | 393     // Copy imports from patch to original library. | 
| 394     Map<String, LibraryElement> delayedPatches = <LibraryElement>{}; | 394     Map<String, LibraryElement> delayedPatches = <String, LibraryElement>{}; | 
| 395     Uri patchBase = patch.uri; | 395     Uri patchBase = patch.uri; | 
| 396     for (ScriptTag tag in patch.tags.reverse()) { | 396     for (ScriptTag tag in patch.tags.reverse()) { | 
| 397       if (tag.isImport()) { | 397       if (tag.isImport()) { | 
| 398         StringNode argument = tag.argument; | 398         StringNode argument = tag.argument; | 
| 399         Uri resolved = patchBase.resolve(argument.dartString.slowToString()); | 399         Uri resolved = patchBase.resolve(argument.dartString.slowToString()); | 
| 400         LibraryElement importedLibrary = | 400         LibraryElement importedLibrary = | 
| 401             scanner.loadLibrary(resolved, argument); | 401             scanner.loadLibrary(resolved, argument); | 
| 402         scanner.importLibrary(original, importedLibrary, tag, | 402         scanner.importLibrary(original, importedLibrary, tag, | 
| 403                               patch.entryCompilationUnit); | 403                               patch.entryCompilationUnit); | 
| 404         if (resolved.scheme == "dart") { | 404         if (resolved.scheme == "dart") { | 
| (...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 955     final endOffset = end.charOffset + end.slowCharCount; | 955     final endOffset = end.charOffset + end.slowCharCount; | 
| 956 | 956 | 
| 957     // [begin] and [end] might be the same for the same empty token. This | 957     // [begin] and [end] might be the same for the same empty token. This | 
| 958     // happens for instance when scanning '$$'. | 958     // happens for instance when scanning '$$'. | 
| 959     assert(endOffset >= beginOffset); | 959     assert(endOffset >= beginOffset); | 
| 960     return f(beginOffset, endOffset); | 960     return f(beginOffset, endOffset); | 
| 961   } | 961   } | 
| 962 | 962 | 
| 963   String toString() => 'SourceSpan($uri, $begin, $end)'; | 963   String toString() => 'SourceSpan($uri, $begin, $end)'; | 
| 964 } | 964 } | 
| OLD | NEW | 
|---|