| OLD | NEW |
| 1 // Copyright (c) 2011, 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. |
| 11 */ | 11 */ |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 if (script == null) script = options.dartScript; | 423 if (script == null) script = options.dartScript; |
| 424 Library library = getOrAddLibrary(script); | 424 Library library = getOrAddLibrary(script); |
| 425 process(); | 425 process(); |
| 426 return library; | 426 return library; |
| 427 } | 427 } |
| 428 | 428 |
| 429 resolveAll() { | 429 resolveAll() { |
| 430 for (var lib in libraries.getValues()) { | 430 for (var lib in libraries.getValues()) { |
| 431 lib.resolve(); | 431 lib.resolve(); |
| 432 } | 432 } |
| 433 for (var lib in libraries.getValues()) { |
| 434 lib.postResolveChecks(); |
| 435 } |
| 433 } | 436 } |
| 434 | 437 |
| 435 findMainMethod(Library lib) { | 438 findMainMethod(Library lib) { |
| 436 var mainMembers = lib.topType.resolveMember('main'); | 439 var mainMembers = lib.topType.resolveMember('main'); |
| 437 var main = null; | 440 var main = null; |
| 438 if (mainMembers == null || mainMembers.members.length == 0) { | 441 if (mainMembers == null || mainMembers.members.length == 0) { |
| 439 fatal('no main method specified'); | 442 fatal('no main method specified'); |
| 440 } else if (mainMembers.members.length > 1) { | 443 } else if (mainMembers.members.length > 1) { |
| 441 for (var m in mainMembers.members) { | 444 for (var m in mainMembers.members) { |
| 442 main = m; | 445 main = m; |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 | 571 |
| 569 withTiming(String name, f()) { | 572 withTiming(String name, f()) { |
| 570 final sw = new Stopwatch(); | 573 final sw = new Stopwatch(); |
| 571 sw.start(); | 574 sw.start(); |
| 572 var result = f(); | 575 var result = f(); |
| 573 sw.stop(); | 576 sw.stop(); |
| 574 info('$name in ${sw.elapsedInMs()}msec'); | 577 info('$name in ${sw.elapsedInMs()}msec'); |
| 575 return result; | 578 return result; |
| 576 } | 579 } |
| 577 } | 580 } |
| OLD | NEW |