Chromium Code Reviews| Index: src/compiler/code-generator.h |
| diff --git a/src/compiler/code-generator.h b/src/compiler/code-generator.h |
| index 59a5af9a0703597ebe51c09bb72c030caecd34f6..da33ff2e809755d3a4a4a2ea06ab814baca37de5 100644 |
| --- a/src/compiler/code-generator.h |
| +++ b/src/compiler/code-generator.h |
| @@ -28,6 +28,20 @@ struct BranchInfo { |
| }; |
| +class InstructionOperandIterator { |
| + public: |
| + InstructionOperandIterator(Instruction* instr, size_t pos) |
| + : instr_(instr), pos_(pos) {} |
| + |
| + Instruction* instruction() const { return instr_; } |
| + InstructionOperand* advance() { return instr_->InputAt(pos_++); } |
|
Jarin
2016/01/05 12:51:18
style nit: advance -> Advance, only simple accesso
sigurds
2016/01/05 13:08:57
Done.
|
| + |
| + private: |
| + Instruction* instr_; |
| + size_t pos_; |
| +}; |
| + |
| + |
| // Generates native code for a sequence of instructions. |
| class CodeGenerator final : public GapResolver::Assembler { |
| public: |
| @@ -136,9 +150,15 @@ class CodeGenerator final : public GapResolver::Assembler { |
| size_t frame_access_state_offset, |
| OutputFrameStateCombine state_combine); |
| void BuildTranslationForFrameStateDescriptor( |
| - FrameStateDescriptor* descriptor, Instruction* instr, |
| - Translation* translation, size_t frame_access_state_offset, |
| - OutputFrameStateCombine state_combine); |
| + FrameStateDescriptor* descriptor, InstructionOperandIterator* iter, |
| + Translation* translation, OutputFrameStateCombine state_combine); |
| + void TranslateStateValueDescriptor(StateValueDescriptor* desc, |
| + Translation* translation, |
| + InstructionOperandIterator* iter); |
| + void TranslateFrameStateDescriptorOperands(FrameStateDescriptor* desc, |
| + InstructionOperandIterator* iter, |
| + OutputFrameStateCombine combine, |
| + Translation* translation); |
| void AddTranslationForOperand(Translation* translation, Instruction* instr, |
| InstructionOperand* op, MachineType type); |
| void AddNopForSmiCodeInlining(); |