| 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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 6 | 6 |
| 7 #include "src/assembler.h" | 7 #include "src/assembler.h" |
| 8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
| 9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 | 26 |
| 27 void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode, | 27 void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode, |
| 28 int call_argc) { | 28 int call_argc) { |
| 29 // Generate enough nop's to make space for a call instruction. | 29 // Generate enough nop's to make space for a call instruction. |
| 30 masm->RecordDebugBreakSlot(mode, call_argc); | 30 masm->RecordDebugBreakSlot(mode, call_argc); |
| 31 EmitDebugBreakSlot(masm); | 31 EmitDebugBreakSlot(masm); |
| 32 } | 32 } |
| 33 | 33 |
| 34 | 34 |
| 35 void DebugCodegen::ClearDebugBreakSlot(Address pc) { | 35 void DebugCodegen::ClearDebugBreakSlot(Isolate* isolate, Address pc) { |
| 36 CodePatcher patcher(pc, Assembler::kDebugBreakSlotLength); | 36 CodePatcher patcher(isolate, pc, Assembler::kDebugBreakSlotLength); |
| 37 EmitDebugBreakSlot(patcher.masm()); | 37 EmitDebugBreakSlot(patcher.masm()); |
| 38 } | 38 } |
| 39 | 39 |
| 40 | 40 |
| 41 void DebugCodegen::PatchDebugBreakSlot(Address pc, Handle<Code> code) { | 41 void DebugCodegen::PatchDebugBreakSlot(Isolate* isolate, Address pc, |
| 42 Handle<Code> code) { |
| 42 DCHECK_EQ(Code::BUILTIN, code->kind()); | 43 DCHECK_EQ(Code::BUILTIN, code->kind()); |
| 43 static const int kSize = Assembler::kDebugBreakSlotLength; | 44 static const int kSize = Assembler::kDebugBreakSlotLength; |
| 44 CodePatcher patcher(pc, kSize); | 45 CodePatcher patcher(isolate, pc, kSize); |
| 45 Label check_codesize; | 46 Label check_codesize; |
| 46 patcher.masm()->bind(&check_codesize); | 47 patcher.masm()->bind(&check_codesize); |
| 47 patcher.masm()->movp(kScratchRegister, reinterpret_cast<void*>(code->entry()), | 48 patcher.masm()->movp(kScratchRegister, reinterpret_cast<void*>(code->entry()), |
| 48 Assembler::RelocInfoNone()); | 49 Assembler::RelocInfoNone()); |
| 49 patcher.masm()->call(kScratchRegister); | 50 patcher.masm()->call(kScratchRegister); |
| 50 // Check that the size of the code generated is as expected. | 51 // Check that the size of the code generated is as expected. |
| 51 DCHECK_EQ(kSize, patcher.masm()->SizeOfCodeGeneratedSince(&check_codesize)); | 52 DCHECK_EQ(kSize, patcher.masm()->SizeOfCodeGeneratedSince(&check_codesize)); |
| 52 } | 53 } |
| 53 | 54 |
| 54 | 55 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 } | 138 } |
| 138 | 139 |
| 139 const bool LiveEdit::kFrameDropperSupported = true; | 140 const bool LiveEdit::kFrameDropperSupported = true; |
| 140 | 141 |
| 141 #undef __ | 142 #undef __ |
| 142 | 143 |
| 143 } // namespace internal | 144 } // namespace internal |
| 144 } // namespace v8 | 145 } // namespace v8 |
| 145 | 146 |
| 146 #endif // V8_TARGET_ARCH_X64 | 147 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |