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

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

Issue 1759913002: Make precompiler work with product mode. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: addressed comments Created 4 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
« no previous file with comments | « no previous file | runtime/lib/regexp.cc » ('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 #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 #include "include/dart_tools_api.h" 10 #include "include/dart_tools_api.h"
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 " dart_no_snapshot.\n"); 333 " dart_no_snapshot.\n");
334 return false; 334 return false;
335 } 335 }
336 ASSERT(arg != NULL); 336 ASSERT(arg != NULL);
337 if ((arg[0] == '=') || (arg[0] == ':')) { 337 if ((arg[0] == '=') || (arg[0] == ':')) {
338 precompiled_snapshot_directory = &arg[1]; 338 precompiled_snapshot_directory = &arg[1];
339 } else { 339 } else {
340 precompiled_snapshot_directory = arg; 340 precompiled_snapshot_directory = arg;
341 } 341 }
342 gen_precompiled_snapshot = true; 342 gen_precompiled_snapshot = true;
343 #if !defined(DART_PRECOMPILED_RUNTIME)
344 // The precompiled runtime has FLAG_precompilation set as const.
345 vm_options->AddArgument("--precompilation"); 343 vm_options->AddArgument("--precompilation");
346 #endif
347 return true; 344 return true;
348 } 345 }
349 346
350 347
351 static bool ProcessRunPrecompiledSnapshotOption( 348 static bool ProcessRunPrecompiledSnapshotOption(
352 const char* arg, 349 const char* arg,
353 CommandLineOptions* vm_options) { 350 CommandLineOptions* vm_options) {
354 ASSERT(arg != NULL); 351 ASSERT(arg != NULL);
355 precompiled_snapshot_directory = arg; 352 precompiled_snapshot_directory = arg;
356 if ((precompiled_snapshot_directory[0] == '=') || 353 if ((precompiled_snapshot_directory[0] == '=') ||
357 (precompiled_snapshot_directory[0] == ':')) { 354 (precompiled_snapshot_directory[0] == ':')) {
358 precompiled_snapshot_directory = &precompiled_snapshot_directory[1]; 355 precompiled_snapshot_directory = &precompiled_snapshot_directory[1];
359 } 356 }
360 run_precompiled_snapshot = true; 357 run_precompiled_snapshot = true;
361 #if !defined(DART_PRECOMPILED_RUNTIME)
362 // The precompiled runtime has FLAG_precompilation set as const.
363 vm_options->AddArgument("--precompilation"); 358 vm_options->AddArgument("--precompilation");
364 #endif
365 return true; 359 return true;
366 } 360 }
367 361
368 362
369 static bool ProcessSnapshotOptionHelper(const char* filename, 363 static bool ProcessSnapshotOptionHelper(const char* filename,
370 bool* snapshot_option) { 364 bool* snapshot_option) {
371 ASSERT((filename != NULL) && (strlen(filename) != 0)); 365 ASSERT((filename != NULL) && (strlen(filename) != 0));
372 snapshot_filename = filename; 366 snapshot_filename = filename;
373 *snapshot_option = true; 367 *snapshot_option = true;
374 if (generate_script_snapshot && generate_full_snapshot_after_run) { 368 if (generate_script_snapshot && generate_full_snapshot_after_run) {
(...skipping 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after
1675 Platform::Exit(Process::GlobalExitCode()); 1669 Platform::Exit(Process::GlobalExitCode());
1676 } 1670 }
1677 1671
1678 } // namespace bin 1672 } // namespace bin
1679 } // namespace dart 1673 } // namespace dart
1680 1674
1681 int main(int argc, char** argv) { 1675 int main(int argc, char** argv) {
1682 dart::bin::main(argc, argv); 1676 dart::bin::main(argc, argv);
1683 UNREACHABLE(); 1677 UNREACHABLE();
1684 } 1678 }
OLDNEW
« no previous file with comments | « no previous file | runtime/lib/regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698