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