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

Side by Side Diff: src/debug/debug.h

Issue 1453113002: Handle StepIn for constructors through PrepareStep just like for regular calls (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add ports Created 5 years, 1 month 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/assembler.cc ('k') | src/debug/debug.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #ifndef V8_DEBUG_DEBUG_H_ 5 #ifndef V8_DEBUG_DEBUG_H_
6 #define V8_DEBUG_DEBUG_H_ 6 #define V8_DEBUG_DEBUG_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/assembler.h" 10 #include "src/assembler.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 inline bool IsReturn() const { 83 inline bool IsReturn() const {
84 return RelocInfo::IsDebugBreakSlotAtReturn(rmode_); 84 return RelocInfo::IsDebugBreakSlotAtReturn(rmode_);
85 } 85 }
86 inline bool IsCall() const { 86 inline bool IsCall() const {
87 return RelocInfo::IsDebugBreakSlotAtCall(rmode_); 87 return RelocInfo::IsDebugBreakSlotAtCall(rmode_);
88 } 88 }
89 inline bool IsConstructCall() const { 89 inline bool IsConstructCall() const {
90 return RelocInfo::IsDebugBreakSlotAtConstructCall(rmode_); 90 return RelocInfo::IsDebugBreakSlotAtConstructCall(rmode_);
91 } 91 }
92 inline int CallArgumentsCount() const { 92 inline int CallArgumentsCount() const {
93 DCHECK(IsCall()); 93 DCHECK(IsStepInLocation());
94 return RelocInfo::DebugBreakCallArgumentsCount(data_); 94 return RelocInfo::DebugBreakCallArgumentsCount(data_);
95 } 95 }
96 96
97 bool IsStepInLocation() const; 97 bool IsStepInLocation() const;
98 inline bool HasBreakPoint() const { 98 inline bool HasBreakPoint() const {
99 return debug_info_->HasBreakPoint(pc_offset_); 99 return debug_info_->HasBreakPoint(pc_offset_);
100 } 100 }
101 101
102 Handle<Object> BreakPointObjects() const; 102 Handle<Object> BreakPointObjects() const;
103 103
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 404
405 // Stepping handling. 405 // Stepping handling.
406 void PrepareStep(StepAction step_action, 406 void PrepareStep(StepAction step_action,
407 int step_count, 407 int step_count,
408 StackFrame::Id frame_id); 408 StackFrame::Id frame_id);
409 void ClearStepping(); 409 void ClearStepping();
410 void ClearStepOut(); 410 void ClearStepOut();
411 bool IsStepping() { return thread_local_.step_count_ > 0; } 411 bool IsStepping() { return thread_local_.step_count_ > 0; }
412 bool StepNextContinue(BreakLocation* location, JavaScriptFrame* frame); 412 bool StepNextContinue(BreakLocation* location, JavaScriptFrame* frame);
413 bool StepInActive() { return thread_local_.step_into_fp_ != 0; } 413 bool StepInActive() { return thread_local_.step_into_fp_ != 0; }
414 void HandleStepIn(Handle<Object> function_obj, bool is_constructor); 414 void HandleStepIn(Handle<Object> function_obj);
415 bool StepOutActive() { return thread_local_.step_out_fp_ != 0; } 415 bool StepOutActive() { return thread_local_.step_out_fp_ != 0; }
416 416
417 void GetStepinPositions(JavaScriptFrame* frame, StackFrame::Id frame_id, 417 void GetStepinPositions(JavaScriptFrame* frame, StackFrame::Id frame_id,
418 List<int>* results_out); 418 List<int>* results_out);
419 419
420 bool PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared); 420 bool PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared);
421 421
422 // Returns whether the operation succeeded. Compilation can only be triggered 422 // Returns whether the operation succeeded. Compilation can only be triggered
423 // if a valid closure is passed as the second argument, otherwise the shared 423 // if a valid closure is passed as the second argument, otherwise the shared
424 // function needs to be compiled already. 424 // function needs to be compiled already.
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 760
761 static void PatchDebugBreakSlot(Address pc, Handle<Code> code); 761 static void PatchDebugBreakSlot(Address pc, Handle<Code> code);
762 static void ClearDebugBreakSlot(Address pc); 762 static void ClearDebugBreakSlot(Address pc);
763 }; 763 };
764 764
765 765
766 } // namespace internal 766 } // namespace internal
767 } // namespace v8 767 } // namespace v8
768 768
769 #endif // V8_DEBUG_DEBUG_H_ 769 #endif // V8_DEBUG_DEBUG_H_
OLDNEW
« no previous file with comments | « src/assembler.cc ('k') | src/debug/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698