OLD | NEW |
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 #include "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
8 | 8 |
9 #include "codegen.h" | 9 #include "codegen.h" |
10 #include "debug.h" | 10 #include "debug.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 Assembler::kDebugBreakSlotLength - Assembler::kCallInstructionLength); | 60 Assembler::kDebugBreakSlotLength - Assembler::kCallInstructionLength); |
61 } | 61 } |
62 | 62 |
63 | 63 |
64 void BreakLocationIterator::ClearDebugBreakAtSlot() { | 64 void BreakLocationIterator::ClearDebugBreakAtSlot() { |
65 ASSERT(IsDebugBreakSlot()); | 65 ASSERT(IsDebugBreakSlot()); |
66 rinfo()->PatchCode(original_rinfo()->pc(), Assembler::kDebugBreakSlotLength); | 66 rinfo()->PatchCode(original_rinfo()->pc(), Assembler::kDebugBreakSlotLength); |
67 } | 67 } |
68 | 68 |
69 | 69 |
70 // All debug break stubs support padding for LiveEdit. | |
71 const bool Debug::FramePaddingLayout::kIsSupported = true; | |
72 | |
73 | |
74 #define __ ACCESS_MASM(masm) | 70 #define __ ACCESS_MASM(masm) |
75 | 71 |
76 static void Generate_DebugBreakCallHelper(MacroAssembler* masm, | 72 static void Generate_DebugBreakCallHelper(MacroAssembler* masm, |
77 RegList object_regs, | 73 RegList object_regs, |
78 RegList non_object_regs, | 74 RegList non_object_regs, |
79 bool convert_call_to_jmp) { | 75 bool convert_call_to_jmp) { |
80 // Enter an internal frame. | 76 // Enter an internal frame. |
81 { | 77 { |
82 FrameScope scope(masm, StackFrame::INTERNAL); | 78 FrameScope scope(masm, StackFrame::INTERNAL); |
83 | 79 |
84 // Load padding words on stack. | 80 // Load padding words on stack. |
85 for (int i = 0; i < Debug::FramePaddingLayout::kInitialSize; i++) { | 81 for (int i = 0; i < LiveEdit::kFramePaddingInitialSize; i++) { |
86 __ push(Immediate(Smi::FromInt( | 82 __ push(Immediate(Smi::FromInt(LiveEdit::kFramePaddingValue))); |
87 Debug::FramePaddingLayout::kPaddingValue))); | |
88 } | 83 } |
89 __ push(Immediate(Smi::FromInt(Debug::FramePaddingLayout::kInitialSize))); | 84 __ push(Immediate(Smi::FromInt(LiveEdit::kFramePaddingInitialSize))); |
90 | 85 |
91 // Store the registers containing live values on the expression stack to | 86 // Store the registers containing live values on the expression stack to |
92 // make sure that these are correctly updated during GC. Non object values | 87 // make sure that these are correctly updated during GC. Non object values |
93 // are stored as a smi causing it to be untouched by GC. | 88 // are stored as a smi causing it to be untouched by GC. |
94 ASSERT((object_regs & ~kJSCallerSaved) == 0); | 89 ASSERT((object_regs & ~kJSCallerSaved) == 0); |
95 ASSERT((non_object_regs & ~kJSCallerSaved) == 0); | 90 ASSERT((non_object_regs & ~kJSCallerSaved) == 0); |
96 ASSERT((object_regs & non_object_regs) == 0); | 91 ASSERT((object_regs & non_object_regs) == 0); |
97 for (int i = 0; i < kNumJSCallerSaved; i++) { | 92 for (int i = 0; i < kNumJSCallerSaved; i++) { |
98 int r = JSCallerSavedCode(i); | 93 int r = JSCallerSavedCode(i); |
99 Register reg = { r }; | 94 Register reg = { r }; |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 | 319 |
325 // Get function code. | 320 // Get function code. |
326 __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); | 321 __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); |
327 __ mov(edx, FieldOperand(edx, SharedFunctionInfo::kCodeOffset)); | 322 __ mov(edx, FieldOperand(edx, SharedFunctionInfo::kCodeOffset)); |
328 __ lea(edx, FieldOperand(edx, Code::kHeaderSize)); | 323 __ lea(edx, FieldOperand(edx, Code::kHeaderSize)); |
329 | 324 |
330 // Re-run JSFunction, edi is function, esi is context. | 325 // Re-run JSFunction, edi is function, esi is context. |
331 __ jmp(edx); | 326 __ jmp(edx); |
332 } | 327 } |
333 | 328 |
334 const bool Debug::kFrameDropperSupported = true; | 329 |
| 330 const bool LiveEdit::kFrameDropperSupported = true; |
335 | 331 |
336 #undef __ | 332 #undef __ |
337 | 333 |
338 } } // namespace v8::internal | 334 } } // namespace v8::internal |
339 | 335 |
340 #endif // V8_TARGET_ARCH_X87 | 336 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |