Index: src/x64/deoptimizer-x64.cc |
diff --git a/src/x64/deoptimizer-x64.cc b/src/x64/deoptimizer-x64.cc |
index 705da527257f51c98f603d62c63081e104e2f932..0b6791e59a40cd37a9bfca449d769e49f9342370 100644 |
--- a/src/x64/deoptimizer-x64.cc |
+++ b/src/x64/deoptimizer-x64.cc |
@@ -83,6 +83,12 @@ void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) { |
#endif |
DeoptimizationInputData* deopt_data = |
DeoptimizationInputData::cast(code->deoptimization_data()); |
+ SharedFunctionInfo* shared = |
+ SharedFunctionInfo::cast(deopt_data->SharedFunctionInfo()); |
+ shared->EvictFromOptimizedCodeMap(code, "deoptimized code"); |
+ deopt_data->SetSharedFunctionInfo(Smi::FromInt(0)); |
+ // For each LLazyBailout instruction insert a call to the corresponding |
+ // deoptimization entry. |
for (int i = 0; i < deopt_data->DeoptCount(); i++) { |
if (deopt_data->Pc(i)->value() == -1) continue; |
// Position where Call will be patched in. |