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_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "assembler.h" | 9 #include "assembler.h" |
10 #include "codegen.h" | 10 #include "codegen.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 debug_info_->GetIsolate()->builtins()->Slot_DebugBreak()->entry(), | 58 debug_info_->GetIsolate()->builtins()->Slot_DebugBreak()->entry(), |
59 Assembler::kDebugBreakSlotLength - Assembler::kCallSequenceLength); | 59 Assembler::kDebugBreakSlotLength - Assembler::kCallSequenceLength); |
60 } | 60 } |
61 | 61 |
62 | 62 |
63 void BreakLocationIterator::ClearDebugBreakAtSlot() { | 63 void BreakLocationIterator::ClearDebugBreakAtSlot() { |
64 ASSERT(IsDebugBreakSlot()); | 64 ASSERT(IsDebugBreakSlot()); |
65 rinfo()->PatchCode(original_rinfo()->pc(), Assembler::kDebugBreakSlotLength); | 65 rinfo()->PatchCode(original_rinfo()->pc(), Assembler::kDebugBreakSlotLength); |
66 } | 66 } |
67 | 67 |
68 const bool Debug::FramePaddingLayout::kIsSupported = true; | |
69 | |
70 | 68 |
71 #define __ ACCESS_MASM(masm) | 69 #define __ ACCESS_MASM(masm) |
72 | 70 |
73 | 71 |
74 static void Generate_DebugBreakCallHelper(MacroAssembler* masm, | 72 static void Generate_DebugBreakCallHelper(MacroAssembler* masm, |
75 RegList object_regs, | 73 RegList object_regs, |
76 RegList non_object_regs, | 74 RegList non_object_regs, |
77 bool convert_call_to_jmp) { | 75 bool convert_call_to_jmp) { |
78 // Enter an internal frame. | 76 // Enter an internal frame. |
79 { | 77 { |
80 FrameScope scope(masm, StackFrame::INTERNAL); | 78 FrameScope scope(masm, StackFrame::INTERNAL); |
81 | 79 |
82 // Load padding words on stack. | 80 // Load padding words on stack. |
83 for (int i = 0; i < Debug::FramePaddingLayout::kInitialSize; i++) { | 81 for (int i = 0; i < LiveEdit::kFramePaddingInitialSize; i++) { |
84 __ Push(Smi::FromInt(Debug::FramePaddingLayout::kPaddingValue)); | 82 __ Push(Smi::FromInt(LiveEdit::kFramePaddingValue)); |
85 } | 83 } |
86 __ Push(Smi::FromInt(Debug::FramePaddingLayout::kInitialSize)); | 84 __ Push(Smi::FromInt(LiveEdit::kFramePaddingInitialSize)); |
87 | 85 |
88 // Store the registers containing live values on the expression stack to | 86 // Store the registers containing live values on the expression stack to |
89 // 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 |
90 // are stored as as two smis causing it to be untouched by GC. | 88 // are stored as as two smis causing it to be untouched by GC. |
91 ASSERT((object_regs & ~kJSCallerSaved) == 0); | 89 ASSERT((object_regs & ~kJSCallerSaved) == 0); |
92 ASSERT((non_object_regs & ~kJSCallerSaved) == 0); | 90 ASSERT((non_object_regs & ~kJSCallerSaved) == 0); |
93 ASSERT((object_regs & non_object_regs) == 0); | 91 ASSERT((object_regs & non_object_regs) == 0); |
94 for (int i = 0; i < kNumJSCallerSaved; i++) { | 92 for (int i = 0; i < kNumJSCallerSaved; i++) { |
95 int r = JSCallerSavedCode(i); | 93 int r = JSCallerSavedCode(i); |
96 Register reg = { r }; | 94 Register reg = { r }; |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 | 300 |
303 // Get function code. | 301 // Get function code. |
304 __ movp(rdx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); | 302 __ movp(rdx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); |
305 __ movp(rdx, FieldOperand(rdx, SharedFunctionInfo::kCodeOffset)); | 303 __ movp(rdx, FieldOperand(rdx, SharedFunctionInfo::kCodeOffset)); |
306 __ leap(rdx, FieldOperand(rdx, Code::kHeaderSize)); | 304 __ leap(rdx, FieldOperand(rdx, Code::kHeaderSize)); |
307 | 305 |
308 // Re-run JSFunction, rdi is function, rsi is context. | 306 // Re-run JSFunction, rdi is function, rsi is context. |
309 __ jmp(rdx); | 307 __ jmp(rdx); |
310 } | 308 } |
311 | 309 |
312 const bool Debug::kFrameDropperSupported = true; | 310 const bool LiveEdit::kFrameDropperSupported = true; |
313 | 311 |
314 #undef __ | 312 #undef __ |
315 | 313 |
316 } } // namespace v8::internal | 314 } } // namespace v8::internal |
317 | 315 |
318 #endif // V8_TARGET_ARCH_X64 | 316 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |