| Index: src/mips/lithium-codegen-mips.cc
|
| diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc
|
| index 77949313e129d4155277f55a5c193b8523b1677c..bf227a2f9158f6d433e418d2241c2d7cad464d04 100644
|
| --- a/src/mips/lithium-codegen-mips.cc
|
| +++ b/src/mips/lithium-codegen-mips.cc
|
| @@ -1756,10 +1756,9 @@ void LCodeGen::DoArithmeticT(LArithmeticT* instr) {
|
| }
|
|
|
|
|
| -int LCodeGen::GetNextEmittedBlock(int block) {
|
| - for (int i = block + 1; i < graph()->blocks()->length(); ++i) {
|
| - LLabel* label = chunk_->GetLabel(i);
|
| - if (!label->HasReplacement()) return i;
|
| +int LCodeGen::GetNextEmittedBlock() {
|
| + for (int i = current_block_ + 1; i < graph()->blocks()->length(); ++i) {
|
| + if (!chunk_->GetLabel(i)->HasReplacement()) return i;
|
| }
|
| return -1;
|
| }
|
| @@ -1767,7 +1766,7 @@ int LCodeGen::GetNextEmittedBlock(int block) {
|
|
|
| void LCodeGen::EmitBranch(int left_block, int right_block,
|
| Condition cc, Register src1, const Operand& src2) {
|
| - int next_block = GetNextEmittedBlock(current_block_);
|
| + int next_block = GetNextEmittedBlock();
|
| right_block = chunk_->LookupDestination(right_block);
|
| left_block = chunk_->LookupDestination(left_block);
|
| if (right_block == left_block) {
|
| @@ -1786,7 +1785,7 @@ void LCodeGen::EmitBranch(int left_block, int right_block,
|
|
|
| void LCodeGen::EmitBranchF(int left_block, int right_block,
|
| Condition cc, FPURegister src1, FPURegister src2) {
|
| - int next_block = GetNextEmittedBlock(current_block_);
|
| + int next_block = GetNextEmittedBlock();
|
| right_block = chunk_->LookupDestination(right_block);
|
| left_block = chunk_->LookupDestination(left_block);
|
| if (right_block == left_block) {
|
| @@ -1916,10 +1915,9 @@ void LCodeGen::DoBranch(LBranch* instr) {
|
|
|
|
|
| void LCodeGen::EmitGoto(int block) {
|
| - block = chunk_->LookupDestination(block);
|
| - int next_block = GetNextEmittedBlock(current_block_);
|
| - if (block != next_block) {
|
| - __ jmp(chunk_->GetAssemblyLabel(block));
|
| + int destination = chunk_->LookupDestination(block);
|
| + if (destination != GetNextEmittedBlock()) {
|
| + __ jmp(chunk_->GetAssemblyLabel(destination));
|
| }
|
| }
|
|
|
|
|