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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart

Issue 11304021: Add NativeEnqueuer to work with the Enqueuer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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) 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 library mirrors_dart2js; 5 library mirrors_dart2js;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 import 'dart:uri'; 8 import 'dart:uri';
9 9
10 import '../../compiler.dart' as diagnostics; 10 import '../../compiler.dart' as diagnostics;
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 var elementList = <LibraryElement>[]; 238 var elementList = <LibraryElement>[];
239 for (var uri in uriList) { 239 for (var uri in uriList) {
240 elementList.add(libraryLoader.loadLibrary(uri, null, uri)); 240 elementList.add(libraryLoader.loadLibrary(uri, null, uri));
241 } 241 }
242 libraries.forEach((_, library) { 242 libraries.forEach((_, library) {
243 maybeEnableJSHelper(library); 243 maybeEnableJSHelper(library);
244 }); 244 });
245 245
246 world.populate(); 246 world.populate();
247 247
248 enqueuer.resolution.nativeEnqueuer =
249 backend.nativeResolutionEnqueuer(enqueuer.resolution);
250
248 log('Resolving...'); 251 log('Resolving...');
249 phase = Compiler.PHASE_RESOLVING; 252 phase = Compiler.PHASE_RESOLVING;
250 backend.enqueueHelpers(enqueuer.resolution); 253 backend.enqueueHelpers(enqueuer.resolution);
251 processQueueList(enqueuer.resolution, elementList); 254 processQueueList(enqueuer.resolution, elementList);
252 log('Resolved ${enqueuer.resolution.resolvedElements.length} elements.'); 255 log('Resolved ${enqueuer.resolution.resolvedElements.length} elements.');
253 } 256 }
254 257
255 void processQueueList(Enqueuer world, List<LibraryElement> elements) { 258 void processQueueList(Enqueuer world, List<LibraryElement> elements) {
256 backend.processNativeClasses(world, libraries.values); 259 world.nativeEnqueuer.processNativeClasses(libraries.values);
257 for (var library in elements) { 260 for (var library in elements) {
258 library.forEachLocalMember((element) { 261 library.forEachLocalMember((element) {
259 world.addToWorkList(element); 262 world.addToWorkList(element);
260 }); 263 });
261 } 264 }
262 progress.reset(); 265 progress.reset();
263 world.forEach((WorkItem work) { 266 world.forEach((WorkItem work) {
264 withCurrentElement(work.element, () => work.run(this, world)); 267 withCurrentElement(work.element, () => work.run(this, world));
265 }); 268 });
266 } 269 }
(...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after
1529 var node = _variable.variables.parseNode(_diagnosticListener); 1532 var node = _variable.variables.parseNode(_diagnosticListener);
1530 if (node != null) { 1533 if (node != null) {
1531 var span = mirrors.compiler.spanFromNode(node, script.uri); 1534 var span = mirrors.compiler.spanFromNode(node, script.uri);
1532 return new Dart2JsSourceLocation(script, span); 1535 return new Dart2JsSourceLocation(script, span);
1533 } else { 1536 } else {
1534 var span = mirrors.compiler.spanFromElement(_variable); 1537 var span = mirrors.compiler.spanFromElement(_variable);
1535 return new Dart2JsSourceLocation(script, span); 1538 return new Dart2JsSourceLocation(script, span);
1536 } 1539 }
1537 } 1540 }
1538 } 1541 }
1539
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698