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

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

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

Powered by Google App Engine
This is Rietveld 408576698