Chromium Code Reviews

Unified Diff: sdk/lib/_internal/lib/isolate_helper.dart

Issue 39263007: Allow arguments to main. Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload due to error. Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/compiler.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/lib/isolate_helper.dart
diff --git a/sdk/lib/_internal/lib/isolate_helper.dart b/sdk/lib/_internal/lib/isolate_helper.dart
index 833fef28b85e623a392fd04ca3ff23c82cab9903..27a51d525f0c7a37a7bebbe173ffba516fc46046 100644
--- a/sdk/lib/_internal/lib/isolate_helper.dart
+++ b/sdk/lib/_internal/lib/isolate_helper.dart
@@ -58,7 +58,13 @@ void startRootIsolate(entry) {
// by having a "default" isolate (the first one created).
_globalState.currentContext = rootContext;
- rootContext.eval(entry);
+ if (entry is _MainFunctionArgs) {
+ rootContext.eval(() { entry([]); });
+ } else if (entry is _MainFunctionArgsMessage) {
+ rootContext.eval(() { entry([], null); });
+ } else {
+ rootContext.eval(entry);
+ }
_globalState.topEventLoop.run();
}
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/compiler.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine