| Index: src/x64/deoptimizer-x64.cc
|
| diff --git a/src/x64/deoptimizer-x64.cc b/src/x64/deoptimizer-x64.cc
|
| index d7a73d75c9d9dc49c5a574c46b5ab45fd7fa2aeb..722c0fab42531384bd1a26b1f804ab9d2def6658 100644
|
| --- a/src/x64/deoptimizer-x64.cc
|
| +++ b/src/x64/deoptimizer-x64.cc
|
| @@ -46,21 +46,7 @@ int Deoptimizer::patch_size() {
|
| }
|
|
|
|
|
| -void Deoptimizer::DeoptimizeFunctionWithPreparedFunctionList(
|
| - JSFunction* function) {
|
| - Isolate* isolate = function->GetIsolate();
|
| - HandleScope scope(isolate);
|
| - DisallowHeapAllocation nha;
|
| -
|
| - ASSERT(function->IsOptimized());
|
| - ASSERT(function->FunctionsInFunctionListShareSameCode());
|
| -
|
| - // Get the optimized code.
|
| - Code* code = function->code();
|
| -
|
| - // The optimized code is going to be patched, so we cannot use it any more.
|
| - function->shared()->EvictFromOptimizedCodeMap(code, "deoptimized function");
|
| -
|
| +void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) {
|
| // Invalidate the relocation information, as it will become invalid by the
|
| // code patching below, and is not needed any more.
|
| code->InvalidateRelocation();
|
| @@ -71,7 +57,7 @@ void Deoptimizer::DeoptimizeFunctionWithPreparedFunctionList(
|
| // before the safepoint table (space was allocated there when the Code
|
| // object was created, if necessary).
|
|
|
| - Address instruction_start = function->code()->instruction_start();
|
| + Address instruction_start = code->instruction_start();
|
| #ifdef DEBUG
|
| Address prev_call_address = NULL;
|
| #endif
|
| @@ -93,25 +79,6 @@ void Deoptimizer::DeoptimizeFunctionWithPreparedFunctionList(
|
| prev_call_address = call_address;
|
| #endif
|
| }
|
| -
|
| - // Add the deoptimizing code to the list.
|
| - DeoptimizingCodeListNode* node = new DeoptimizingCodeListNode(code);
|
| - DeoptimizerData* data = isolate->deoptimizer_data();
|
| - node->set_next(data->deoptimizing_code_list_);
|
| - data->deoptimizing_code_list_ = node;
|
| -
|
| - // We might be in the middle of incremental marking with compaction.
|
| - // Tell collector to treat this code object in a special way and
|
| - // ignore all slots that might have been recorded on it.
|
| - isolate->heap()->mark_compact_collector()->InvalidateCode(code);
|
| -
|
| - ReplaceCodeForRelatedFunctions(function, code);
|
| -
|
| - if (FLAG_trace_deopt) {
|
| - PrintF("[forced deoptimization: ");
|
| - function->PrintName();
|
| - PrintF(" / %" V8PRIxPTR "]\n", reinterpret_cast<intptr_t>(function));
|
| - }
|
| }
|
|
|
|
|
|
|