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

Unified Diff: src/deoptimizer.cc

Issue 1264483008: [deoptimizer] Fix the frame size calculation for debugger-inspectable frame construction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Reuse ComputeOutgoingArgumentSize() Created 5 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 | « src/deoptimizer.h ('k') | test/mjsunit/regress/regress-514362.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index d29cb6056347d63f30ef9643a833dd4f90c6cb59..711911459dca2e396a427b23d091483f5ce1dfc3 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -154,8 +154,11 @@ DeoptimizedFrameInfo* Deoptimizer::DebuggerInspectableFrame(
// Always use the actual stack slots when calculating the fp to sp
// delta adding two for the function and context.
unsigned stack_slots = code->stack_slots();
+ unsigned arguments_stack_height =
+ Deoptimizer::ComputeOutgoingArgumentSize(code, deoptimization_index);
unsigned fp_to_sp_delta = (stack_slots * kPointerSize) +
- StandardFrameConstants::kFixedFrameSizeFromFp;
+ StandardFrameConstants::kFixedFrameSizeFromFp +
+ arguments_stack_height;
Deoptimizer* deoptimizer = new Deoptimizer(isolate,
function,
@@ -1770,7 +1773,8 @@ unsigned Deoptimizer::ComputeInputFrameSize() const {
StandardFrameConstants::kFixedFrameSizeFromFp;
if (compiled_code_->kind() == Code::OPTIMIZED_FUNCTION) {
unsigned stack_slots = compiled_code_->stack_slots();
- unsigned outgoing_size = ComputeOutgoingArgumentSize();
+ unsigned outgoing_size =
+ ComputeOutgoingArgumentSize(compiled_code_, bailout_id_);
CHECK(result == fixed_size + (stack_slots * kPointerSize) + outgoing_size);
}
return result;
@@ -1798,10 +1802,12 @@ unsigned Deoptimizer::ComputeIncomingArgumentSize(JSFunction* function) const {
}
-unsigned Deoptimizer::ComputeOutgoingArgumentSize() const {
+// static
+unsigned Deoptimizer::ComputeOutgoingArgumentSize(Code* code,
+ unsigned bailout_id) {
DeoptimizationInputData* data =
- DeoptimizationInputData::cast(compiled_code_->deoptimization_data());
- unsigned height = data->ArgumentsStackHeight(bailout_id_)->value();
+ DeoptimizationInputData::cast(code->deoptimization_data());
+ unsigned height = data->ArgumentsStackHeight(bailout_id)->value();
return height * kPointerSize;
}
« no previous file with comments | « src/deoptimizer.h ('k') | test/mjsunit/regress/regress-514362.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698