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

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

Issue 298863011: Merge the classes Debug and Debugger. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rename EnterDebugger Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/mark-compact.cc ('k') | src/objects.h » ('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 5
6 6
7 #include "v8.h" 7 #include "v8.h"
8 8
9 #if V8_TARGET_ARCH_MIPS 9 #if V8_TARGET_ARCH_MIPS
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 patcher.masm()->Call(v8::internal::t9); 83 patcher.masm()->Call(v8::internal::t9);
84 } 84 }
85 85
86 86
87 void BreakLocationIterator::ClearDebugBreakAtSlot() { 87 void BreakLocationIterator::ClearDebugBreakAtSlot() {
88 ASSERT(IsDebugBreakSlot()); 88 ASSERT(IsDebugBreakSlot());
89 rinfo()->PatchCode(original_rinfo()->pc(), 89 rinfo()->PatchCode(original_rinfo()->pc(),
90 Assembler::kDebugBreakSlotInstructions); 90 Assembler::kDebugBreakSlotInstructions);
91 } 91 }
92 92
93 const bool Debug::FramePaddingLayout::kIsSupported = false;
94
95 93
96 #define __ ACCESS_MASM(masm) 94 #define __ ACCESS_MASM(masm)
97 95
98 96
99 97
100 static void Generate_DebugBreakCallHelper(MacroAssembler* masm, 98 static void Generate_DebugBreakCallHelper(MacroAssembler* masm,
101 RegList object_regs, 99 RegList object_regs,
102 RegList non_object_regs) { 100 RegList non_object_regs) {
103 { 101 {
104 FrameScope scope(masm, StackFrame::INTERNAL); 102 FrameScope scope(masm, StackFrame::INTERNAL);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 // jumping to the target address intended by the caller and that was 154 // jumping to the target address intended by the caller and that was
157 // overwritten by the address of DebugBreakXXX. 155 // overwritten by the address of DebugBreakXXX.
158 ExternalReference after_break_target = 156 ExternalReference after_break_target =
159 ExternalReference::debug_after_break_target_address(masm->isolate()); 157 ExternalReference::debug_after_break_target_address(masm->isolate());
160 __ li(t9, Operand(after_break_target)); 158 __ li(t9, Operand(after_break_target));
161 __ lw(t9, MemOperand(t9)); 159 __ lw(t9, MemOperand(t9));
162 __ Jump(t9); 160 __ Jump(t9);
163 } 161 }
164 162
165 163
166 void Debug::GenerateCallICStubDebugBreak(MacroAssembler* masm) { 164 void DebugCodegen::GenerateCallICStubDebugBreak(MacroAssembler* masm) {
167 // Register state for CallICStub 165 // Register state for CallICStub
168 // ----------- S t a t e ------------- 166 // ----------- S t a t e -------------
169 // -- a1 : function 167 // -- a1 : function
170 // -- a3 : slot in feedback array (smi) 168 // -- a3 : slot in feedback array (smi)
171 // ----------------------------------- 169 // -----------------------------------
172 Generate_DebugBreakCallHelper(masm, a1.bit() | a3.bit(), 0); 170 Generate_DebugBreakCallHelper(masm, a1.bit() | a3.bit(), 0);
173 } 171 }
174 172
175 173
176 void Debug::GenerateLoadICDebugBreak(MacroAssembler* masm) { 174 void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) {
177 // Calling convention for IC load (from ic-mips.cc). 175 // Calling convention for IC load (from ic-mips.cc).
178 // ----------- S t a t e ------------- 176 // ----------- S t a t e -------------
179 // -- a2 : name 177 // -- a2 : name
180 // -- ra : return address 178 // -- ra : return address
181 // -- a0 : receiver 179 // -- a0 : receiver
182 // -- [sp] : receiver 180 // -- [sp] : receiver
183 // ----------------------------------- 181 // -----------------------------------
184 // Registers a0 and a2 contain objects that need to be pushed on the 182 // Registers a0 and a2 contain objects that need to be pushed on the
185 // expression stack of the fake JS frame. 183 // expression stack of the fake JS frame.
186 Generate_DebugBreakCallHelper(masm, a0.bit() | a2.bit(), 0); 184 Generate_DebugBreakCallHelper(masm, a0.bit() | a2.bit(), 0);
187 } 185 }
188 186
189 187
190 void Debug::GenerateStoreICDebugBreak(MacroAssembler* masm) { 188 void DebugCodegen::GenerateStoreICDebugBreak(MacroAssembler* masm) {
191 // Calling convention for IC store (from ic-mips.cc). 189 // Calling convention for IC store (from ic-mips.cc).
192 // ----------- S t a t e ------------- 190 // ----------- S t a t e -------------
193 // -- a0 : value 191 // -- a0 : value
194 // -- a1 : receiver 192 // -- a1 : receiver
195 // -- a2 : name 193 // -- a2 : name
196 // -- ra : return address 194 // -- ra : return address
197 // ----------------------------------- 195 // -----------------------------------
198 // Registers a0, a1, and a2 contain objects that need to be pushed on the 196 // Registers a0, a1, and a2 contain objects that need to be pushed on the
199 // expression stack of the fake JS frame. 197 // expression stack of the fake JS frame.
200 Generate_DebugBreakCallHelper(masm, a0.bit() | a1.bit() | a2.bit(), 0); 198 Generate_DebugBreakCallHelper(masm, a0.bit() | a1.bit() | a2.bit(), 0);
201 } 199 }
202 200
203 201
204 void Debug::GenerateKeyedLoadICDebugBreak(MacroAssembler* masm) { 202 void DebugCodegen::GenerateKeyedLoadICDebugBreak(MacroAssembler* masm) {
205 // ---------- S t a t e -------------- 203 // ---------- S t a t e --------------
206 // -- ra : return address 204 // -- ra : return address
207 // -- a0 : key 205 // -- a0 : key
208 // -- a1 : receiver 206 // -- a1 : receiver
209 Generate_DebugBreakCallHelper(masm, a0.bit() | a1.bit(), 0); 207 Generate_DebugBreakCallHelper(masm, a0.bit() | a1.bit(), 0);
210 } 208 }
211 209
212 210
213 void Debug::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) { 211 void DebugCodegen::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) {
214 // ---------- S t a t e -------------- 212 // ---------- S t a t e --------------
215 // -- a0 : value 213 // -- a0 : value
216 // -- a1 : key 214 // -- a1 : key
217 // -- a2 : receiver 215 // -- a2 : receiver
218 // -- ra : return address 216 // -- ra : return address
219 Generate_DebugBreakCallHelper(masm, a0.bit() | a1.bit() | a2.bit(), 0); 217 Generate_DebugBreakCallHelper(masm, a0.bit() | a1.bit() | a2.bit(), 0);
220 } 218 }
221 219
222 220
223 void Debug::GenerateCompareNilICDebugBreak(MacroAssembler* masm) { 221 void DebugCodegen::GenerateCompareNilICDebugBreak(MacroAssembler* masm) {
224 // Register state for CompareNil IC 222 // Register state for CompareNil IC
225 // ----------- S t a t e ------------- 223 // ----------- S t a t e -------------
226 // -- a0 : value 224 // -- a0 : value
227 // ----------------------------------- 225 // -----------------------------------
228 Generate_DebugBreakCallHelper(masm, a0.bit(), 0); 226 Generate_DebugBreakCallHelper(masm, a0.bit(), 0);
229 } 227 }
230 228
231 229
232 void Debug::GenerateReturnDebugBreak(MacroAssembler* masm) { 230 void DebugCodegen::GenerateReturnDebugBreak(MacroAssembler* masm) {
233 // In places other than IC call sites it is expected that v0 is TOS which 231 // In places other than IC call sites it is expected that v0 is TOS which
234 // is an object - this is not generally the case so this should be used with 232 // is an object - this is not generally the case so this should be used with
235 // care. 233 // care.
236 Generate_DebugBreakCallHelper(masm, v0.bit(), 0); 234 Generate_DebugBreakCallHelper(masm, v0.bit(), 0);
237 } 235 }
238 236
239 237
240 void Debug::GenerateCallFunctionStubDebugBreak(MacroAssembler* masm) { 238 void DebugCodegen::GenerateCallFunctionStubDebugBreak(MacroAssembler* masm) {
241 // Register state for CallFunctionStub (from code-stubs-mips.cc). 239 // Register state for CallFunctionStub (from code-stubs-mips.cc).
242 // ----------- S t a t e ------------- 240 // ----------- S t a t e -------------
243 // -- a1 : function 241 // -- a1 : function
244 // ----------------------------------- 242 // -----------------------------------
245 Generate_DebugBreakCallHelper(masm, a1.bit(), 0); 243 Generate_DebugBreakCallHelper(masm, a1.bit(), 0);
246 } 244 }
247 245
248 246
249 void Debug::GenerateCallConstructStubDebugBreak(MacroAssembler* masm) { 247 void DebugCodegen::GenerateCallConstructStubDebugBreak(MacroAssembler* masm) {
250 // Calling convention for CallConstructStub (from code-stubs-mips.cc). 248 // Calling convention for CallConstructStub (from code-stubs-mips.cc).
251 // ----------- S t a t e ------------- 249 // ----------- S t a t e -------------
252 // -- a0 : number of arguments (not smi) 250 // -- a0 : number of arguments (not smi)
253 // -- a1 : constructor function 251 // -- a1 : constructor function
254 // ----------------------------------- 252 // -----------------------------------
255 Generate_DebugBreakCallHelper(masm, a1.bit() , a0.bit()); 253 Generate_DebugBreakCallHelper(masm, a1.bit() , a0.bit());
256 } 254 }
257 255
258 256
259 void Debug::GenerateCallConstructStubRecordDebugBreak(MacroAssembler* masm) { 257 void DebugCodegen::GenerateCallConstructStubRecordDebugBreak(
258 MacroAssembler* masm) {
260 // Calling convention for CallConstructStub (from code-stubs-mips.cc). 259 // Calling convention for CallConstructStub (from code-stubs-mips.cc).
261 // ----------- S t a t e ------------- 260 // ----------- S t a t e -------------
262 // -- a0 : number of arguments (not smi) 261 // -- a0 : number of arguments (not smi)
263 // -- a1 : constructor function 262 // -- a1 : constructor function
264 // -- a2 : feedback array 263 // -- a2 : feedback array
265 // -- a3 : feedback slot (smi) 264 // -- a3 : feedback slot (smi)
266 // ----------------------------------- 265 // -----------------------------------
267 Generate_DebugBreakCallHelper(masm, a1.bit() | a2.bit() | a3.bit(), a0.bit()); 266 Generate_DebugBreakCallHelper(masm, a1.bit() | a2.bit() | a3.bit(), a0.bit());
268 } 267 }
269 268
270 269
271 void Debug::GenerateSlot(MacroAssembler* masm) { 270 void DebugCodegen::GenerateSlot(MacroAssembler* masm) {
272 // Generate enough nop's to make space for a call instruction. Avoid emitting 271 // Generate enough nop's to make space for a call instruction. Avoid emitting
273 // the trampoline pool in the debug break slot code. 272 // the trampoline pool in the debug break slot code.
274 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm); 273 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm);
275 Label check_codesize; 274 Label check_codesize;
276 __ bind(&check_codesize); 275 __ bind(&check_codesize);
277 __ RecordDebugBreakSlot(); 276 __ RecordDebugBreakSlot();
278 for (int i = 0; i < Assembler::kDebugBreakSlotInstructions; i++) { 277 for (int i = 0; i < Assembler::kDebugBreakSlotInstructions; i++) {
279 __ nop(MacroAssembler::DEBUG_BREAK_NOP); 278 __ nop(MacroAssembler::DEBUG_BREAK_NOP);
280 } 279 }
281 ASSERT_EQ(Assembler::kDebugBreakSlotInstructions, 280 ASSERT_EQ(Assembler::kDebugBreakSlotInstructions,
282 masm->InstructionsGeneratedSince(&check_codesize)); 281 masm->InstructionsGeneratedSince(&check_codesize));
283 } 282 }
284 283
285 284
286 void Debug::GenerateSlotDebugBreak(MacroAssembler* masm) { 285 void DebugCodegen::GenerateSlotDebugBreak(MacroAssembler* masm) {
287 // In the places where a debug break slot is inserted no registers can contain 286 // In the places where a debug break slot is inserted no registers can contain
288 // object pointers. 287 // object pointers.
289 Generate_DebugBreakCallHelper(masm, 0, 0); 288 Generate_DebugBreakCallHelper(masm, 0, 0);
290 } 289 }
291 290
292 291
293 void Debug::GeneratePlainReturnLiveEdit(MacroAssembler* masm) { 292 void DebugCodegen::GeneratePlainReturnLiveEdit(MacroAssembler* masm) {
294 masm->Abort(kLiveEditFrameDroppingIsNotSupportedOnMips); 293 masm->Abort(kLiveEditFrameDroppingIsNotSupportedOnMips);
295 } 294 }
296 295
297 296
298 void Debug::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { 297 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) {
299 masm->Abort(kLiveEditFrameDroppingIsNotSupportedOnMips); 298 masm->Abort(kLiveEditFrameDroppingIsNotSupportedOnMips);
300 } 299 }
301 300
302 301
303 const bool Debug::kFrameDropperSupported = false; 302 const bool LiveEdit::kFrameDropperSupported = false;
304 303
305 #undef __ 304 #undef __
306 305
307 } } // namespace v8::internal 306 } } // namespace v8::internal
308 307
309 #endif // V8_TARGET_ARCH_MIPS 308 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mark-compact.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698