| Index: src/compiler/instruction.cc
|
| diff --git a/src/compiler/instruction.cc b/src/compiler/instruction.cc
|
| index 3c617327f4614f972837aba787faa73820254081..fe9a8802ffb4236e03fc30d98ed8db74a502cbb4 100644
|
| --- a/src/compiler/instruction.cc
|
| +++ b/src/compiler/instruction.cc
|
| @@ -280,7 +280,7 @@ std::ostream& operator<<(std::ostream& os,
|
|
|
| if (instr.IsGapMoves()) {
|
| const GapInstruction* gap = GapInstruction::cast(&instr);
|
| - os << (instr.IsBlockStart() ? " block-start" : "gap ");
|
| + os << "gap ";
|
| for (int i = GapInstruction::FIRST_INNER_POSITION;
|
| i <= GapInstruction::LAST_INNER_POSITION; i++) {
|
| os << "(";
|
| @@ -291,6 +291,8 @@ std::ostream& operator<<(std::ostream& os,
|
| }
|
| os << ") ";
|
| }
|
| + } else if (instr.IsBlockStart()) {
|
| + os << "block-start";
|
| } else if (instr.IsSourcePosition()) {
|
| const SourcePositionInstruction* pos =
|
| SourcePositionInstruction::cast(&instr);
|
| @@ -434,7 +436,7 @@ InstructionSequence::InstructionSequence(Zone* instruction_zone,
|
| }
|
|
|
|
|
| -BlockStartInstruction* InstructionSequence::GetBlockStart(
|
| +const BlockStartInstruction* InstructionSequence::GetBlockStart(
|
| BasicBlock::RpoNumber rpo) const {
|
| const InstructionBlock* block = InstructionBlockAt(rpo);
|
| return BlockStartInstruction::cast(InstructionAt(block->code_start()));
|
| @@ -447,8 +449,7 @@ void InstructionSequence::StartBlock(BasicBlock::RpoNumber rpo) {
|
| int code_start = static_cast<int>(instructions_.size());
|
| block->set_code_start(code_start);
|
| block_starts_.push_back(code_start);
|
| - BlockStartInstruction* block_start = BlockStartInstruction::New(zone());
|
| - AddInstruction(block_start);
|
| + instructions_.push_back(BlockStartInstruction::New(zone()));
|
| }
|
|
|
|
|
| @@ -461,12 +462,10 @@ void InstructionSequence::EndBlock(BasicBlock::RpoNumber rpo) {
|
|
|
|
|
| int InstructionSequence::AddInstruction(Instruction* instr) {
|
| - // TODO(titzer): the order of these gaps is a holdover from Lithium.
|
| GapInstruction* gap = GapInstruction::New(zone());
|
| - if (instr->IsControl()) instructions_.push_back(gap);
|
| + instructions_.push_back(gap);
|
| int index = static_cast<int>(instructions_.size());
|
| instructions_.push_back(instr);
|
| - if (!instr->IsControl()) instructions_.push_back(gap);
|
| if (instr->NeedsPointerMap()) {
|
| DCHECK(instr->pointer_map() == NULL);
|
| PointerMap* pointer_map = new (zone()) PointerMap(zone());
|
|
|