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

Unified Diff: src/interpreter/bytecode-array-builder.cc

Issue 1259193004: [Interpreter] Consistency fixes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove redundant argument to Bytecodes::Decode(). Created 5 years, 4 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
« no previous file with comments | « no previous file | src/interpreter/bytecodes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-array-builder.cc
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc
index c9d1560df21a8ddce9ee118f363b228bb8720148..2bd1318ba1b7b044d00fea60c6935de56378bb76 100644
--- a/src/interpreter/bytecode-array-builder.cc
+++ b/src/interpreter/bytecode-array-builder.cc
@@ -24,6 +24,7 @@ void BytecodeArrayBuilder::set_locals_count(int number_of_locals) {
int BytecodeArrayBuilder::locals_count() const { return local_register_count_; }
+
Handle<BytecodeArray> BytecodeArrayBuilder::ToBytecodeArray() {
DCHECK_EQ(bytecode_generated_, false);
DCHECK_GE(local_register_count_, 0);
@@ -157,7 +158,7 @@ void BytecodeArrayBuilder::Output(Bytecode bytecode, uint8_t operand0,
void BytecodeArrayBuilder::Output(Bytecode bytecode, uint8_t operand0,
uint8_t operand1) {
- DCHECK(Bytecodes::NumberOfOperands(bytecode) == 2);
+ DCHECK_EQ(Bytecodes::NumberOfOperands(bytecode), 2);
DCHECK(OperandIsValid(bytecode, 0, operand0) &&
OperandIsValid(bytecode, 1, operand1));
bytecodes_.push_back(Bytecodes::ToByte(bytecode));
@@ -167,7 +168,7 @@ void BytecodeArrayBuilder::Output(Bytecode bytecode, uint8_t operand0,
void BytecodeArrayBuilder::Output(Bytecode bytecode, uint8_t operand0) {
- DCHECK(Bytecodes::NumberOfOperands(bytecode) == 1);
+ DCHECK_EQ(Bytecodes::NumberOfOperands(bytecode), 1);
DCHECK(OperandIsValid(bytecode, 0, operand0));
bytecodes_.push_back(Bytecodes::ToByte(bytecode));
bytecodes_.push_back(operand0);
@@ -175,7 +176,7 @@ void BytecodeArrayBuilder::Output(Bytecode bytecode, uint8_t operand0) {
void BytecodeArrayBuilder::Output(Bytecode bytecode) {
- DCHECK(Bytecodes::NumberOfOperands(bytecode) == 0);
+ DCHECK_EQ(Bytecodes::NumberOfOperands(bytecode), 0);
bytecodes_.push_back(Bytecodes::ToByte(bytecode));
}
« no previous file with comments | « no previous file | src/interpreter/bytecodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698