Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(685)

Unified Diff: runtime/vm/code_generator.cc

Issue 10911022: Remove deprecated deoptimization code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator.cc
===================================================================
--- runtime/vm/code_generator.cc (revision 11666)
+++ runtime/vm/code_generator.cc (working copy)
@@ -1550,22 +1550,16 @@
ASSERT(!deopt_info_array.IsNull());
DeoptInfo& deopt_info = DeoptInfo::Handle();
deopt_info ^= deopt_info_array.At(deopt_index);
- if (deopt_info.IsNull()) {
- // TODO(srdjan): Deprecate.
- // Include the space for return address.
- intptr_t stack_size_in_bytes = caller_frame->fp() - caller_frame->sp();
- return stack_size_in_bytes + kWordSize;
- } else {
- // For functions with optional argument deoptimization info does not
- // describe incoming arguments.
- const Function& function = Function::Handle(optimized_code.function());
- const intptr_t num_args = (function.num_optional_parameters() > 0) ?
- 0 : function.num_fixed_parameters();
- intptr_t unoptimized_stack_size =
- + deopt_info.Length() - num_args
- - 2; // Subtract caller FP and PC.
- return unoptimized_stack_size * kWordSize;
- }
+ ASSERT(!deopt_info.IsNull());
+ // For functions with optional argument deoptimization info does not
+ // describe incoming arguments.
+ const Function& function = Function::Handle(optimized_code.function());
+ const intptr_t num_args = (function.num_optional_parameters() > 0) ?
+ 0 : function.num_fixed_parameters();
+ intptr_t unoptimized_stack_size =
+ + deopt_info.Length() - num_args
+ - 2; // Subtract caller FP and PC.
+ return unoptimized_stack_size * kWordSize;
}
END_LEAF_RUNTIME_ENTRY
@@ -1645,28 +1639,8 @@
ASSERT(!deopt_info_array.IsNull());
DeoptInfo& deopt_info = DeoptInfo::Handle();
deopt_info ^= deopt_info_array.At(deopt_index);
- if (deopt_info.IsNull()) {
- // TODO(srdjan): Deprecate.
- const intptr_t deopt_frame_copy_size = isolate->deopt_frame_copy_size();
- const intptr_t pc_marker_index =
- ((caller_frame->fp() - caller_frame->sp()) / kWordSize);
- // Patch the return PC and saved PC marker in frame to point to the
- // unoptimized version.
- frame_copy[0] = continue_at_pc;
- frame_copy[pc_marker_index] =
- unoptimized_code.EntryPoint() +
- AssemblerMacros::kOffsetOfSavedPCfromEntrypoint;
- intptr_t* start =
- reinterpret_cast<intptr_t*>(caller_frame->sp() - kWordSize);
- for (intptr_t i = 0; i < deopt_frame_copy_size; i++) {
- if (FLAG_trace_deopt) {
- OS::Print("%d. 0x%x\n", i, frame_copy[i]);
- }
- *(start + i) = frame_copy[i];
- }
- } else {
- DeoptimizeWithDeoptInfo(optimized_code, deopt_info, *caller_frame);
- }
+ ASSERT(!deopt_info.IsNull());
+ DeoptimizeWithDeoptInfo(optimized_code, deopt_info, *caller_frame);
isolate->SetDeoptFrameCopy(NULL, 0);
isolate->set_deopt_cpu_registers_copy(NULL);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698