Index: src/compiler/code-generator.cc |
diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc |
index 44e3b9dc9d708378b0c1b60b215d3e762756c26f..72c6ec984af552e9528ee8f126c64f2557e20c50 100644 |
--- a/src/compiler/code-generator.cc |
+++ b/src/compiler/code-generator.cc |
@@ -85,8 +85,6 @@ Handle<Code> CodeGenerator::GenerateCode() { |
} |
} |
- FinishCode(masm()); |
- |
// Ensure there is space for lazy deoptimization in the code. |
if (!info->IsStub()) { |
int target_offset = masm()->pc_offset() + Deoptimizer::patch_size(); |
@@ -95,6 +93,8 @@ Handle<Code> CodeGenerator::GenerateCode() { |
} |
} |
+ FinishCode(masm()); |
+ |
safepoints()->Emit(masm(), frame()->GetSpillSlotCount()); |
// TODO(titzer): what are the right code flags here? |