| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 <ctype.h> | 5 #include <ctype.h> |
| 6 #include <stdlib.h> | 6 #include <stdlib.h> |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/assembler.h" | 10 #include "src/assembler.h" |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 } | 365 } |
| 366 } | 366 } |
| 367 | 367 |
| 368 // if we still need a flag value, use the next argument if available | 368 // if we still need a flag value, use the next argument if available |
| 369 if (flag->type() != Flag::TYPE_BOOL && | 369 if (flag->type() != Flag::TYPE_BOOL && |
| 370 flag->type() != Flag::TYPE_MAYBE_BOOL && | 370 flag->type() != Flag::TYPE_MAYBE_BOOL && |
| 371 flag->type() != Flag::TYPE_ARGS && | 371 flag->type() != Flag::TYPE_ARGS && |
| 372 value == NULL) { | 372 value == NULL) { |
| 373 if (i < *argc) { | 373 if (i < *argc) { |
| 374 value = argv[i++]; | 374 value = argv[i++]; |
| 375 } else { | 375 } |
| 376 if (!value) { |
| 376 PrintF(stderr, "Error: missing value for flag %s of type %s\n" | 377 PrintF(stderr, "Error: missing value for flag %s of type %s\n" |
| 377 "Try --help for options\n", | 378 "Try --help for options\n", |
| 378 arg, Type2String(flag->type())); | 379 arg, Type2String(flag->type())); |
| 379 return_code = j; | 380 return_code = j; |
| 380 break; | 381 break; |
| 381 } | 382 } |
| 382 } | 383 } |
| 383 | 384 |
| 384 // set the flag | 385 // set the flag |
| 385 char* endp = const_cast<char*>(""); // *endp is only read | 386 char* endp = const_cast<char*>(""); // *endp is only read |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 | 542 |
| 542 | 543 |
| 543 // static | 544 // static |
| 544 void FlagList::EnforceFlagImplications() { | 545 void FlagList::EnforceFlagImplications() { |
| 545 #define FLAG_MODE_DEFINE_IMPLICATIONS | 546 #define FLAG_MODE_DEFINE_IMPLICATIONS |
| 546 #include "src/flag-definitions.h" | 547 #include "src/flag-definitions.h" |
| 547 #undef FLAG_MODE_DEFINE_IMPLICATIONS | 548 #undef FLAG_MODE_DEFINE_IMPLICATIONS |
| 548 } | 549 } |
| 549 | 550 |
| 550 } } // namespace v8::internal | 551 } } // namespace v8::internal |
| OLD | NEW |