Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index c6ba51770331417db3b30847214692805a4708ea..e22067807d26f2fa0bff947f427857dc57be6115 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -2183,17 +2183,16 @@ 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; |
} |
void LCodeGen::EmitBranch(int left_block, int right_block, Condition cc) { |
- int next_block = GetNextEmittedBlock(current_block_); |
+ int next_block = GetNextEmittedBlock(); |
right_block = chunk_->LookupDestination(right_block); |
left_block = chunk_->LookupDestination(left_block); |
@@ -2330,10 +2329,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)); |
} |
} |