| 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 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 // (argc, argv) will remain unchanged independent of the remove_flags | 56 // (argc, argv) will remain unchanged independent of the remove_flags |
| 57 // value, and no assumptions about flag settings should be made. | 57 // value, and no assumptions about flag settings should be made. |
| 58 // | 58 // |
| 59 // The following syntax for flags is accepted (both '-' and '--' are ok): | 59 // The following syntax for flags is accepted (both '-' and '--' are ok): |
| 60 // | 60 // |
| 61 // --flag (bool flags only) | 61 // --flag (bool flags only) |
| 62 // --noflag (bool flags only) | 62 // --noflag (bool flags only) |
| 63 // --flag=value (non-bool flags only, no spaces around '=') | 63 // --flag=value (non-bool flags only, no spaces around '=') |
| 64 // --flag value (non-bool flags only) | 64 // --flag value (non-bool flags only) |
| 65 // -- (equivalent to --js_arguments, captures all remaining args) | 65 // -- (equivalent to --js_arguments, captures all remaining args) |
| 66 static int SetFlagsFromCommandLine(int* argc, char** argv, bool remove_flags); | 66 static int SetFlagsFromCommandLine(int* argc, |
| 67 char** argv, |
| 68 bool remove_flags, |
| 69 bool serializer_enabled = false); |
| 67 | 70 |
| 68 // Set the flag values by parsing the string str. Splits string into argc | 71 // Set the flag values by parsing the string str. Splits string into argc |
| 69 // substrings argv[], each of which consisting of non-white-space chars, | 72 // substrings argv[], each of which consisting of non-white-space chars, |
| 70 // and then calls SetFlagsFromCommandLine() and returns its result. | 73 // and then calls SetFlagsFromCommandLine() and returns its result. |
| 71 static int SetFlagsFromString(const char* str, int len); | 74 static int SetFlagsFromString(const char* str, int len); |
| 72 | 75 |
| 73 // Reset all flags to their default value. | 76 // Reset all flags to their default value. |
| 74 static void ResetAllFlags(); | 77 static void ResetAllFlags(); |
| 75 | 78 |
| 76 // Print help to stdout with flags, types, and default values. | 79 // Print help to stdout with flags, types, and default values. |
| 77 static void PrintHelp(); | 80 static void PrintHelp(); |
| 78 | 81 |
| 79 // Set flags as consequence of being implied by another flag. | 82 // Set flags as consequence of being implied by another flag. |
| 80 static void EnforceFlagImplications(); | 83 static void EnforceFlagImplications(); |
| 84 |
| 85 private: |
| 86 // TODO(svenpanne) Remove this when Serializer/startup has been refactored. |
| 87 static bool serializer_enabled_; |
| 81 }; | 88 }; |
| 82 | 89 |
| 83 } } // namespace v8::internal | 90 } } // namespace v8::internal |
| 84 | 91 |
| 85 #endif // V8_FLAGS_H_ | 92 #endif // V8_FLAGS_H_ |
| OLD | NEW |