Index: src/codegen.cc |
=================================================================== |
--- src/codegen.cc (revision 5165) |
+++ src/codegen.cc (working copy) |
@@ -77,14 +77,23 @@ |
// Generate the code. |
Comment cmnt(masm_, code->comment()); |
masm_->bind(code->entry_label()); |
- code->SaveRegisters(); |
+ if (code->AutoSaveAndRestore()) { |
+ code->SaveRegisters(); |
+ } |
code->Generate(); |
- code->RestoreRegisters(); |
- masm_->jmp(code->exit_label()); |
+ if (code->AutoSaveAndRestore()) { |
+ code->RestoreRegisters(); |
+ code->Exit(); |
+ } |
} |
} |
+void DeferredCode::Exit() { |
+ masm_->jmp(exit_label()); |
+} |
+ |
+ |
void CodeGenerator::SetFrame(VirtualFrame* new_frame, |
RegisterFile* non_frame_registers) { |
RegisterFile saved_counts; |