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

Side by Side Diff: runtime/bin/main.cc

Issue 8713012: Introduce Dart_SetVMFlags API function. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Comments addressed. Created 9 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 | Annotate | Revision Log
« no previous file with comments | « runtime/bin/gen_snapshot.cc ('k') | runtime/include/dart_api.h » ('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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #include <stdlib.h> 5 #include <stdlib.h>
6 #include <string.h> 6 #include <string.h>
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include "include/dart_api.h" 9 #include "include/dart_api.h"
10 10
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 // Parse command line arguments. 274 // Parse command line arguments.
275 if (ParseArguments(argc, 275 if (ParseArguments(argc,
276 argv, 276 argv,
277 &vm_options, 277 &vm_options,
278 &script_name, 278 &script_name,
279 &dart_options) < 0) { 279 &dart_options) < 0) {
280 PrintUsage(); 280 PrintUsage();
281 return 255; 281 return 255;
282 } 282 }
283 283
284 Dart_SetVMFlags(vm_options.count(), vm_options.arguments());
285
284 // Initialize the Dart VM. 286 // Initialize the Dart VM.
285 Dart_Initialize(vm_options.count(), 287 Dart_Initialize(CreateIsolateAndSetup);
286 vm_options.arguments(),
287 CreateIsolateAndSetup);
288 288
289 canonical_script_name = File::GetCanonicalPath(script_name); 289 canonical_script_name = File::GetCanonicalPath(script_name);
290 if (canonical_script_name == NULL) { 290 if (canonical_script_name == NULL) {
291 fprintf(stderr, "Unable to find '%s'\n", script_name); 291 fprintf(stderr, "Unable to find '%s'\n", script_name);
292 return 255; // Indicates we encountered an error. 292 return 255; // Indicates we encountered an error.
293 } 293 }
294 294
295 // Call CreateIsolateAndSetup which creates an isolate and loads up 295 // Call CreateIsolateAndSetup which creates an isolate and loads up
296 // the specified application script. 296 // the specified application script.
297 char* error = NULL; 297 char* error = NULL;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 return 255; // Indicates we encountered an error. 361 return 255; // Indicates we encountered an error.
362 } 362 }
363 free(canonical_script_name); 363 free(canonical_script_name);
364 Dart_ExitScope(); 364 Dart_ExitScope();
365 // Dump symbol information for the profiler. 365 // Dump symbol information for the profiler.
366 DumpPprofSymbolInfo(); 366 DumpPprofSymbolInfo();
367 // Shutdown the isolate. 367 // Shutdown the isolate.
368 Dart_ShutdownIsolate(); 368 Dart_ShutdownIsolate();
369 return 0; 369 return 0;
370 } 370 }
OLDNEW
« no previous file with comments | « runtime/bin/gen_snapshot.cc ('k') | runtime/include/dart_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698