Index: src/compiler/interpreter-assembler.cc |
diff --git a/src/compiler/interpreter-assembler.cc b/src/compiler/interpreter-assembler.cc |
index d6ca45fc54f5a0e9cc7538fdc6644c9da9308fc1..25d1b5eacffe1ef208e2553eef4246e1da0df9f6 100644 |
--- a/src/compiler/interpreter-assembler.cc |
+++ b/src/compiler/interpreter-assembler.cc |
@@ -147,6 +147,13 @@ Node* InterpreterAssembler::BytecodeOperandImm8(int operand_index) { |
} |
+Node* InterpreterAssembler::BytecodeOperandIdx(int operand_index) { |
+ DCHECK_EQ(interpreter::OperandType::kIdx, |
+ interpreter::Bytecodes::GetOperandType(bytecode_, operand_index)); |
+ return BytecodeOperand(operand_index); |
+} |
+ |
+ |
Node* InterpreterAssembler::BytecodeOperandReg(int operand_index) { |
DCHECK_EQ(interpreter::OperandType::kReg, |
interpreter::Bytecodes::GetOperandType(bytecode_, operand_index)); |
@@ -189,6 +196,16 @@ Node* InterpreterAssembler::SmiUntag(Node* value) { |
} |
+Node* InterpreterAssembler::LoadConstantPoolEntry(Node* index) { |
+ Node* constant_pool = LoadObjectField(BytecodeArrayTaggedPointer(), |
+ BytecodeArray::kConstantPoolOffset); |
+ Node* entry_offset = raw_assembler_->IntPtrAdd( |
+ IntPtrConstant(FixedArray::kHeaderSize - kHeapObjectTag), |
+ raw_assembler_->WordShl(index, Int32Constant(kPointerSizeLog2))); |
+ return raw_assembler_->Load(kMachAnyTagged, constant_pool, entry_offset); |
+} |
+ |
+ |
Node* InterpreterAssembler::LoadObjectField(Node* object, int offset) { |
return raw_assembler_->Load(kMachAnyTagged, object, |
IntPtrConstant(offset - kHeapObjectTag)); |