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

Side by Side Diff: frog/world.dart

Issue 9422019: isolates refactor: this change introduces 'dart:isolate' as a library. This is a (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: '' Created 8 years, 9 months 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
« no previous file with comments | « frog/reader.dart ('k') | lib/isolate/frog/compiler_hooks.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** The one true [World]. */ 5 /** The one true [World]. */
6 World world; 6 World world;
7 7
8 /** 8 /**
9 * Experimental phase to enable await, only set when using the 9 * Experimental phase to enable await, only set when using the
10 * await/awaitc.dart entrypoint. 10 * await/awaitc.dart entrypoint.
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 FileSystem files; 98 FileSystem files;
99 final LibraryReader reader; 99 final LibraryReader reader;
100 100
101 Map<String, Library> libraries; 101 Map<String, Library> libraries;
102 Library corelib; 102 Library corelib;
103 Library coreimpl; 103 Library coreimpl;
104 104
105 // TODO(jmesserly): we shouldn't be special casing DOM anywhere. 105 // TODO(jmesserly): we shouldn't be special casing DOM anywhere.
106 Library dom; 106 Library dom;
107 Library isolatelib;
107 108
108 List<Library> _todo; 109 List<Library> _todo;
109 110
110 /** Internal map to track name conflicts in the generated javascript. */ 111 /** Internal map to track name conflicts in the generated javascript. */
111 Map<String, Element> _topNames; 112 Map<String, Element> _topNames;
112 113
113 Map<String, MemberSet> _members; 114 Map<String, MemberSet> _members;
114 115
115 MessageHandler messageHandler; 116 MessageHandler messageHandler;
116 117
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 info('read library ${filename}'); 454 info('read library ${filename}');
454 if (!library.isCore && 455 if (!library.isCore &&
455 !library.imports.some((li) => li.library.isCore)) { 456 !library.imports.some((li) => li.library.isCore)) {
456 library.imports.add(new LibraryImport(corelib)); 457 library.imports.add(new LibraryImport(corelib));
457 } 458 }
458 libraries[filename] = library; 459 libraries[filename] = library;
459 _todo.add(library); 460 _todo.add(library);
460 461
461 if (filename == 'dart:dom') { 462 if (filename == 'dart:dom') {
462 dom = library; 463 dom = library;
464 } else if (filename == 'dart:isolate') {
465 isolatelib = library;
463 } 466 }
464 } 467 }
465 return library; 468 return library;
466 } 469 }
467 470
468 process() { 471 process() {
469 while (_todo.length > 0) { 472 while (_todo.length > 0) {
470 final todo = _todo; 473 final todo = _todo;
471 _todo = []; 474 _todo = [];
472 for (var lib in todo) { 475 for (var lib in todo) {
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 634
632 withTiming(String name, f()) { 635 withTiming(String name, f()) {
633 final sw = new Stopwatch(); 636 final sw = new Stopwatch();
634 sw.start(); 637 sw.start();
635 var result = f(); 638 var result = f();
636 sw.stop(); 639 sw.stop();
637 info('$name in ${sw.elapsedInMs()}msec'); 640 info('$name in ${sw.elapsedInMs()}msec');
638 return result; 641 return result;
639 } 642 }
640 } 643 }
OLDNEW
« no previous file with comments | « frog/reader.dart ('k') | lib/isolate/frog/compiler_hooks.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698