Index: test/cctest/interpreter/generate-bytecode-expectations.cc |
diff --git a/test/cctest/interpreter/generate-bytecode-expectations.cc b/test/cctest/interpreter/generate-bytecode-expectations.cc |
index 92ba9ba0bd49d1caa318243762adbaaa7a1569b1..bba382340a2946155eabb682c0a3307e06017e0c 100644 |
--- a/test/cctest/interpreter/generate-bytecode-expectations.cc |
+++ b/test/cctest/interpreter/generate-bytecode-expectations.cc |
@@ -44,6 +44,7 @@ class ProgramOptions final { |
execute_(true), |
top_level_(false), |
do_expressions_(false), |
+ ignition_generators_(false), |
verbose_(false), |
const_pool_type_( |
BytecodeExpectationsPrinter::ConstantPoolType::kMixed) {} |
@@ -64,6 +65,7 @@ class ProgramOptions final { |
bool execute() const { return execute_; } |
bool top_level() const { return top_level_; } |
bool do_expressions() const { return do_expressions_; } |
+ bool ignition_generators() const { return ignition_generators_; } |
bool verbose() const { return verbose_; } |
bool suppress_runtime_errors() const { return rebaseline_ && !verbose_; } |
BytecodeExpectationsPrinter::ConstantPoolType const_pool_type() const { |
@@ -83,6 +85,7 @@ class ProgramOptions final { |
bool execute_; |
bool top_level_; |
bool do_expressions_; |
+ bool ignition_generators_; |
bool verbose_; |
BytecodeExpectationsPrinter::ConstantPoolType const_pool_type_; |
std::vector<std::string> input_filenames_; |
@@ -212,6 +215,8 @@ ProgramOptions ProgramOptions::FromCommandLine(int argc, char** argv) { |
options.top_level_ = true; |
} else if (strcmp(argv[i], "--do-expressions") == 0) { |
options.do_expressions_ = true; |
+ } else if (strcmp(argv[i], "--ignition-generators") == 0) { |
+ options.ignition_generators_ = true; |
} else if (strcmp(argv[i], "--verbose") == 0) { |
options.verbose_ = true; |
} else if (strncmp(argv[i], "--output=", 9) == 0) { |
@@ -316,6 +321,8 @@ void ProgramOptions::UpdateFromHeader(std::istream& stream) { |
top_level_ = ParseBoolean(line.c_str() + 11); |
} else if (line.compare(0, 16, "do expressions: ") == 0) { |
do_expressions_ = ParseBoolean(line.c_str() + 16); |
+ } else if (line.compare(0, 21, "ignition generators: ") == 0) { |
+ do_expressions_ = ParseBoolean(line.c_str() + 21); |
} else if (line == "---") { |
break; |
} else if (line.empty()) { |
@@ -340,6 +347,7 @@ void ProgramOptions::PrintHeader(std::ostream& stream) const { // NOLINT |
if (top_level_) stream << "\ntop level: yes"; |
if (do_expressions_) stream << "\ndo expressions: yes"; |
+ if (ignition_generators_) stream << "\nignition generators: yes"; |
stream << "\n\n"; |
} |
@@ -445,6 +453,7 @@ void GenerateExpectationsFile(std::ostream& stream, // NOLINT |
} |
if (options.do_expressions()) i::FLAG_harmony_do_expressions = true; |
+ if (options.ignition_generators()) i::FLAG_ignition_generators = true; |
stream << "#\n# Autogenerated by generate-bytecode-expectations.\n#\n\n"; |
options.PrintHeader(stream); |
@@ -497,6 +506,7 @@ void PrintUsage(const char* exec_path) { |
"Specify the name of the test function.\n" |
" --top-level Process top level code, not the top-level function.\n" |
" --do-expressions Enable harmony_do_expressions flag.\n" |
+ " --ignition-generators Enable ignition_generators flag.\n" |
" --output=file.name\n" |
" Specify the output file. If not specified, output goes to " |
"stdout.\n" |