Index: src/arm/deoptimizer-arm.cc |
diff --git a/src/arm/deoptimizer-arm.cc b/src/arm/deoptimizer-arm.cc |
index 780bafb7554c98636d46ef1a03aec0f6f8f71c2e..5b42116ad4bc0ac32c1bea0321337d56211ab481 100644 |
--- a/src/arm/deoptimizer-arm.cc |
+++ b/src/arm/deoptimizer-arm.cc |
@@ -44,22 +44,8 @@ int Deoptimizer::patch_size() { |
} |
-void Deoptimizer::DeoptimizeFunctionWithPreparedFunctionList( |
- JSFunction* function) { |
- Isolate* isolate = function->GetIsolate(); |
- HandleScope scope(isolate); |
- DisallowHeapAllocation no_allocation; |
- |
- 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(); |
@@ -92,25 +78,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)); |
- } |
} |
@@ -635,6 +602,17 @@ void Deoptimizer::TableEntryGenerator::GeneratePrologue() { |
__ bind(&done); |
} |
+ |
+void FrameDescription::SetCallerPc(unsigned offset, intptr_t value) { |
+ SetFrameSlot(offset, value); |
+} |
+ |
+ |
+void FrameDescription::SetCallerFp(unsigned offset, intptr_t value) { |
+ SetFrameSlot(offset, value); |
+} |
+ |
+ |
#undef __ |
} } // namespace v8::internal |