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

Side by Side Diff: test/cctest/interpreter/bytecode-expectations-printer.h

Issue 2390163003: [interpreter] Remove redundant flag from bytecode cctest suite. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | test/cctest/interpreter/bytecode-expectations-printer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef TEST_CCTEST_INTERPRETER_BYTECODE_EXPECTATIONS_PRINTER_H_ 5 #ifndef TEST_CCTEST_INTERPRETER_BYTECODE_EXPECTATIONS_PRINTER_H_
6 #define TEST_CCTEST_INTERPRETER_BYTECODE_EXPECTATIONS_PRINTER_H_ 6 #define TEST_CCTEST_INTERPRETER_BYTECODE_EXPECTATIONS_PRINTER_H_
7 7
8 #include <iostream> 8 #include <iostream>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 10 matching lines...) Expand all
21 class SourcePositionTableIterator; 21 class SourcePositionTableIterator;
22 22
23 namespace interpreter { 23 namespace interpreter {
24 24
25 class BytecodeArrayIterator; 25 class BytecodeArrayIterator;
26 26
27 class BytecodeExpectationsPrinter final { 27 class BytecodeExpectationsPrinter final {
28 public: 28 public:
29 explicit BytecodeExpectationsPrinter(v8::Isolate* i) 29 explicit BytecodeExpectationsPrinter(v8::Isolate* i)
30 : isolate_(i), 30 : isolate_(i),
31 execute_(true),
32 wrap_(true), 31 wrap_(true),
33 top_level_(false), 32 top_level_(false),
34 test_function_name_(kDefaultTopFunctionName) {} 33 test_function_name_(kDefaultTopFunctionName) {}
35 34
36 void PrintExpectation(std::ostream& stream, // NOLINT 35 void PrintExpectation(std::ostream& stream, // NOLINT
37 const std::string& snippet) const; 36 const std::string& snippet) const;
38 37
39 void set_execute(bool execute) { execute_ = execute; }
40 bool execute() const { return execute_; }
41
42 void set_wrap(bool wrap) { wrap_ = wrap; } 38 void set_wrap(bool wrap) { wrap_ = wrap; }
43 bool wrap() const { return wrap_; } 39 bool wrap() const { return wrap_; }
44 40
45 void set_top_level(bool top_level) { top_level_ = top_level; } 41 void set_top_level(bool top_level) { top_level_ = top_level; }
46 bool top_level() const { return top_level_; } 42 bool top_level() const { return top_level_; }
47 43
48 void set_test_function_name(const std::string& test_function_name) { 44 void set_test_function_name(const std::string& test_function_name) {
49 test_function_name_ = test_function_name; 45 test_function_name_ = test_function_name;
50 } 46 }
51 std::string test_function_name() const { return test_function_name_; } 47 std::string test_function_name() const { return test_function_name_; }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 i::Handle<i::BytecodeArray> GetBytecodeArrayForGlobal( 85 i::Handle<i::BytecodeArray> GetBytecodeArrayForGlobal(
90 const char* global_name) const; 86 const char* global_name) const;
91 i::Handle<v8::internal::BytecodeArray> GetBytecodeArrayForScript( 87 i::Handle<v8::internal::BytecodeArray> GetBytecodeArrayForScript(
92 v8::Local<v8::Script> script) const; 88 v8::Local<v8::Script> script) const;
93 89
94 i::Isolate* i_isolate() const { 90 i::Isolate* i_isolate() const {
95 return reinterpret_cast<i::Isolate*>(isolate_); 91 return reinterpret_cast<i::Isolate*>(isolate_);
96 } 92 }
97 93
98 v8::Isolate* isolate_; 94 v8::Isolate* isolate_;
99 bool execute_;
100 bool wrap_; 95 bool wrap_;
101 bool top_level_; 96 bool top_level_;
102 std::string test_function_name_; 97 std::string test_function_name_;
103 98
104 static const char* const kDefaultTopFunctionName; 99 static const char* const kDefaultTopFunctionName;
105 static const char* const kIndent; 100 static const char* const kIndent;
106 }; 101 };
107 102
108 } // namespace interpreter 103 } // namespace interpreter
109 } // namespace internal 104 } // namespace internal
110 } // namespace v8 105 } // namespace v8
111 106
112 #endif // TEST_CCTEST_INTERPRETER_BYTECODE_EXPECTATIONS_PRINTER_H_ 107 #endif // TEST_CCTEST_INTERPRETER_BYTECODE_EXPECTATIONS_PRINTER_H_
OLDNEW
« no previous file with comments | « no previous file | test/cctest/interpreter/bytecode-expectations-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698