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

Side by Side Diff: dart/pkg/dart2js_incremental/lib/caching_compiler.dart

Issue 740273003: Incremental compiler: support optional arguments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add TODO for a follow-up CL. Created 6 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 ..compilationFailed = false; 98 ..compilationFailed = false;
99 JavaScriptBackend backend = compiler.backend; 99 JavaScriptBackend backend = compiler.backend;
100 100
101 // TODO(ahe): Seems this cache only serves to tell 101 // TODO(ahe): Seems this cache only serves to tell
102 // [OldEmitter.invalidateCaches] if it was invoked on a full compile (in 102 // [OldEmitter.invalidateCaches] if it was invoked on a full compile (in
103 // which case nothing should be invalidated), or if it is an incremental 103 // which case nothing should be invalidated), or if it is an incremental
104 // compilation (in which case, holders/owners of newly compiled methods 104 // compilation (in which case, holders/owners of newly compiled methods
105 // must be invalidated). 105 // must be invalidated).
106 backend.emitter.oldEmitter.cachedElements.add(null); 106 backend.emitter.oldEmitter.cachedElements.add(null);
107 107
108 compiler.enqueuer.codegen.newlyEnqueuedElements.clear(); 108 compiler.enqueuer.codegen
109 ..newlyEnqueuedElements.clear()
110 ..newlySeenSelectors.clear();
109 111
110 backend.emitter.oldEmitter.containerBuilder 112 backend.emitter.oldEmitter.containerBuilder
111 ..staticGetters.clear(); 113 ..staticGetters.clear();
112 114
113 backend.emitter.oldEmitter.nsmEmitter 115 backend.emitter.oldEmitter.nsmEmitter
114 ..trivialNsmHandlers.clear(); 116 ..trivialNsmHandlers.clear();
115 117
116 backend.emitter.typeTestEmitter 118 backend.emitter.typeTestEmitter
117 ..checkedClasses = null 119 ..checkedClasses = null
118 ..checkedFunctionTypes = null 120 ..checkedFunctionTypes = null
(...skipping 14 matching lines...) Expand all
133 ..nativeClasses.clear() 135 ..nativeClasses.clear()
134 ..nativeMethods.clear(); 136 ..nativeMethods.clear();
135 137
136 backend.emitter.readTypeVariables.clear(); 138 backend.emitter.readTypeVariables.clear();
137 139
138 backend.emitter.oldEmitter 140 backend.emitter.oldEmitter
139 ..outputBuffers.clear() 141 ..outputBuffers.clear()
140 ..deferredConstants.clear() 142 ..deferredConstants.clear()
141 ..isolateProperties = null 143 ..isolateProperties = null
142 ..classesCollector = null 144 ..classesCollector = null
143 ..neededClasses.clear()
144 ..outputClassLists.clear() 145 ..outputClassLists.clear()
145 ..nativeClasses.clear() 146 ..nativeClasses.clear()
146 ..mangledFieldNames.clear() 147 ..mangledFieldNames.clear()
147 ..mangledGlobalFieldNames.clear() 148 ..mangledGlobalFieldNames.clear()
148 ..recordedMangledNames.clear() 149 ..recordedMangledNames.clear()
149 ..additionalProperties.clear() 150 ..additionalProperties.clear()
150 ..clearCspPrecompiledNodes() 151 ..clearCspPrecompiledNodes()
151 ..elementDescriptors.clear(); 152 ..elementDescriptors.clear();
152 153
153 backend.emitter 154 backend.emitter
154 ..outputContainsConstantList = false; 155 ..outputContainsConstantList = false;
155 156
156 backend 157 backend
157 ..preMirrorsMethodCount = 0; 158 ..preMirrorsMethodCount = 0;
158 159
159 if (reuseLibrary == null) { 160 if (reuseLibrary == null) {
160 reuseLibrary = (LibraryElement library) { 161 reuseLibrary = (LibraryElement library) {
161 return new Future.value( 162 return new Future.value(
162 library.isPlatformLibrary || 163 library.isPlatformLibrary ||
163 (packagesAreImmutable && library.isPackageLibrary)); 164 (packagesAreImmutable && library.isPackageLibrary));
164 }; 165 };
165 } 166 }
166 return compiler.libraryLoader.resetAsync(reuseLibrary).then((_) { 167 return compiler.libraryLoader.resetAsync(reuseLibrary).then((_) {
167 oldTag.makeCurrent(); 168 oldTag.makeCurrent();
168 return compiler; 169 return compiler;
169 }); 170 });
170 } 171 }
171 } 172 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698