Chromium Code Reviews| Index: src/interpreter/interpreter-assembler.h |
| diff --git a/src/interpreter/interpreter-assembler.h b/src/interpreter/interpreter-assembler.h |
| index 2a1672a9114f63e7e86bb6ac6f5bfbeadfd1fdca..2e135291065405771389c6ffae76f9b99f7e74a5 100644 |
| --- a/src/interpreter/interpreter-assembler.h |
| +++ b/src/interpreter/interpreter-assembler.h |
| @@ -19,12 +19,16 @@ namespace interpreter { |
| class InterpreterAssembler : public compiler::CodeStubAssembler { |
| public: |
| - InterpreterAssembler(Isolate* isolate, Zone* zone, Bytecode bytecode); |
| + InterpreterAssembler(Isolate* isolate, Zone* zone, Bytecode bytecode, |
| + OperandScale operand_scale); |
| virtual ~InterpreterAssembler(); |
| // Returns the count immediate for bytecode operand |operand_index| in the |
| // current bytecode. |
| compiler::Node* BytecodeOperandCount(int operand_index); |
| + // Returns the 8-bit flag for bytecode operand |operand_index| in the |
| + // current bytecode. |
| + compiler::Node* BytecodeOperandFlag(int operand_index); |
| // Returns the index immediate for bytecode operand |operand_index| in the |
| // current bytecode. |
| compiler::Node* BytecodeOperandIdx(int operand_index); |
| @@ -34,6 +38,9 @@ class InterpreterAssembler : public compiler::CodeStubAssembler { |
| // Returns the register index for bytecode operand |operand_index| in the |
| // current bytecode. |
| compiler::Node* BytecodeOperandReg(int operand_index); |
| + // Returns the runtime id immediate for bytecode operand |
| + // |operand_index| in the current bytecode. |
| + compiler::Node* BytecodeOperandRuntimeId(int operand_index); |
| // Accumulator. |
| compiler::Node* GetAccumulator(); |
| @@ -136,6 +143,9 @@ class InterpreterAssembler : public compiler::CodeStubAssembler { |
| DispatchToBytecodeHandler(handler, BytecodeOffset()); |
| } |
| + // Dispatch bytecode as wide operand variant. |
| + void DispatchWide(OperandScale operand_scale); |
| + |
| // Abort with the given bailout reason. |
| void Abort(BailoutReason bailout_reason); |
| @@ -167,10 +177,27 @@ class InterpreterAssembler : public compiler::CodeStubAssembler { |
| // Returns the offset of register |index| relative to RegisterFilePointer(). |
| compiler::Node* RegisterFrameOffset(compiler::Node* index); |
| - compiler::Node* BytecodeOperand(int operand_index); |
| - compiler::Node* BytecodeOperandSignExtended(int operand_index); |
| - compiler::Node* BytecodeOperandShort(int operand_index); |
| - compiler::Node* BytecodeOperandShortSignExtended(int operand_index); |
| + // Returns the offset of an operand relative to the current bytecode offset. |
| + compiler::Node* OperandOffset(int operand_index); |
| + |
| + // Returns a Word32 built from |count| unaligned bytes in the |
| + // bytecode array starting at |relative_offset| from the current |
| + // bytecode. The |msb_type| determines if the value is signed or |
| + // unsigned. |
|
rmcilroy
2016/03/21 12:41:36
Mention this should only be used on architectures
oth
2016/03/21 14:21:49
Done.
|
| + compiler::Node* BytecodeReadUnalignedBytes(int relative_offset, int count, |
| + MachineType msb_type); |
| + |
| + compiler::Node* BytecodeOperandUnsignedByte(int operand_index); |
| + compiler::Node* BytecodeOperandSignedByte(int operand_index); |
| + compiler::Node* BytecodeOperandUnsignedShort(int operand_index); |
| + compiler::Node* BytecodeOperandSignedShort(int operand_index); |
| + compiler::Node* BytecodeOperandUnsignedQuad(int operand_index); |
| + compiler::Node* BytecodeOperandSignedQuad(int operand_index); |
| + |
| + compiler::Node* BytecodeSignedOperand(int operand_index, |
| + OperandSize operand_size); |
| + compiler::Node* BytecodeUnsignedOperand(int operand_index, |
| + OperandSize operand_size); |
| // Returns BytecodeOffset() advanced by delta bytecodes. Note: this does not |
| // update BytecodeOffset() itself. |
| @@ -184,7 +211,10 @@ class InterpreterAssembler : public compiler::CodeStubAssembler { |
| void AbortIfWordNotEqual(compiler::Node* lhs, compiler::Node* rhs, |
| BailoutReason bailout_reason); |
| + OperandScale operand_scale() const { return operand_scale_; } |
| + |
| Bytecode bytecode_; |
| + OperandScale operand_scale_; |
| CodeStubAssembler::Variable accumulator_; |
| CodeStubAssembler::Variable context_; |
| CodeStubAssembler::Variable bytecode_array_; |