| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <errno.h> | 5 #include <errno.h> |
| 6 #include <stdlib.h> | 6 #include <stdlib.h> |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 #include <sys/stat.h> | 8 #include <sys/stat.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 2411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2422 v8::V8::SetFlagsFromString(flags, static_cast<int>(strlen(flags))); | 2422 v8::V8::SetFlagsFromString(flags, static_cast<int>(strlen(flags))); |
| 2423 } | 2423 } |
| 2424 | 2424 |
| 2425 | 2425 |
| 2426 bool Shell::SetOptions(int argc, char* argv[]) { | 2426 bool Shell::SetOptions(int argc, char* argv[]) { |
| 2427 bool logfile_per_isolate = false; | 2427 bool logfile_per_isolate = false; |
| 2428 for (int i = 0; i < argc; i++) { | 2428 for (int i = 0; i < argc; i++) { |
| 2429 if (strcmp(argv[i], "--stress-opt") == 0) { | 2429 if (strcmp(argv[i], "--stress-opt") == 0) { |
| 2430 options.stress_opt = true; | 2430 options.stress_opt = true; |
| 2431 argv[i] = NULL; | 2431 argv[i] = NULL; |
| 2432 } else if (strcmp(argv[i], "--nostress-opt") == 0) { | 2432 } else if (strcmp(argv[i], "--nostress-opt") == 0 || |
| 2433 strcmp(argv[i], "--no-stress-opt") == 0) { |
| 2433 options.stress_opt = false; | 2434 options.stress_opt = false; |
| 2434 argv[i] = NULL; | 2435 argv[i] = NULL; |
| 2435 } else if (strcmp(argv[i], "--stress-deopt") == 0) { | 2436 } else if (strcmp(argv[i], "--stress-deopt") == 0) { |
| 2436 options.stress_deopt = true; | 2437 options.stress_deopt = true; |
| 2437 argv[i] = NULL; | 2438 argv[i] = NULL; |
| 2438 } else if (strcmp(argv[i], "--mock-arraybuffer-allocator") == 0) { | 2439 } else if (strcmp(argv[i], "--mock-arraybuffer-allocator") == 0) { |
| 2439 options.mock_arraybuffer_allocator = true; | 2440 options.mock_arraybuffer_allocator = true; |
| 2440 argv[i] = NULL; | 2441 argv[i] = NULL; |
| 2441 } else if (strcmp(argv[i], "--noalways-opt") == 0) { | 2442 } else if (strcmp(argv[i], "--noalways-opt") == 0 || |
| 2443 strcmp(argv[i], "--no-always-opt") == 0) { |
| 2442 // No support for stressing if we can't use --always-opt. | 2444 // No support for stressing if we can't use --always-opt. |
| 2443 options.stress_opt = false; | 2445 options.stress_opt = false; |
| 2444 options.stress_deopt = false; | 2446 options.stress_deopt = false; |
| 2445 } else if (strcmp(argv[i], "--logfile-per-isolate") == 0) { | 2447 } else if (strcmp(argv[i], "--logfile-per-isolate") == 0) { |
| 2446 logfile_per_isolate = true; | 2448 logfile_per_isolate = true; |
| 2447 argv[i] = NULL; | 2449 argv[i] = NULL; |
| 2448 } else if (strcmp(argv[i], "--shell") == 0) { | 2450 } else if (strcmp(argv[i], "--shell") == 0) { |
| 2449 options.interactive_shell = true; | 2451 options.interactive_shell = true; |
| 2450 argv[i] = NULL; | 2452 argv[i] = NULL; |
| 2451 } else if (strcmp(argv[i], "--test") == 0) { | 2453 } else if (strcmp(argv[i], "--test") == 0) { |
| (...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3083 } | 3085 } |
| 3084 | 3086 |
| 3085 } // namespace v8 | 3087 } // namespace v8 |
| 3086 | 3088 |
| 3087 | 3089 |
| 3088 #ifndef GOOGLE3 | 3090 #ifndef GOOGLE3 |
| 3089 int main(int argc, char* argv[]) { | 3091 int main(int argc, char* argv[]) { |
| 3090 return v8::Shell::Main(argc, argv); | 3092 return v8::Shell::Main(argc, argv); |
| 3091 } | 3093 } |
| 3092 #endif | 3094 #endif |
| OLD | NEW |