Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index 59fa3d67370333c5b2dcb114a0c30cb33f134cb4..ee36314209eb21a95e5c9b93a93ff3130ab0cef8 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -257,29 +257,20 @@ LInstruction* LCodeGen::GetNextInstruction() { |
bool LCodeGen::GenerateDeferredCode() { |
ASSERT(is_generating()); |
- Label last_jump; |
if (deferred_.length() > 0) { |
for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { |
LDeferredCode* code = deferred_[i]; |
__ bind(code->entry()); |
code->Generate(); |
-#ifdef DEBUG |
- if (i == deferred_.length() - 1) { |
- __ bind(&last_jump); |
- } |
-#endif |
__ jmp(code->exit()); |
} |
- // Reserve some space to ensure that the last piece of deferred code |
- // have room for lazy bailout. |
- __ nop(); |
- __ nop(); |
- |
- int code_generated = |
- masm_->InstructionsGeneratedSince(&last_jump) * Assembler::kInstrSize; |
- ASSERT(Deoptimizer::patch_size() <= code_generated); |
- USE(code_generated); |
+ // Pad code to ensure that the last piece of deferred code have |
+ // room for lazy bailout. |
+ while ((masm()->pc_offset() - LastSafepointEnd()) |
+ < Deoptimizer::patch_size()) { |
+ __ nop(); |
+ } |
} |
// Force constant pool emission at the end of the deferred code to make |