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

Side by Side 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: 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 unified diff | Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-514362.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/cpu-profiler.h" 9 #include "src/cpu-profiler.h"
10 #include "src/deoptimizer.h" 10 #include "src/deoptimizer.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 // Locate the deoptimization point in the code. As we are at a call the 148 // Locate the deoptimization point in the code. As we are at a call the
149 // return address must be at a place in the code with deoptimization support. 149 // return address must be at a place in the code with deoptimization support.
150 SafepointEntry safepoint_entry = code->GetSafepointEntry(frame->pc()); 150 SafepointEntry safepoint_entry = code->GetSafepointEntry(frame->pc());
151 int deoptimization_index = safepoint_entry.deoptimization_index(); 151 int deoptimization_index = safepoint_entry.deoptimization_index();
152 CHECK_NE(deoptimization_index, Safepoint::kNoDeoptimizationIndex); 152 CHECK_NE(deoptimization_index, Safepoint::kNoDeoptimizationIndex);
153 153
154 // Always use the actual stack slots when calculating the fp to sp 154 // Always use the actual stack slots when calculating the fp to sp
155 // delta adding two for the function and context. 155 // delta adding two for the function and context.
156 unsigned stack_slots = code->stack_slots(); 156 unsigned stack_slots = code->stack_slots();
157 DeoptimizationInputData* data =
158 DeoptimizationInputData::cast(code->deoptimization_data());
159 unsigned arguments_stack_height =
160 data->ArgumentsStackHeight(deoptimization_index)->value() * kPointerSize;
Yang 2015/08/03 11:35:14 ComputeOutgoingArgumentSize() contains the same co
Jarin 2015/08/03 11:48:23 Done.
157 unsigned fp_to_sp_delta = (stack_slots * kPointerSize) + 161 unsigned fp_to_sp_delta = (stack_slots * kPointerSize) +
158 StandardFrameConstants::kFixedFrameSizeFromFp; 162 StandardFrameConstants::kFixedFrameSizeFromFp +
163 arguments_stack_height;
159 164
160 Deoptimizer* deoptimizer = new Deoptimizer(isolate, 165 Deoptimizer* deoptimizer = new Deoptimizer(isolate,
161 function, 166 function,
162 Deoptimizer::DEBUGGER, 167 Deoptimizer::DEBUGGER,
163 deoptimization_index, 168 deoptimization_index,
164 frame->pc(), 169 frame->pc(),
165 fp_to_sp_delta, 170 fp_to_sp_delta,
166 code); 171 code);
167 Address tos = frame->fp() - fp_to_sp_delta; 172 Address tos = frame->fp() - fp_to_sp_delta;
168 deoptimizer->FillInputFrame(tos, frame); 173 deoptimizer->FillInputFrame(tos, frame);
(...skipping 3247 matching lines...) Expand 10 before | Expand all | Expand 10 after
3416 DCHECK(value_info->IsMaterializedObject()); 3421 DCHECK(value_info->IsMaterializedObject());
3417 3422
3418 value_info->value_ = 3423 value_info->value_ =
3419 Handle<Object>(previously_materialized_objects->get(i), isolate_); 3424 Handle<Object>(previously_materialized_objects->get(i), isolate_);
3420 } 3425 }
3421 } 3426 }
3422 } 3427 }
3423 3428
3424 } // namespace internal 3429 } // namespace internal
3425 } // namespace v8 3430 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-514362.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698