| Index: src/compiler/code-generator.cc
|
| diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc
|
| index 2f98f25f329a9da8bf69489778b181bc354c2e5a..9911d544be390ecd85b5fc5f3f9e2bf476429f08 100644
|
| --- a/src/compiler/code-generator.cc
|
| +++ b/src/compiler/code-generator.cc
|
| @@ -208,8 +208,10 @@ Handle<Code> CodeGenerator::GenerateCode() {
|
|
|
|
|
| bool CodeGenerator::IsNextInAssemblyOrder(RpoNumber block) const {
|
| - return code()->InstructionBlockAt(current_block_)->ao_number().IsNext(
|
| - code()->InstructionBlockAt(block)->ao_number());
|
| + return code()
|
| + ->InstructionBlockAt(current_block_)
|
| + ->ao_number()
|
| + .IsNext(code()->InstructionBlockAt(block)->ao_number());
|
| }
|
|
|
|
|
| @@ -481,47 +483,6 @@ FrameStateDescriptor* CodeGenerator::GetFrameStateDescriptor(
|
| }
|
|
|
|
|
| -namespace {
|
| -
|
| -struct OperandAndType {
|
| - InstructionOperand* const operand;
|
| - MachineType const type;
|
| -};
|
| -
|
| -
|
| -OperandAndType TypedOperandForFrameState(FrameStateDescriptor* descriptor,
|
| - Instruction* instr,
|
| - size_t frame_state_offset,
|
| - size_t index,
|
| - OutputFrameStateCombine combine) {
|
| - DCHECK(index < descriptor->GetSize(combine));
|
| - switch (combine.kind()) {
|
| - case OutputFrameStateCombine::kPushOutput: {
|
| - DCHECK(combine.GetPushCount() <= instr->OutputCount());
|
| - size_t size_without_output =
|
| - descriptor->GetSize(OutputFrameStateCombine::Ignore());
|
| - // If the index is past the existing stack items, return the output.
|
| - if (index >= size_without_output) {
|
| - return {instr->OutputAt(index - size_without_output), kMachAnyTagged};
|
| - }
|
| - break;
|
| - }
|
| - case OutputFrameStateCombine::kPokeAt:
|
| - size_t index_from_top =
|
| - descriptor->GetSize(combine) - 1 - combine.GetOffsetToPokeAt();
|
| - if (index >= index_from_top &&
|
| - index < index_from_top + instr->OutputCount()) {
|
| - return {instr->OutputAt(index - index_from_top), kMachAnyTagged};
|
| - }
|
| - break;
|
| - }
|
| - return {instr->InputAt(frame_state_offset + index),
|
| - descriptor->GetType(index)};
|
| -}
|
| -
|
| -} // namespace
|
| -
|
| -
|
| void CodeGenerator::BuildTranslationForFrameStateDescriptor(
|
| FrameStateDescriptor* descriptor, Instruction* instr,
|
| Translation* translation, size_t frame_state_offset,
|
| @@ -560,11 +521,8 @@ void CodeGenerator::BuildTranslationForFrameStateDescriptor(
|
| break;
|
| }
|
|
|
| - for (size_t i = 0; i < descriptor->GetSize(state_combine); i++) {
|
| - OperandAndType op = TypedOperandForFrameState(
|
| - descriptor, instr, frame_state_offset, i, state_combine);
|
| - AddTranslationForOperand(translation, instr, op.operand, op.type);
|
| - }
|
| + descriptor->TranslateOperands(this, instr, frame_state_offset, state_combine,
|
| + translation);
|
| }
|
|
|
|
|
|
|