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

Side by Side Diff: tests/compiler/dart2js/memory_compiler.dart

Issue 2549423002: Change Enqueuer to use Entity instead of Element. (Closed)
Patch Set: Updated cf. comments. Created 4 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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 library dart2js.test.memory_compiler; 5 library dart2js.test.memory_compiler;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:compiler/compiler.dart' show DiagnosticHandler; 9 import 'package:compiler/compiler.dart' show DiagnosticHandler;
10 import 'package:compiler/compiler_new.dart' 10 import 'package:compiler/compiler_new.dart'
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } 176 }
177 }); 177 });
178 // TODO(johnniwinther): Assert that no libraries are loaded lazily from 178 // TODO(johnniwinther): Assert that no libraries are loaded lazily from
179 // this call. 179 // this call.
180 compiler.onLibrariesLoaded(new MemoryLoadedLibraries(copiedLibraries)); 180 compiler.onLibrariesLoaded(new MemoryLoadedLibraries(copiedLibraries));
181 181
182 compiler.backend.constantCompilerTask 182 compiler.backend.constantCompilerTask
183 .copyConstantValues(cachedCompiler.backend.constantCompilerTask); 183 .copyConstantValues(cachedCompiler.backend.constantCompilerTask);
184 184
185 Iterable cachedTreeElements = 185 Iterable cachedTreeElements =
186 cachedCompiler.enqueuer.resolution.processedElements; 186 cachedCompiler.enqueuer.resolution.processedEntities;
187 cachedTreeElements.forEach((element) { 187 cachedTreeElements.forEach((element) {
188 if (element.library.isPlatformLibrary) { 188 if (element.library.isPlatformLibrary) {
189 compiler.enqueuer.resolution.registerProcessedElement(element); 189 compiler.enqueuer.resolution.registerProcessedElement(element);
190 } 190 }
191 }); 191 });
192 192
193 // One potential problem that can occur when reusing elements is that there 193 // One potential problem that can occur when reusing elements is that there
194 // is a stale reference to an old compiler object. By nulling out the old 194 // is a stale reference to an old compiler object. By nulling out the old
195 // compiler's fields, such stale references are easier to identify. 195 // compiler's fields, such stale references are easier to identify.
196 cachedCompiler.scanner = null; 196 cachedCompiler.scanner = null;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 handler = (Uri uri, int begin, int end, String message, Diagnostic kind) { 244 handler = (Uri uri, int begin, int end, String message, Diagnostic kind) {
245 diagnosticHandler(uri, begin, end, message, kind); 245 diagnosticHandler(uri, begin, end, message, kind);
246 formattingHandler(uri, begin, end, message, kind); 246 formattingHandler(uri, begin, end, message, kind);
247 }; 247 };
248 } 248 }
249 } else if (diagnosticHandler == null) { 249 } else if (diagnosticHandler == null) {
250 handler = (Uri uri, int begin, int end, String message, Diagnostic kind) {}; 250 handler = (Uri uri, int begin, int end, String message, Diagnostic kind) {};
251 } 251 }
252 return handler; 252 return handler;
253 } 253 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/embedded_category_api_boundary_test.dart ('k') | tests/compiler/dart2js/mirrors_used_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698