| Index: src/mips/deoptimizer-mips.cc
|
| diff --git a/src/mips/deoptimizer-mips.cc b/src/mips/deoptimizer-mips.cc
|
| index 840462e43f81265f93752af6fbc670faa9ca3cb6..7937832d7938be2b3bc4e5d452a7ea6214cdf6bc 100644
|
| --- a/src/mips/deoptimizer-mips.cc
|
| +++ b/src/mips/deoptimizer-mips.cc
|
| @@ -43,22 +43,8 @@ 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();
|
| +void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) {
|
| Address code_start_address = code->instruction_start();
|
| -
|
| - // The optimized code is going to be patched, so we cannot use it any more.
|
| - 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();
|
| @@ -89,30 +75,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(" / %x]\n", reinterpret_cast<uint32_t>(function));
|
| -#ifdef DEBUG
|
| - if (FLAG_print_code) {
|
| - code->PrintLn();
|
| - }
|
| -#endif
|
| - }
|
| }
|
|
|
|
|
|
|