diff options
Diffstat (limited to 'deps/v8/test/cctest/interpreter/generate-bytecode-expectations.cc')
-rw-r--r-- | deps/v8/test/cctest/interpreter/generate-bytecode-expectations.cc | 38 |
1 files changed, 2 insertions, 36 deletions
diff --git a/deps/v8/test/cctest/interpreter/generate-bytecode-expectations.cc b/deps/v8/test/cctest/interpreter/generate-bytecode-expectations.cc index 245d9d9afd..af18097284 100644 --- a/deps/v8/test/cctest/interpreter/generate-bytecode-expectations.cc +++ b/deps/v8/test/cctest/interpreter/generate-bytecode-expectations.cc @@ -43,10 +43,7 @@ class ProgramOptions final { print_callee_(false), oneshot_opt_(false), async_iteration_(false), - public_fields_(false), - private_fields_(false), private_methods_(false), - static_fields_(false), verbose_(false) {} bool Validate() const; @@ -67,10 +64,7 @@ class ProgramOptions final { bool print_callee() const { return print_callee_; } bool oneshot_opt() const { return oneshot_opt_; } bool async_iteration() const { return async_iteration_; } - bool public_fields() const { return public_fields_; } - bool private_fields() const { return private_fields_; } bool private_methods() const { return private_methods_; } - bool static_fields() const { return static_fields_; } bool verbose() const { return verbose_; } bool suppress_runtime_errors() const { return rebaseline_ && !verbose_; } std::vector<std::string> input_filenames() const { return input_filenames_; } @@ -89,10 +83,7 @@ class ProgramOptions final { bool print_callee_; bool oneshot_opt_; bool async_iteration_; - bool public_fields_; - bool private_fields_; bool private_methods_; - bool static_fields_; bool verbose_; std::vector<std::string> input_filenames_; std::string output_filename_; @@ -134,8 +125,8 @@ bool CollectGoldenFiles(std::vector<std::string>* golden_file_list, if (!directory) return false; auto str_ends_with = [](const char* string, const char* suffix) { - int string_size = i::StrLength(string); - int suffix_size = i::StrLength(suffix); + size_t string_size = strlen(string); + size_t suffix_size = strlen(suffix); if (string_size < suffix_size) return false; return strcmp(string + (string_size - suffix_size), suffix) == 0; @@ -195,14 +186,8 @@ ProgramOptions ProgramOptions::FromCommandLine(int argc, char** argv) { options.oneshot_opt_ = false; } else if (strcmp(argv[i], "--async-iteration") == 0) { options.async_iteration_ = true; - } else if (strcmp(argv[i], "--public-fields") == 0) { - options.public_fields_ = true; - } else if (strcmp(argv[i], "--private-fields") == 0) { - options.private_fields_ = true; } else if (strcmp(argv[i], "--private-methods") == 0) { options.private_methods_ = true; - } else if (strcmp(argv[i], "--static-fields") == 0) { - options.static_fields_ = true; } else if (strcmp(argv[i], "--verbose") == 0) { options.verbose_ = true; } else if (strncmp(argv[i], "--output=", 9) == 0) { @@ -312,21 +297,14 @@ void ProgramOptions::UpdateFromHeader(std::istream& stream) { oneshot_opt_ = ParseBoolean(line.c_str() + strlen(kOneshotOpt)); } else if (line.compare(0, 17, "async iteration: ") == 0) { async_iteration_ = ParseBoolean(line.c_str() + 17); - } else if (line.compare(0, 15, "public fields: ") == 0) { - public_fields_ = ParseBoolean(line.c_str() + 15); - } else if (line.compare(0, 16, "private fields: ") == 0) { - private_fields_ = ParseBoolean(line.c_str() + 16); } else if (line.compare(0, 16, "private methods: ") == 0) { private_methods_ = ParseBoolean(line.c_str() + 16); - } else if (line.compare(0, 15, "static fields: ") == 0) { - static_fields_ = ParseBoolean(line.c_str() + 15); } else if (line == "---") { break; } else if (line.empty()) { continue; } else { UNREACHABLE(); - return; } } } @@ -344,10 +322,7 @@ void ProgramOptions::PrintHeader(std::ostream& stream) const { // NOLINT if (print_callee_) stream << "\nprint callee: yes"; if (oneshot_opt_) stream << "\noneshot opt: yes"; if (async_iteration_) stream << "\nasync iteration: yes"; - if (public_fields_) stream << "\npublic fields: yes"; - if (private_fields_) stream << "\nprivate fields: yes"; if (private_methods_) stream << "\nprivate methods: yes"; - if (static_fields_) stream << "\nstatic fields: yes"; stream << "\n\n"; } @@ -456,10 +431,7 @@ void GenerateExpectationsFile(std::ostream& stream, // NOLINT printer.set_test_function_name(options.test_function_name()); } - if (options.public_fields()) i::FLAG_harmony_public_fields = true; - if (options.private_fields()) i::FLAG_harmony_private_fields = true; if (options.private_methods()) i::FLAG_harmony_private_methods = true; - if (options.static_fields()) i::FLAG_harmony_static_fields = true; stream << "#\n# Autogenerated by generate-bytecode-expectations.\n#\n\n"; options.PrintHeader(stream); @@ -467,10 +439,7 @@ void GenerateExpectationsFile(std::ostream& stream, // NOLINT printer.PrintExpectation(stream, snippet); } - i::FLAG_harmony_public_fields = false; - i::FLAG_harmony_private_fields = false; i::FLAG_harmony_private_methods = false; - i::FLAG_harmony_static_fields = false; } bool WriteExpectationsFile(const std::vector<std::string>& snippet_list, @@ -519,10 +488,7 @@ void PrintUsage(const char* exec_path) { " --test-function-name=foo " "Specify the name of the test function.\n" " --top-level Process top level code, not the top-level function.\n" - " --public-fields Enable harmony_public_fields flag.\n" - " --private-fields Enable harmony_private_fields flag.\n" " --private-methods Enable harmony_private_methods flag.\n" - " --static-fields Enable harmony_static_fields flag.\n" " --output=file.name\n" " Specify the output file. If not specified, output goes to " "stdout.\n" |