Index: src/x64/lithium-codegen-x64.cc |
=================================================================== |
--- src/x64/lithium-codegen-x64.cc (revision 6418) |
+++ src/x64/lithium-codegen-x64.cc (working copy) |
@@ -567,7 +567,21 @@ |
void LCodeGen::DeoptimizeIf(Condition cc, LEnvironment* environment) { |
- Abort("Unimplemented: %s", "Deoptimiz"); |
+ RegisterEnvironmentForDeoptimization(environment); |
+ ASSERT(environment->HasBeenRegistered()); |
+ int id = environment->deoptimization_index(); |
+ Address entry = Deoptimizer::GetDeoptimizationEntry(id, Deoptimizer::EAGER); |
+ ASSERT(entry != NULL); |
+ if (entry == NULL) { |
+ Abort("bailout was not prepared"); |
+ return; |
+ } |
+ |
+ if (cc == no_condition) { |
+ __ Jump(entry, RelocInfo::RUNTIME_ENTRY); |
+ } else { |
+ __ j(cc, entry, RelocInfo::RUNTIME_ENTRY); |
+ } |
} |