| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 | 215 |
| 216 void Debug::GenerateCallICDebugBreak(MacroAssembler* masm) { | 216 void Debug::GenerateCallICDebugBreak(MacroAssembler* masm) { |
| 217 // Register state for keyed IC call call (from ic-ia32.cc) | 217 // Register state for keyed IC call call (from ic-ia32.cc) |
| 218 // ----------- S t a t e ------------- | 218 // ----------- S t a t e ------------- |
| 219 // -- ecx: name | 219 // -- ecx: name |
| 220 // ----------------------------------- | 220 // ----------------------------------- |
| 221 Generate_DebugBreakCallHelper(masm, ecx.bit(), 0, false); | 221 Generate_DebugBreakCallHelper(masm, ecx.bit(), 0, false); |
| 222 } | 222 } |
| 223 | 223 |
| 224 | 224 |
| 225 void Debug::GenerateConstructCallDebugBreak(MacroAssembler* masm) { | |
| 226 // Register state just before return from JS function (from codegen-ia32.cc). | |
| 227 // eax is the actual number of arguments not encoded as a smi see comment | |
| 228 // above IC call. | |
| 229 // ----------- S t a t e ------------- | |
| 230 // -- eax: number of arguments (not smi) | |
| 231 // -- ebx: cache cell for call target | |
| 232 // -- edi: constructor function | |
| 233 // ----------------------------------- | |
| 234 // The number of arguments in eax is not smi encoded. | |
| 235 Generate_DebugBreakCallHelper(masm, ebx.bit() | edi.bit(), eax.bit(), false); | |
| 236 } | |
| 237 | |
| 238 | |
| 239 void Debug::GenerateReturnDebugBreak(MacroAssembler* masm) { | 225 void Debug::GenerateReturnDebugBreak(MacroAssembler* masm) { |
| 240 // Register state just before return from JS function (from codegen-ia32.cc). | 226 // Register state just before return from JS function (from codegen-ia32.cc). |
| 241 // ----------- S t a t e ------------- | 227 // ----------- S t a t e ------------- |
| 242 // -- eax: return value | 228 // -- eax: return value |
| 243 // ----------------------------------- | 229 // ----------------------------------- |
| 244 Generate_DebugBreakCallHelper(masm, eax.bit(), 0, true); | 230 Generate_DebugBreakCallHelper(masm, eax.bit(), 0, true); |
| 245 } | 231 } |
| 246 | 232 |
| 247 | 233 |
| 248 void Debug::GenerateCallFunctionStubDebugBreak(MacroAssembler* masm) { | 234 void Debug::GenerateCallFunctionStubDebugBreak(MacroAssembler* masm) { |
| 249 // Register state for CallFunctionStub (from code-stubs-ia32.cc). | 235 // Register state for CallFunctionStub (from code-stubs-ia32.cc). |
| 250 // ----------- S t a t e ------------- | 236 // ----------- S t a t e ------------- |
| 237 // -- edi: function |
| 238 // ----------------------------------- |
| 239 Generate_DebugBreakCallHelper(masm, edi.bit(), 0, false); |
| 240 } |
| 241 |
| 242 |
| 243 void Debug::GenerateCallFunctionStubRecordDebugBreak(MacroAssembler* masm) { |
| 244 // Register state for CallFunctionStub (from code-stubs-ia32.cc). |
| 245 // ----------- S t a t e ------------- |
| 251 // -- ebx: cache cell for call target | 246 // -- ebx: cache cell for call target |
| 252 // -- edi: function | 247 // -- edi: function |
| 253 // ----------------------------------- | 248 // ----------------------------------- |
| 254 Generate_DebugBreakCallHelper(masm, ebx.bit() | edi.bit(), 0, false); | 249 Generate_DebugBreakCallHelper(masm, ebx.bit() | edi.bit(), 0, false); |
| 255 } | 250 } |
| 256 | 251 |
| 257 | 252 |
| 253 void Debug::GenerateCallConstructStubDebugBreak(MacroAssembler* masm) { |
| 254 // Register state for CallConstructStub (from code-stubs-ia32.cc). |
| 255 // eax is the actual number of arguments not encoded as a smi see comment |
| 256 // above IC call. |
| 257 // ----------- S t a t e ------------- |
| 258 // -- eax: number of arguments (not smi) |
| 259 // -- edi: constructor function |
| 260 // ----------------------------------- |
| 261 // The number of arguments in eax is not smi encoded. |
| 262 Generate_DebugBreakCallHelper(masm, edi.bit(), eax.bit(), false); |
| 263 } |
| 264 |
| 265 |
| 266 void Debug::GenerateCallConstructStubRecordDebugBreak(MacroAssembler* masm) { |
| 267 // Register state for CallConstructStub (from code-stubs-ia32.cc). |
| 268 // eax is the actual number of arguments not encoded as a smi see comment |
| 269 // above IC call. |
| 270 // ----------- S t a t e ------------- |
| 271 // -- eax: number of arguments (not smi) |
| 272 // -- ebx: cache cell for call target |
| 273 // -- edi: constructor function |
| 274 // ----------------------------------- |
| 275 // The number of arguments in eax is not smi encoded. |
| 276 Generate_DebugBreakCallHelper(masm, ebx.bit() | edi.bit(), eax.bit(), false); |
| 277 } |
| 278 |
| 279 |
| 258 void Debug::GenerateSlot(MacroAssembler* masm) { | 280 void Debug::GenerateSlot(MacroAssembler* masm) { |
| 259 // Generate enough nop's to make space for a call instruction. | 281 // Generate enough nop's to make space for a call instruction. |
| 260 Label check_codesize; | 282 Label check_codesize; |
| 261 __ bind(&check_codesize); | 283 __ bind(&check_codesize); |
| 262 __ RecordDebugBreakSlot(); | 284 __ RecordDebugBreakSlot(); |
| 263 __ Nop(Assembler::kDebugBreakSlotLength); | 285 __ Nop(Assembler::kDebugBreakSlotLength); |
| 264 ASSERT_EQ(Assembler::kDebugBreakSlotLength, | 286 ASSERT_EQ(Assembler::kDebugBreakSlotLength, |
| 265 masm->SizeOfCodeGeneratedSince(&check_codesize)); | 287 masm->SizeOfCodeGeneratedSince(&check_codesize)); |
| 266 } | 288 } |
| 267 | 289 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 | 326 |
| 305 const bool Debug::kFrameDropperSupported = true; | 327 const bool Debug::kFrameDropperSupported = true; |
| 306 | 328 |
| 307 #undef __ | 329 #undef __ |
| 308 | 330 |
| 309 #endif // ENABLE_DEBUGGER_SUPPORT | 331 #endif // ENABLE_DEBUGGER_SUPPORT |
| 310 | 332 |
| 311 } } // namespace v8::internal | 333 } } // namespace v8::internal |
| 312 | 334 |
| 313 #endif // V8_TARGET_ARCH_IA32 | 335 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |