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

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

Issue 1717293002: [Interpreter] Refactor bytecode generator test suite. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Reflow REPEAT_249 macro. Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 <cstring> 5 #include <cstring>
6 #include <fstream> 6 #include <fstream>
7 7
8 #include "test/cctest/interpreter/bytecode-expectations-printer.h" 8 #include "test/cctest/interpreter/bytecode-expectations-printer.h"
9 9
10 #include "include/libplatform/libplatform.h" 10 #include "include/libplatform/libplatform.h"
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 printer.set_wrap(options.wrap()); 374 printer.set_wrap(options.wrap());
375 printer.set_execute(options.execute()); 375 printer.set_execute(options.execute());
376 printer.set_top_level(options.top_level()); 376 printer.set_top_level(options.top_level());
377 if (!options.test_function_name().empty()) { 377 if (!options.test_function_name().empty()) {
378 printer.set_test_function_name(options.test_function_name()); 378 printer.set_test_function_name(options.test_function_name());
379 } 379 }
380 380
381 if (options.legacy_const()) i::FLAG_legacy_const = true; 381 if (options.legacy_const()) i::FLAG_legacy_const = true;
382 if (options.do_expressions()) i::FLAG_harmony_do_expressions = true; 382 if (options.do_expressions()) i::FLAG_harmony_do_expressions = true;
383 383
384 stream << "#\n# Autogenerated by generate-bytecode-expectations\n#\n\n"; 384 stream << "#\n# Autogenerated by generate-bytecode-expectations.\n#\n\n";
385 options.PrintHeader(stream); 385 options.PrintHeader(stream);
386 for (const std::string& snippet : snippet_list) { 386 for (const std::string& snippet : snippet_list) {
387 printer.PrintExpectation(stream, snippet); 387 printer.PrintExpectation(stream, snippet);
388 } 388 }
389 } 389 }
390 } 390 }
391 391
392 void PrintUsage(const char* exec_path) { 392 void PrintUsage(const char* exec_path) {
393 std::cerr 393 std::cerr
394 << "\nUsage: " << exec_path 394 << "\nUsage: " << exec_path
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 std::cerr << "ERROR: Could not open '" << options.output_filename() 460 std::cerr << "ERROR: Could not open '" << options.output_filename()
461 << "' for writing.\n"; 461 << "' for writing.\n";
462 return 3; 462 return 3;
463 } 463 }
464 } 464 }
465 std::ostream& output_stream = 465 std::ostream& output_stream =
466 options.write_to_stdout() ? std::cout : output_file_handle; 466 options.write_to_stdout() ? std::cout : output_file_handle;
467 467
468 GenerateExpectationsFile(output_stream, snippet_list, options, argv[0]); 468 GenerateExpectationsFile(output_stream, snippet_list, options, argv[0]);
469 } 469 }
OLDNEW
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/WithStatement.golden ('k') | test/cctest/interpreter/test-bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698