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

Side by Side Diff: src/deoptimizer.cc

Issue 1263333002: [deoptimizer] Do not pass arguments markers to the debugger. (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/debug-materialized.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 2248 matching lines...) Expand 10 before | Expand all | Expand 10 after
2259 context_ = reinterpret_cast<Object*>(output_frame->GetContext()); 2259 context_ = reinterpret_cast<Object*>(output_frame->GetContext());
2260 has_construct_stub_ = has_construct_stub; 2260 has_construct_stub_ = has_construct_stub;
2261 expression_count_ = output_frame->GetExpressionCount(); 2261 expression_count_ = output_frame->GetExpressionCount();
2262 expression_stack_ = new Object* [expression_count_]; 2262 expression_stack_ = new Object* [expression_count_];
2263 // Get the source position using the unoptimized code. 2263 // Get the source position using the unoptimized code.
2264 Address pc = reinterpret_cast<Address>(output_frame->GetPc()); 2264 Address pc = reinterpret_cast<Address>(output_frame->GetPc());
2265 Code* code = Code::cast(deoptimizer->isolate()->FindCodeObject(pc)); 2265 Code* code = Code::cast(deoptimizer->isolate()->FindCodeObject(pc));
2266 source_position_ = code->SourcePosition(pc); 2266 source_position_ = code->SourcePosition(pc);
2267 2267
2268 for (int i = 0; i < expression_count_; i++) { 2268 for (int i = 0; i < expression_count_; i++) {
2269 SetExpression(i, output_frame->GetExpression(i)); 2269 Object* value = output_frame->GetExpression(i);
2270 // Replace materialization markers with the undefined value.
2271 if (value == deoptimizer->isolate()->heap()->arguments_marker()) {
2272 value = deoptimizer->isolate()->heap()->undefined_value();
2273 }
2274 SetExpression(i, value);
2270 } 2275 }
2271 2276
2272 if (has_arguments_adaptor) { 2277 if (has_arguments_adaptor) {
2273 output_frame = deoptimizer->output_[frame_index - 1]; 2278 output_frame = deoptimizer->output_[frame_index - 1];
2274 CHECK_EQ(output_frame->GetFrameType(), StackFrame::ARGUMENTS_ADAPTOR); 2279 CHECK_EQ(output_frame->GetFrameType(), StackFrame::ARGUMENTS_ADAPTOR);
2275 } 2280 }
2276 2281
2277 parameters_count_ = output_frame->ComputeParametersCount(); 2282 parameters_count_ = output_frame->ComputeParametersCount();
2278 parameters_ = new Object* [parameters_count_]; 2283 parameters_ = new Object* [parameters_count_];
2279 for (int i = 0; i < parameters_count_; i++) { 2284 for (int i = 0; i < parameters_count_; i++) {
2280 SetParameter(i, output_frame->GetParameter(i)); 2285 Object* value = output_frame->GetParameter(i);
2286 // Replace materialization markers with the undefined value.
2287 if (value == deoptimizer->isolate()->heap()->arguments_marker()) {
2288 value = deoptimizer->isolate()->heap()->undefined_value();
2289 }
2290 SetParameter(i, value);
2281 } 2291 }
2282 } 2292 }
2283 2293
2284 2294
2285 DeoptimizedFrameInfo::~DeoptimizedFrameInfo() { 2295 DeoptimizedFrameInfo::~DeoptimizedFrameInfo() {
2286 delete[] expression_stack_; 2296 delete[] expression_stack_;
2287 delete[] parameters_; 2297 delete[] parameters_;
2288 } 2298 }
2289 2299
2290 2300
(...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after
3406 DCHECK(value_info->IsMaterializedObject()); 3416 DCHECK(value_info->IsMaterializedObject());
3407 3417
3408 value_info->value_ = 3418 value_info->value_ =
3409 Handle<Object>(previously_materialized_objects->get(i), isolate_); 3419 Handle<Object>(previously_materialized_objects->get(i), isolate_);
3410 } 3420 }
3411 } 3421 }
3412 } 3422 }
3413 3423
3414 } // namespace internal 3424 } // namespace internal
3415 } // namespace v8 3425 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/debug-materialized.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698