Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(259)

Unified Diff: test/cctest/interpreter/generate-bytecode-expectations.cc

Issue 2330473002: Class fields, part 3 (backends)
Patch Set: bytecode test Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 b9276da6b01df3711d7074445c942a11d399bda5..86e8c3e0da44a58b6287b01fb1c4ec8f7b603bb7 100644
--- a/test/cctest/interpreter/generate-bytecode-expectations.cc
+++ b/test/cctest/interpreter/generate-bytecode-expectations.cc
@@ -43,6 +43,7 @@ class ProgramOptions final {
execute_(true),
top_level_(false),
do_expressions_(false),
+ class_fields_(false),
verbose_(false) {}
bool Validate() const;
@@ -61,6 +62,7 @@ class ProgramOptions final {
bool execute() const { return execute_; }
bool top_level() const { return top_level_; }
bool do_expressions() const { return do_expressions_; }
+ bool class_fields() const { return class_fields_; }
bool verbose() const { return verbose_; }
bool suppress_runtime_errors() const { return rebaseline_ && !verbose_; }
std::vector<std::string> input_filenames() const { return input_filenames_; }
@@ -77,6 +79,7 @@ class ProgramOptions final {
bool execute_;
bool top_level_;
bool do_expressions_;
+ bool class_fields_;
bool verbose_;
std::vector<std::string> input_filenames_;
std::string output_filename_;
@@ -166,6 +169,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], "--class-fields") == 0) {
+ options.class_fields_ = true;
} else if (strcmp(argv[i], "--verbose") == 0) {
options.verbose_ = true;
} else if (strncmp(argv[i], "--output=", 9) == 0) {
@@ -262,6 +267,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, 14, "class fields: ") == 0) {
+ class_fields_ = ParseBoolean(line.c_str() + 14);
} else if (line == "---") {
break;
} else if (line.empty()) {
@@ -284,6 +291,7 @@ void ProgramOptions::PrintHeader(std::ostream& stream) const { // NOLINT
if (top_level_) stream << "\ntop level: yes";
if (do_expressions_) stream << "\ndo expressions: yes";
+ if (class_fields_) stream << "\nclass fields: yes";
stream << "\n\n";
}
@@ -388,6 +396,7 @@ void GenerateExpectationsFile(std::ostream& stream, // NOLINT
}
if (options.do_expressions()) i::FLAG_harmony_do_expressions = true;
+ if (options.class_fields()) i::FLAG_harmony_class_fields = true;
stream << "#\n# Autogenerated by generate-bytecode-expectations.\n#\n\n";
options.PrintHeader(stream);
@@ -396,6 +405,7 @@ void GenerateExpectationsFile(std::ostream& stream, // NOLINT
}
i::FLAG_harmony_do_expressions = false;
+ i::FLAG_harmony_class_fields = false;
}
bool WriteExpectationsFile(const std::vector<std::string>& snippet_list,
@@ -440,6 +450,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"
+ " --class-fields Enable harmony_class-fields flag.\n"
" --output=file.name\n"
" Specify the output file. If not specified, output goes to "
"stdout.\n"
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/ClassFields.golden ('k') | test/cctest/interpreter/test-bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698