Reland of [Interpreter] Rename GetCountOperand to GetRegisterCountOperand.
Apparently, this BytecodeArrayIterator method was missed during the previous refactor. No other (collateral) change was done. BUG=v8:4280 LOG=N Review URL: https://codereview.chromium.org/1691433002 Cr-Commit-Position: refs/heads/master@{#33909}
This commit is contained in:
parent
ffcff3a0f2
commit
2f0ac9a2cd
@ -1050,7 +1050,7 @@ void BytecodeGraphBuilder::BuildCall() {
|
||||
Node* callee =
|
||||
environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0));
|
||||
interpreter::Register receiver = bytecode_iterator().GetRegisterOperand(1);
|
||||
size_t arg_count = bytecode_iterator().GetCountOperand(2);
|
||||
size_t arg_count = bytecode_iterator().GetRegisterCountOperand(2);
|
||||
VectorSlotPair feedback =
|
||||
CreateVectorSlotPair(bytecode_iterator().GetIndexOperand(3));
|
||||
|
||||
@ -1070,7 +1070,7 @@ void BytecodeGraphBuilder::BuildCallJSRuntime() {
|
||||
Node* callee =
|
||||
BuildLoadNativeContextField(bytecode_iterator().GetIndexOperand(0));
|
||||
interpreter::Register receiver = bytecode_iterator().GetRegisterOperand(1);
|
||||
size_t arg_count = bytecode_iterator().GetCountOperand(2);
|
||||
size_t arg_count = bytecode_iterator().GetRegisterCountOperand(2);
|
||||
|
||||
// Create node to perform the JS runtime call.
|
||||
const Operator* call =
|
||||
@ -1101,7 +1101,7 @@ void BytecodeGraphBuilder::BuildCallRuntime() {
|
||||
Runtime::FunctionId functionId =
|
||||
static_cast<Runtime::FunctionId>(bytecode_iterator().GetIndexOperand(0));
|
||||
interpreter::Register first_arg = bytecode_iterator().GetRegisterOperand(1);
|
||||
size_t arg_count = bytecode_iterator().GetCountOperand(2);
|
||||
size_t arg_count = bytecode_iterator().GetRegisterCountOperand(2);
|
||||
|
||||
// Create node to perform the runtime call.
|
||||
const Operator* call = javascript()->CallRuntime(functionId, arg_count);
|
||||
@ -1118,7 +1118,7 @@ void BytecodeGraphBuilder::BuildCallRuntimeForPair() {
|
||||
Runtime::FunctionId functionId =
|
||||
static_cast<Runtime::FunctionId>(bytecode_iterator().GetIndexOperand(0));
|
||||
interpreter::Register first_arg = bytecode_iterator().GetRegisterOperand(1);
|
||||
size_t arg_count = bytecode_iterator().GetCountOperand(2);
|
||||
size_t arg_count = bytecode_iterator().GetRegisterCountOperand(2);
|
||||
interpreter::Register first_return =
|
||||
bytecode_iterator().GetRegisterOperand(3);
|
||||
|
||||
@ -1157,7 +1157,7 @@ void BytecodeGraphBuilder::BuildCallConstruct() {
|
||||
FrameStateBeforeAndAfter states(this);
|
||||
interpreter::Register callee = bytecode_iterator().GetRegisterOperand(0);
|
||||
interpreter::Register first_arg = bytecode_iterator().GetRegisterOperand(1);
|
||||
size_t arg_count = bytecode_iterator().GetCountOperand(2);
|
||||
size_t arg_count = bytecode_iterator().GetRegisterCountOperand(2);
|
||||
|
||||
// TODO(turbofan): Pass the feedback here.
|
||||
const Operator* call = javascript()->CallConstruct(
|
||||
|
@ -63,8 +63,7 @@ int8_t BytecodeArrayIterator::GetImmediateOperand(int operand_index) const {
|
||||
return static_cast<int8_t>(operand);
|
||||
}
|
||||
|
||||
|
||||
int BytecodeArrayIterator::GetCountOperand(int operand_index) const {
|
||||
int BytecodeArrayIterator::GetRegisterCountOperand(int operand_index) const {
|
||||
OperandSize size =
|
||||
Bytecodes::GetOperandSize(current_bytecode(), operand_index);
|
||||
OperandType type = (size == OperandSize::kByte) ? OperandType::kRegCount8
|
||||
@ -131,7 +130,7 @@ int BytecodeArrayIterator::GetRegisterOperandRange(int operand_index) const {
|
||||
OperandType next_operand_type =
|
||||
Bytecodes::GetOperandType(current_bytecode(), operand_index + 1);
|
||||
if (Bytecodes::IsRegisterCountOperandType(next_operand_type)) {
|
||||
return GetCountOperand(operand_index + 1);
|
||||
return GetRegisterCountOperand(operand_index + 1);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
|
@ -29,7 +29,7 @@ class BytecodeArrayIterator {
|
||||
|
||||
int8_t GetImmediateOperand(int operand_index) const;
|
||||
int GetIndexOperand(int operand_index) const;
|
||||
int GetCountOperand(int operand_index) const;
|
||||
int GetRegisterCountOperand(int operand_index) const;
|
||||
Register GetRegisterOperand(int operand_index) const;
|
||||
int GetRegisterOperandRange(int operand_index) const;
|
||||
Handle<Object> GetConstantForIndexOperand(int operand_index) const;
|
||||
|
@ -184,7 +184,7 @@ void PrintBytecodeOperand(std::ostream& stream,
|
||||
// We need a cast, otherwise the result is printed as char.
|
||||
stream << static_cast<int>(bytecode_iter.GetImmediateOperand(op_index));
|
||||
} else if (Bytecodes::IsRegisterCountOperandType(op_type)) {
|
||||
stream << bytecode_iter.GetCountOperand(op_index);
|
||||
stream << bytecode_iter.GetRegisterCountOperand(op_index);
|
||||
} else if (Bytecodes::IsIndexOperandType(op_type)) {
|
||||
stream << bytecode_iter.GetIndexOperand(op_index);
|
||||
} else {
|
||||
|
@ -95,7 +95,7 @@ TEST_F(BytecodeArrayIteratorTest, IteratesBytecodeArray) {
|
||||
CHECK_EQ(static_cast<Runtime::FunctionId>(iterator.GetIndexOperand(0)),
|
||||
Runtime::kLoadIC_Miss);
|
||||
CHECK_EQ(iterator.GetRegisterOperand(1).index(), reg_0.index());
|
||||
CHECK_EQ(iterator.GetCountOperand(2), 1);
|
||||
CHECK_EQ(iterator.GetRegisterCountOperand(2), 1);
|
||||
CHECK(!iterator.done());
|
||||
iterator.Advance();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user