OLD | NEW |
---|---|
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 part of dart2js_incremental; | 5 part of dart2js_incremental; |
6 | 6 |
7 /// Do not call this method directly. It will be made private. | 7 /// Do not call this method directly. It will be made private. |
8 // TODO(ahe): Make this method private. | 8 // TODO(ahe): Make this method private. |
9 Compiler reuseCompiler( | 9 Compiler reuseCompiler( |
10 {DiagnosticHandler diagnosticHandler, | 10 {DiagnosticHandler diagnosticHandler, |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
123 ..readTypeVariables.clear() | 123 ..readTypeVariables.clear() |
124 ..instantiatedClasses = null | 124 ..instantiatedClasses = null |
125 ..precompiledFunction.clear() | 125 ..precompiledFunction.clear() |
126 ..precompiledConstructorNames.clear() | 126 ..precompiledConstructorNames.clear() |
127 ..hasMakeConstantList = false | 127 ..hasMakeConstantList = false |
128 ..elementDescriptors.clear(); | 128 ..elementDescriptors.clear(); |
129 | 129 |
130 backend | 130 backend |
131 ..preMirrorsMethodCount = 0; | 131 ..preMirrorsMethodCount = 0; |
132 | 132 |
133 Map libraries = new Map.from(compiler.libraries); | 133 compiler.libraryLoader.reset((LibraryElement library) { |
ahe
2014/06/24 12:48:21
Sweet!
PS: This file LGTM!
| |
134 compiler.libraries.clear(); | 134 return library.isPlatformLibrary || |
135 compiler.libraryLoader.reset(); | 135 (packagesAreImmutable && library.isPackageLibrary); |
136 libraries.forEach((String uri, LibraryElement library) { | |
137 if (library.isPlatformLibrary || | |
138 (packagesAreImmutable && library.isPackageLibrary)) { | |
139 compiler.libraries[uri] = library; | |
140 compiler.libraryLoader.reuseLibrary(library); | |
141 } | |
142 }); | 136 }); |
143 } | 137 } |
144 oldTag.makeCurrent(); | 138 oldTag.makeCurrent(); |
145 return compiler; | 139 return compiler; |
146 } | 140 } |
OLD | NEW |