Index: src/x64/deoptimizer-x64.cc |
diff --git a/src/x64/deoptimizer-x64.cc b/src/x64/deoptimizer-x64.cc |
index 36280ec8b4d516758f44a7a96e16af00fe6ecf14..e62037d21acfd1efdd144a019989de02d62c45c5 100644 |
--- a/src/x64/deoptimizer-x64.cc |
+++ b/src/x64/deoptimizer-x64.cc |
@@ -55,13 +55,13 @@ void Deoptimizer::DeoptimizeFunctionWithPreparedFunctionList( |
ASSERT(function->IsOptimized()); |
ASSERT(function->FunctionsInFunctionListShareSameCode()); |
- // The optimized code is going to be patched, so we cannot use it |
- // any more. Play safe and reset the whole cache. |
- function->shared()->ClearOptimizedCodeMap("deoptimized function"); |
- |
// Get the optimized code. |
Code* code = function->code(); |
+ // The optimized code is going to be patched, so we cannot use it |
+ // any more. Play safe and reset the whole cache. |
Michael Starzinger
2013/05/13 14:26:46
The second sentence of the comment is out-dated, l
danno
2013/05/13 15:23:10
Done.
|
+ function->shared()->EvictFromOptimizedCodeMap(code, "deoptimized function"); |
+ |
// Invalidate the relocation information, as it will become invalid by the |
// code patching below, and is not needed any more. |
code->InvalidateRelocation(); |