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

Unified Diff: runtime/vm/code_generator.cc

Issue 14925005: Remove stack_frame_<arch>.cc files. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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 | « runtime/vm/assembler_x64.h ('k') | runtime/vm/deopt_instructions.cc » ('j') | 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 22469)
+++ runtime/vm/code_generator.cc (working copy)
@@ -1482,15 +1482,16 @@
// FP, PC-marker and return-address will be copied as well.
const intptr_t frame_copy_size =
// Deoptimized function's return address: caller_frame->pc().
- - kPcSlotIndexFromSp
+ - kSavedPcSlotFromSp
+ ((frame.fp() - frame.sp()) / kWordSize)
- + kLastParamSlotIndex
+ + 1 // For fp.
+ + kParamEndSlotFromFp
+ num_args;
intptr_t* frame_copy = new intptr_t[frame_copy_size];
ASSERT(frame_copy != NULL);
// Include the return address of optimized code.
intptr_t* start = reinterpret_cast<intptr_t*>(
- frame.sp() + (kPcSlotIndexFromSp * kWordSize));
+ frame.sp() + (kSavedPcSlotFromSp * kWordSize));
for (intptr_t i = 0; i < frame_copy_size; i++) {
frame_copy[i] = *(start + i);
}
@@ -1545,8 +1546,10 @@
const intptr_t num_args =
function.HasOptionalParameters() ? 0 : function.num_fixed_parameters();
intptr_t unoptimized_stack_size =
- + deopt_info.TranslationLength() - num_args
- - kLastParamSlotIndex; // Subtract caller FP and PC (possibly pc marker).
+ + deopt_info.TranslationLength()
+ - num_args
+ - kParamEndSlotFromFp
+ - 1; // For fp.
return unoptimized_stack_size * kWordSize;
}
END_LEAF_RUNTIME_ENTRY
@@ -1563,14 +1566,15 @@
deopt_info.ToInstructions(deopt_table, &deopt_instructions);
intptr_t* start = reinterpret_cast<intptr_t*>(
- caller_frame.sp() + (kPcSlotIndexFromSp * kWordSize));
+ caller_frame.sp() + (kSavedPcSlotFromSp * kWordSize));
const Function& function = Function::Handle(code.function());
const intptr_t num_args =
function.HasOptionalParameters() ? 0 : function.num_fixed_parameters();
const intptr_t to_frame_size =
- - kPcSlotIndexFromSp // Deoptimized function's return address.
+ - kSavedPcSlotFromSp // Deoptimized function's return address.
+ (caller_frame.fp() - caller_frame.sp()) / kWordSize
- + kLastParamSlotIndex
+ + 1 // For fp.
+ + kParamEndSlotFromFp
+ num_args;
DeoptimizationContext deopt_context(start,
to_frame_size,
« no previous file with comments | « runtime/vm/assembler_x64.h ('k') | runtime/vm/deopt_instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698