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

Side by Side Diff: src/runtime/runtime-debug.cc

Issue 1153483002: [turbofan] Enable deoptimization for non-asm.js TurboFan code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix Michis comment. REBASE Created 5 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 unified diff | Download patch
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime-test.cc » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/arguments.h" 8 #include "src/arguments.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/debug.h" 10 #include "src/debug.h"
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 public: 469 public:
470 FrameInspector(JavaScriptFrame* frame, int inlined_jsframe_index, 470 FrameInspector(JavaScriptFrame* frame, int inlined_jsframe_index,
471 Isolate* isolate) 471 Isolate* isolate)
472 : frame_(frame), deoptimized_frame_(NULL), isolate_(isolate) { 472 : frame_(frame), deoptimized_frame_(NULL), isolate_(isolate) {
473 has_adapted_arguments_ = frame_->has_adapted_arguments(); 473 has_adapted_arguments_ = frame_->has_adapted_arguments();
474 is_bottommost_ = inlined_jsframe_index == 0; 474 is_bottommost_ = inlined_jsframe_index == 0;
475 is_optimized_ = frame_->is_optimized(); 475 is_optimized_ = frame_->is_optimized();
476 // Calculate the deoptimized frame. 476 // Calculate the deoptimized frame.
477 if (frame->is_optimized()) { 477 if (frame->is_optimized()) {
478 // TODO(turbofan): Revisit once we support deoptimization. 478 // TODO(turbofan): Revisit once we support deoptimization.
479 if (frame->LookupCode()->is_turbofanned() && !FLAG_turbo_deoptimization) { 479 if (frame->LookupCode()->is_turbofanned() &&
480 frame->function()->shared()->asm_function() &&
481 !FLAG_turbo_asm_deoptimization) {
480 is_optimized_ = false; 482 is_optimized_ = false;
481 return; 483 return;
482 } 484 }
483 485
484 deoptimized_frame_ = Deoptimizer::DebuggerInspectableFrame( 486 deoptimized_frame_ = Deoptimizer::DebuggerInspectableFrame(
485 frame, inlined_jsframe_index, isolate); 487 frame, inlined_jsframe_index, isolate);
486 } 488 }
487 } 489 }
488 490
489 ~FrameInspector() { 491 ~FrameInspector() {
(...skipping 11 matching lines...) Expand all
501 Object* GetFunction() { 503 Object* GetFunction() {
502 return is_optimized_ ? deoptimized_frame_->GetFunction() 504 return is_optimized_ ? deoptimized_frame_->GetFunction()
503 : frame_->function(); 505 : frame_->function();
504 } 506 }
505 Object* GetParameter(int index) { 507 Object* GetParameter(int index) {
506 return is_optimized_ ? deoptimized_frame_->GetParameter(index) 508 return is_optimized_ ? deoptimized_frame_->GetParameter(index)
507 : frame_->GetParameter(index); 509 : frame_->GetParameter(index);
508 } 510 }
509 Object* GetExpression(int index) { 511 Object* GetExpression(int index) {
510 // TODO(turbofan): Revisit once we support deoptimization. 512 // TODO(turbofan): Revisit once we support deoptimization.
511 if (frame_->LookupCode()->is_turbofanned() && !FLAG_turbo_deoptimization) { 513 if (frame_->LookupCode()->is_turbofanned() &&
514 frame_->function()->shared()->asm_function() &&
515 !FLAG_turbo_asm_deoptimization) {
512 return isolate_->heap()->undefined_value(); 516 return isolate_->heap()->undefined_value();
513 } 517 }
514 return is_optimized_ ? deoptimized_frame_->GetExpression(index) 518 return is_optimized_ ? deoptimized_frame_->GetExpression(index)
515 : frame_->GetExpression(index); 519 : frame_->GetExpression(index);
516 } 520 }
517 int GetSourcePosition() { 521 int GetSourcePosition() {
518 return is_optimized_ ? deoptimized_frame_->GetSourcePosition() 522 return is_optimized_ ? deoptimized_frame_->GetSourcePosition()
519 : frame_->LookupCode()->SourcePosition(frame_->pc()); 523 : frame_->LookupCode()->SourcePosition(frame_->pc());
520 } 524 }
521 bool IsConstructor() { 525 bool IsConstructor() {
(...skipping 2685 matching lines...) Expand 10 before | Expand all | Expand 10 after
3207 return Smi::FromInt(isolate->debug()->is_active()); 3211 return Smi::FromInt(isolate->debug()->is_active());
3208 } 3212 }
3209 3213
3210 3214
3211 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { 3215 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) {
3212 UNIMPLEMENTED(); 3216 UNIMPLEMENTED();
3213 return NULL; 3217 return NULL;
3214 } 3218 }
3215 } // namespace internal 3219 } // namespace internal
3216 } // namespace v8 3220 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime-test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698