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

Unified Diff: src/interpreter/bytecode-peephole-optimizer.cc

Issue 1979523002: [interpreter] Remove BytecodeArrayBuilder::Illegal(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 7 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: src/interpreter/bytecode-peephole-optimizer.cc
diff --git a/src/interpreter/bytecode-peephole-optimizer.cc b/src/interpreter/bytecode-peephole-optimizer.cc
index 172bf3f220c9c55ee3eae04f15d61861d1bc197f..6b6589af41f544ecffea19a1615d6cdf88b0a811 100644
--- a/src/interpreter/bytecode-peephole-optimizer.cc
+++ b/src/interpreter/bytecode-peephole-optimizer.cc
@@ -17,21 +17,20 @@ BytecodePeepholeOptimizer::BytecodePeepholeOptimizer(
BytecodePipelineStage* next_stage)
: constant_array_builder_(constant_array_builder),
next_stage_(next_stage),
- last_(Bytecode::kNop),
- last_is_valid_(false),
last_is_discardable_(false) {
- // TODO(oth): Remove last_is_valid_ and use kIllegal for last_ when
- // not invalid. Currently blocked on bytecode generator emitting
- // kIllegal for entry not found in jump table.
+ InvalidateLast();
}
-void BytecodePeepholeOptimizer::InvalidateLast() { last_is_valid_ = false; }
+void BytecodePeepholeOptimizer::InvalidateLast() {
+ last_.set_bytecode(Bytecode::kIllegal);
+}
-bool BytecodePeepholeOptimizer::LastIsValid() const { return last_is_valid_; }
+bool BytecodePeepholeOptimizer::LastIsValid() const {
+ return last_.bytecode() != Bytecode::kIllegal;
+}
void BytecodePeepholeOptimizer::SetLast(const BytecodeNode* const node) {
last_.Clone(node);
- last_is_valid_ = true;
last_is_discardable_ = true;
}
« no previous file with comments | « src/interpreter/bytecode-peephole-optimizer.h ('k') | test/cctest/interpreter/bytecode_expectations/Generators.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698