Chromium Code Reviews| Index: src/debug.h |
| diff --git a/src/debug.h b/src/debug.h |
| index 5882ffbf2b9c1370724c02d4cd1429ff0256f69a..f0f7ff2540892b76d86d4d081658fa606a27e61a 100644 |
| --- a/src/debug.h |
| +++ b/src/debug.h |
| @@ -51,11 +51,7 @@ enum ExceptionBreakType { |
| // Type of exception break. |
| -enum BreakLocatorType { |
| - ALL_BREAK_LOCATIONS = 0, |
| - SOURCE_BREAK_LOCATIONS = 1, |
| - CALLS_AND_RETURNS = 2 |
| -}; |
| +enum BreakLocatorType { ALL_BREAK_LOCATIONS, CALLS_AND_RETURNS }; |
| // The different types of breakpoint position alignments. |
| @@ -83,13 +79,16 @@ class BreakLocation { |
| bool IsDebugBreak() const; |
| inline bool IsExit() const { return RelocInfo::IsJSReturn(rmode_); } |
| + inline bool IsCall() const { |
| + return IsDebugBreakSlot() && RelocInfo::DebugBreakIsCall(data_); |
| + } |
| inline bool IsConstructCall() const { |
| - return RelocInfo::IsConstructCall(rmode_); |
| + return IsDebugBreakSlot() && RelocInfo::DebugBreakIsConstructCall(data_); |
| + } |
| + inline int CallArgc() const { |
|
ulan
2015/07/08 11:53:33
Please use CallArgCount() or CallArgumentsCount()
Yang
2015/07/09 09:38:48
Done.
|
| + DCHECK(IsCall()); |
| + return RelocInfo::DebugBreakCallArgumentsCount(data_); |
| } |
| - inline bool IsCodeTarget() const { return RelocInfo::IsCodeTarget(rmode_); } |
| - |
| - Handle<Code> CodeTarget() const; |
| - Handle<Code> OriginalCodeTarget() const; |
| bool IsStepInLocation() const; |
| inline bool HasBreakPoint() const { |
| @@ -104,34 +103,31 @@ class BreakLocation { |
| void SetOneShot(); |
| void ClearOneShot(); |
| + |
| inline RelocInfo rinfo() const { |
| return RelocInfo(pc(), rmode(), data_, code()); |
| } |
| - inline RelocInfo original_rinfo() const { |
| - return RelocInfo(original_pc(), original_rmode(), original_data_, |
| - original_code()); |
| - } |
| - |
| inline int position() const { return position_; } |
| inline int statement_position() const { return statement_position_; } |
| inline Address pc() const { return code()->entry() + pc_offset_; } |
| inline Address original_pc() const { |
| - return original_code()->entry() + original_pc_offset_; |
| + return debug_info_->original_code()->entry() + original_pc_offset_; |
| } |
| inline RelocInfo::Mode rmode() const { return rmode_; } |
| - inline RelocInfo::Mode original_rmode() const { return original_rmode_; } |
| inline Code* code() const { return debug_info_->code(); } |
| - inline Code* original_code() const { return debug_info_->original_code(); } |
| private: |
| BreakLocation(Handle<DebugInfo> debug_info, RelocInfo* rinfo, |
| RelocInfo* original_rinfo, int position, |
| int statement_position); |
| + static const int kNonCallArgc = -2; |
|
ulan
2015/07/08 11:53:33
Please use the same constants here and in assemble
Yang
2015/07/09 09:38:48
Removed. They are not actually necessary anymore.
|
| + static const int kConstructCallArgc = -1; |
| + |
| class Iterator { |
| public: |
| Iterator(Handle<DebugInfo> debug_info, BreakLocatorType type); |
| @@ -149,20 +145,13 @@ class BreakLocation { |
| } |
| inline RelocInfo::Mode rmode() { return reloc_iterator_.rinfo()->rmode(); } |
| - inline RelocInfo::Mode original_rmode() { |
| - return reloc_iterator_.rinfo()->rmode(); |
| - } |
| - |
| inline RelocInfo* rinfo() { return reloc_iterator_.rinfo(); } |
| inline RelocInfo* original_rinfo() { |
| return reloc_iterator_original_.rinfo(); |
| } |
| inline Address pc() { return rinfo()->pc(); } |
| - inline Address original_pc() { return original_rinfo()->pc(); } |
| - |
| int break_index() const { return break_index_; } |
| - |
| inline int position() const { return position_; } |
| inline int statement_position() const { return statement_position_; } |
| @@ -194,7 +183,6 @@ class BreakLocation { |
| void SetDebugBreak(); |
| void SetDebugBreakAtReturn(); |
| void SetDebugBreakAtSlot(); |
| - void SetDebugBreakAtIC(); |
| inline bool IsDebuggerStatement() const { |
| return RelocInfo::IsDebuggerStatement(rmode_); |
| @@ -808,16 +796,7 @@ class SuppressDebug BASE_EMBEDDED { |
| class DebugCodegen : public AllStatic { |
| public: |
| static void GenerateSlot(MacroAssembler* masm); |
| - static void GenerateCallICStubDebugBreak(MacroAssembler* masm); |
| - static void GenerateLoadICDebugBreak(MacroAssembler* masm); |
| - static void GenerateStoreICDebugBreak(MacroAssembler* masm); |
| - static void GenerateKeyedLoadICDebugBreak(MacroAssembler* masm); |
| - static void GenerateKeyedStoreICDebugBreak(MacroAssembler* masm); |
| - static void GenerateCompareNilICDebugBreak(MacroAssembler* masm); |
| static void GenerateReturnDebugBreak(MacroAssembler* masm); |
| - static void GenerateCallFunctionStubDebugBreak(MacroAssembler* masm); |
| - static void GenerateCallConstructStubDebugBreak(MacroAssembler* masm); |
| - static void GenerateCallConstructStubRecordDebugBreak(MacroAssembler* masm); |
| static void GenerateSlotDebugBreak(MacroAssembler* masm); |
| static void GeneratePlainReturnLiveEdit(MacroAssembler* masm); |