| 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 Future<Compiler> reuseCompiler( | 9 Future<Compiler> reuseCompiler( |
| 10 {DiagnosticHandler diagnosticHandler, | 10 {DiagnosticHandler diagnosticHandler, |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 ..compilationFailed = false; | 99 ..compilationFailed = false; |
| 100 JavaScriptBackend backend = compiler.backend; | 100 JavaScriptBackend backend = compiler.backend; |
| 101 | 101 |
| 102 // TODO(ahe): Seems this cache only serves to tell | 102 // TODO(ahe): Seems this cache only serves to tell |
| 103 // [OldEmitter.invalidateCaches] if it was invoked on a full compile (in | 103 // [OldEmitter.invalidateCaches] if it was invoked on a full compile (in |
| 104 // which case nothing should be invalidated), or if it is an incremental | 104 // which case nothing should be invalidated), or if it is an incremental |
| 105 // compilation (in which case, holders/owners of newly compiled methods | 105 // compilation (in which case, holders/owners of newly compiled methods |
| 106 // must be invalidated). | 106 // must be invalidated). |
| 107 backend.emitter.oldEmitter.cachedElements.add(null); | 107 backend.emitter.oldEmitter.cachedElements.add(null); |
| 108 | 108 |
| 109 compiler.enqueuer.codegen.newlyEnqueuedElements.clear(); | 109 compiler.enqueuer.codegen |
| 110 ..newlyEnqueuedElements.clear() |
| 111 ..newlySeenSelectors.clear(); |
| 110 | 112 |
| 111 backend.emitter.oldEmitter.containerBuilder | 113 backend.emitter.oldEmitter.containerBuilder |
| 112 ..staticGetters.clear(); | 114 ..staticGetters.clear(); |
| 113 | 115 |
| 114 backend.emitter.oldEmitter.nsmEmitter | 116 backend.emitter.oldEmitter.nsmEmitter |
| 115 ..trivialNsmHandlers.clear(); | 117 ..trivialNsmHandlers.clear(); |
| 116 | 118 |
| 117 backend.emitter.typeTestRegistry | 119 backend.emitter.typeTestRegistry |
| 118 ..checkedClasses = null | 120 ..checkedClasses = null |
| 119 ..checkedFunctionTypes = null | 121 ..checkedFunctionTypes = null |
| (...skipping 12 matching lines...) Expand all Loading... |
| 132 ..nativeClasses.clear() | 134 ..nativeClasses.clear() |
| 133 ..nativeMethods.clear(); | 135 ..nativeMethods.clear(); |
| 134 | 136 |
| 135 backend.emitter.readTypeVariables.clear(); | 137 backend.emitter.readTypeVariables.clear(); |
| 136 | 138 |
| 137 backend.emitter.oldEmitter | 139 backend.emitter.oldEmitter |
| 138 ..outputBuffers.clear() | 140 ..outputBuffers.clear() |
| 139 ..deferredConstants.clear() | 141 ..deferredConstants.clear() |
| 140 ..isolateProperties = null | 142 ..isolateProperties = null |
| 141 ..classesCollector = null | 143 ..classesCollector = null |
| 142 ..neededClasses.clear() | |
| 143 ..outputClassLists.clear() | 144 ..outputClassLists.clear() |
| 144 ..nativeClasses.clear() | 145 ..nativeClasses.clear() |
| 145 ..mangledFieldNames.clear() | 146 ..mangledFieldNames.clear() |
| 146 ..mangledGlobalFieldNames.clear() | 147 ..mangledGlobalFieldNames.clear() |
| 147 ..recordedMangledNames.clear() | 148 ..recordedMangledNames.clear() |
| 148 ..additionalProperties.clear() | 149 ..additionalProperties.clear() |
| 149 ..clearCspPrecompiledNodes() | 150 ..clearCspPrecompiledNodes() |
| 150 ..elementDescriptors.clear(); | 151 ..elementDescriptors.clear(); |
| 151 | 152 |
| 152 backend.emitter | 153 backend.emitter |
| 153 ..outputContainsConstantList = false; | 154 ..outputContainsConstantList = false; |
| 154 | 155 |
| 155 backend | 156 backend |
| 156 ..preMirrorsMethodCount = 0; | 157 ..preMirrorsMethodCount = 0; |
| 157 | 158 |
| 158 if (reuseLibrary == null) { | 159 if (reuseLibrary == null) { |
| 159 reuseLibrary = (LibraryElement library) { | 160 reuseLibrary = (LibraryElement library) { |
| 160 return new Future.value( | 161 return new Future.value( |
| 161 library.isPlatformLibrary || | 162 library.isPlatformLibrary || |
| 162 (packagesAreImmutable && library.isPackageLibrary)); | 163 (packagesAreImmutable && library.isPackageLibrary)); |
| 163 }; | 164 }; |
| 164 } | 165 } |
| 165 return compiler.libraryLoader.resetAsync(reuseLibrary).then((_) { | 166 return compiler.libraryLoader.resetAsync(reuseLibrary).then((_) { |
| 166 oldTag.makeCurrent(); | 167 oldTag.makeCurrent(); |
| 167 return compiler; | 168 return compiler; |
| 168 }); | 169 }); |
| 169 } | 170 } |
| 170 } | 171 } |
| OLD | NEW |