diff --git a/src/interpreter/interpreter-assembler.cc b/src/interpreter/interpreter-assembler.cc index 579c6346b1..6a0c1c49fb 100644 --- a/src/interpreter/interpreter-assembler.cc +++ b/src/interpreter/interpreter-assembler.cc @@ -541,7 +541,7 @@ TNode InterpreterAssembler::BytecodeOperandCount(int operand_index) { return BytecodeUnsignedOperand(operand_index, operand_size); } -TNode InterpreterAssembler::BytecodeOperandFlag(int operand_index) { +TNode InterpreterAssembler::BytecodeOperandFlag8(int operand_index) { DCHECK_EQ(OperandType::kFlag8, Bytecodes::GetOperandType(bytecode_, operand_index)); OperandSize operand_size = @@ -550,8 +550,7 @@ TNode InterpreterAssembler::BytecodeOperandFlag(int operand_index) { return BytecodeUnsignedOperand(operand_index, operand_size); } -TNode InterpreterAssembler::BytecodeOperandWideFlag( - int operand_index) { +TNode InterpreterAssembler::BytecodeOperandFlag16(int operand_index) { DCHECK_EQ(OperandType::kFlag16, Bytecodes::GetOperandType(bytecode_, operand_index)); OperandSize operand_size = diff --git a/src/interpreter/interpreter-assembler.h b/src/interpreter/interpreter-assembler.h index 654a5babcc..a809d00aa6 100644 --- a/src/interpreter/interpreter-assembler.h +++ b/src/interpreter/interpreter-assembler.h @@ -28,10 +28,10 @@ class V8_EXPORT_PRIVATE InterpreterAssembler : public CodeStubAssembler { TNode BytecodeOperandCount(int operand_index); // Returns the 32-bit unsigned flag for bytecode operand |operand_index| // in the current bytecode. - TNode BytecodeOperandFlag(int operand_index); + TNode BytecodeOperandFlag8(int operand_index); // Returns the 32-bit unsigned 2-byte flag for bytecode operand // |operand_index| in the current bytecode. - TNode BytecodeOperandWideFlag(int operand_index); + TNode BytecodeOperandFlag16(int operand_index); // Returns the 32-bit zero-extended index immediate for bytecode operand // |operand_index| in the current bytecode. TNode BytecodeOperandIdxInt32(int operand_index); diff --git a/src/interpreter/interpreter-generator.cc b/src/interpreter/interpreter-generator.cc index afbe89b36b..94cc0aa41b 100644 --- a/src/interpreter/interpreter-generator.cc +++ b/src/interpreter/interpreter-generator.cc @@ -462,7 +462,7 @@ IGNITION_HANDLER(LdaLookupGlobalSlotInsideTypeof, IGNITION_HANDLER(StaLookupSlot, InterpreterAssembler) { TNode value = GetAccumulator(); TNode name = CAST(LoadConstantPoolEntryAtOperandIndex(0)); - TNode bytecode_flags = BytecodeOperandFlag(1); + TNode bytecode_flags = BytecodeOperandFlag8(1); TNode context = GetContext(); TVARIABLE(Object, var_result); @@ -732,7 +732,7 @@ IGNITION_HANDLER(DefineKeyedOwnPropertyInLiteral, InterpreterAssembler) { TNode name = LoadRegisterAtOperandIndex(1); TNode value = GetAccumulator(); TNode flags = - SmiFromInt32(UncheckedCast(BytecodeOperandFlag(2))); + SmiFromInt32(UncheckedCast(BytecodeOperandFlag8(2))); TNode slot = BytecodeOperandIdxTaggedIndex(3); TNode feedback_vector = LoadFeedbackVector(); @@ -1775,7 +1775,7 @@ IGNITION_HANDLER(TestUndefined, InterpreterAssembler) { // by |literal_flag|. IGNITION_HANDLER(TestTypeOf, InterpreterAssembler) { TNode object = GetAccumulator(); - TNode literal_flag = BytecodeOperandFlag(0); + TNode literal_flag = BytecodeOperandFlag8(0); #define MAKE_LABEL(name, lower_case) Label if_##lower_case(this); TYPEOF_LITERAL_LIST(MAKE_LABEL) @@ -2260,7 +2260,7 @@ IGNITION_HANDLER(CreateRegExpLiteral, InterpreterAssembler) { TNode feedback_vector = LoadFeedbackVector(); TNode slot = BytecodeOperandIdxTaggedIndex(1); TNode flags = - SmiFromInt32(UncheckedCast(BytecodeOperandWideFlag(2))); + SmiFromInt32(UncheckedCast(BytecodeOperandFlag16(2))); TNode context = GetContext(); TVARIABLE(JSRegExp, result); @@ -2280,7 +2280,7 @@ IGNITION_HANDLER(CreateArrayLiteral, InterpreterAssembler) { TNode feedback_vector = LoadFeedbackVector(); TNode slot = BytecodeOperandIdxTaggedIndex(1); TNode context = GetContext(); - TNode bytecode_flags = BytecodeOperandFlag(2); + TNode bytecode_flags = BytecodeOperandFlag8(2); Label fast_shallow_clone(this), call_runtime(this, Label::kDeferred); // No feedback, so handle it as a slow case. @@ -2368,7 +2368,7 @@ IGNITION_HANDLER(CreateArrayFromIterable, InterpreterAssembler) { IGNITION_HANDLER(CreateObjectLiteral, InterpreterAssembler) { TNode feedback_vector = LoadFeedbackVector(); TNode slot = BytecodeOperandIdxTaggedIndex(1); - TNode bytecode_flags = BytecodeOperandFlag(2); + TNode bytecode_flags = BytecodeOperandFlag8(2); Label if_fast_clone(this), if_not_fast_clone(this, Label::kDeferred); // No feedback, so handle it as a slow case. @@ -2428,7 +2428,7 @@ IGNITION_HANDLER(CreateEmptyObjectLiteral, InterpreterAssembler) { // {source}, converting getters into data properties. IGNITION_HANDLER(CloneObject, InterpreterAssembler) { TNode source = LoadRegisterAtOperandIndex(0); - TNode bytecode_flags = BytecodeOperandFlag(1); + TNode bytecode_flags = BytecodeOperandFlag8(1); TNode raw_flags = DecodeWordFromWord32(bytecode_flags); TNode smi_flags = SmiTag(Signed(raw_flags)); @@ -2468,7 +2468,7 @@ IGNITION_HANDLER(GetTemplateObject, InterpreterAssembler) { // constant pool and with pretenuring controlled by |flags|. IGNITION_HANDLER(CreateClosure, InterpreterAssembler) { TNode shared = LoadConstantPoolEntryAtOperandIndex(0); - TNode flags = BytecodeOperandFlag(2); + TNode flags = BytecodeOperandFlag8(2); TNode context = GetContext(); TNode slot = BytecodeOperandIdx(1); diff --git a/test/unittests/interpreter/interpreter-assembler-unittest.cc b/test/unittests/interpreter/interpreter-assembler-unittest.cc index 53defac32d..dcb6b72c35 100644 --- a/test/unittests/interpreter/interpreter-assembler-unittest.cc +++ b/test/unittests/interpreter/interpreter-assembler-unittest.cc @@ -317,11 +317,11 @@ TARGET_TEST_F(InterpreterAssemblerTest, BytecodeOperand) { m.IsUnsignedOperand(offset, operand_size)); break; case interpreter::OperandType::kFlag8: - EXPECT_THAT(m.BytecodeOperandFlag(i), + EXPECT_THAT(m.BytecodeOperandFlag8(i), m.IsUnsignedOperand(offset, operand_size)); break; case interpreter::OperandType::kFlag16: - EXPECT_THAT(m.BytecodeOperandWideFlag(i), + EXPECT_THAT(m.BytecodeOperandFlag16(i), m.IsUnsignedOperand(offset, operand_size)); break; case interpreter::OperandType::kIdx: