Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
[interpreter] Remove redundant flag from bytecode cctest suite.
Browse files Browse the repository at this point in the history
This removes the execute_ flag, which was always the negation of top_level_.

R=rmcilroy@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2390163003
Cr-Commit-Position: refs/heads/master@{#39961}
  • Loading branch information
GeorgNeis authored and Commit bot committed Oct 4, 2016
1 parent efcb1ff commit 99cfa5f
Show file tree
Hide file tree
Showing 75 changed files with 11 additions and 97 deletions.
12 changes: 7 additions & 5 deletions test/cctest/interpreter/bytecode-expectations-printer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,13 @@ void BytecodeExpectationsPrinter::PrintExpectation(

v8::Local<v8::Script> script = Compile(source_code.c_str());

if (execute_) Run(script);

i::Handle<i::BytecodeArray> bytecode_array =
top_level_ ? GetBytecodeArrayForScript(script)
: GetBytecodeArrayForGlobal(test_function_name_.c_str());
i::Handle<i::BytecodeArray> bytecode_array;
if (top_level_) {
bytecode_array = GetBytecodeArrayForScript(script);
} else {
Run(script);
bytecode_array = GetBytecodeArrayForGlobal(test_function_name_.c_str());
}

stream << "---\n";
PrintCodeSnippet(stream, snippet);
Expand Down
5 changes: 0 additions & 5 deletions test/cctest/interpreter/bytecode-expectations-printer.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,13 @@ class BytecodeExpectationsPrinter final {
public:
explicit BytecodeExpectationsPrinter(v8::Isolate* i)
: isolate_(i),
execute_(true),
wrap_(true),
top_level_(false),
test_function_name_(kDefaultTopFunctionName) {}

void PrintExpectation(std::ostream& stream, // NOLINT
const std::string& snippet) const;

void set_execute(bool execute) { execute_ = execute; }
bool execute() const { return execute_; }

void set_wrap(bool wrap) { wrap_ = wrap; }
bool wrap() const { return wrap_; }

Expand Down Expand Up @@ -96,7 +92,6 @@ class BytecodeExpectationsPrinter final {
}

v8::Isolate* isolate_;
bool execute_;
bool wrap_;
bool top_level_;
std::string test_function_name_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: no
test function name: f

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: no
test function name: f

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: no
test function name: f

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: no
test function name: test

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: no
test function name: f

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: no
test function name: f

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: no
test function name: f

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: no
wrap: no
top level: yes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: no
test function name: f

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes
do expressions: yes

Expand Down
1 change: 0 additions & 1 deletion test/cctest/interpreter/bytecode_expectations/Eval.golden
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes

---
Expand Down
1 change: 0 additions & 1 deletion test/cctest/interpreter/bytecode_expectations/ForIn.golden
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes

---
Expand Down
1 change: 0 additions & 1 deletion test/cctest/interpreter/bytecode_expectations/ForOf.golden
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: no
test function name: f

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: no
test function name: f

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: no
test function name: f

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: no
test function name: f

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: no
test function name: f

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: no
test function name: f

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

---
execute: yes
wrap: yes
test function name: f

Expand Down
Loading

0 comments on commit 99cfa5f

Please sign in to comment.