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

Side by Side Diff: src/debug.h

Issue 1232803002: Debugger: refactor reloc info. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix mips Created 5 years, 5 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/builtins.h ('k') | src/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_H_ 5 #ifndef V8_DEBUG_H_
6 #define V8_DEBUG_H_ 6 #define V8_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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 BreakLocatorType type, Address pc, 73 BreakLocatorType type, Address pc,
74 List<BreakLocation>* result_out); 74 List<BreakLocation>* result_out);
75 75
76 static BreakLocation FromPosition(Handle<DebugInfo> debug_info, 76 static BreakLocation FromPosition(Handle<DebugInfo> debug_info,
77 BreakLocatorType type, int position, 77 BreakLocatorType type, int position,
78 BreakPositionAlignment alignment); 78 BreakPositionAlignment alignment);
79 79
80 bool IsDebugBreak() const; 80 bool IsDebugBreak() const;
81 inline bool IsExit() const { return RelocInfo::IsJSReturn(rmode_); } 81 inline bool IsExit() const { return RelocInfo::IsJSReturn(rmode_); }
82 inline bool IsCall() const { 82 inline bool IsCall() const {
83 return IsDebugBreakSlot() && RelocInfo::DebugBreakIsCall(data_); 83 return RelocInfo::IsDebugBreakSlotAtCall(rmode_);
84 } 84 }
85 inline bool IsConstructCall() const { 85 inline bool IsConstructCall() const {
86 return IsDebugBreakSlot() && RelocInfo::DebugBreakIsConstructCall(data_); 86 return RelocInfo::IsDebugBreakSlotAtConstructCall(rmode_);
87 } 87 }
88 inline int CallArgumentsCount() const { 88 inline int CallArgumentsCount() const {
89 DCHECK(IsCall()); 89 DCHECK(IsCall());
90 return RelocInfo::DebugBreakCallArgumentsCount(data_); 90 return RelocInfo::DebugBreakCallArgumentsCount(data_);
91 } 91 }
92 92
93 bool IsStepInLocation() const; 93 bool IsStepInLocation() const;
94 inline bool HasBreakPoint() const { 94 inline bool HasBreakPoint() const {
95 return debug_info_->HasBreakPoint(pc_offset_); 95 return debug_info_->HasBreakPoint(pc_offset_);
96 } 96 }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 inline RelocInfo* original_rinfo() { 146 inline RelocInfo* original_rinfo() {
147 return reloc_iterator_original_.rinfo(); 147 return reloc_iterator_original_.rinfo();
148 } 148 }
149 149
150 inline Address pc() { return rinfo()->pc(); } 150 inline Address pc() { return rinfo()->pc(); }
151 int break_index() const { return break_index_; } 151 int break_index() const { return break_index_; }
152 inline int position() const { return position_; } 152 inline int position() const { return position_; }
153 inline int statement_position() const { return statement_position_; } 153 inline int statement_position() const { return statement_position_; }
154 154
155 private: 155 private:
156 static int GetModeMask(BreakLocatorType type);
157
156 bool RinfoDone() const; 158 bool RinfoDone() const;
157 void RinfoNext(); 159 void RinfoNext();
158 160
159 Handle<DebugInfo> debug_info_; 161 Handle<DebugInfo> debug_info_;
160 BreakLocatorType type_;
161 RelocIterator reloc_iterator_; 162 RelocIterator reloc_iterator_;
162 RelocIterator reloc_iterator_original_; 163 RelocIterator reloc_iterator_original_;
163 int break_index_; 164 int break_index_;
164 int position_; 165 int position_;
165 int statement_position_; 166 int statement_position_;
166 167
167 DisallowHeapAllocation no_gc_; 168 DisallowHeapAllocation no_gc_;
168 169
169 DISALLOW_COPY_AND_ASSIGN(Iterator); 170 DISALLOW_COPY_AND_ASSIGN(Iterator);
170 }; 171 };
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 812
812 private: 813 private:
813 static void RecordRelocInfo(MacroAssembler* masm, SlotLocation location, 814 static void RecordRelocInfo(MacroAssembler* masm, SlotLocation location,
814 int call_argc); 815 int call_argc);
815 }; 816 };
816 817
817 818
818 } } // namespace v8::internal 819 } } // namespace v8::internal
819 820
820 #endif // V8_DEBUG_H_ 821 #endif // V8_DEBUG_H_
OLDNEW
« no previous file with comments | « src/builtins.h ('k') | src/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698