Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: src/debug/arm64/debug-arm64.cc

Issue 2732273003: Disentangle assembler from isolate. (Closed)
Patch Set: Address feedback. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/debug/arm/debug-arm.cc ('k') | src/deoptimizer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/debug/debug.h" 7 #include "src/debug/debug.h"
8 8
9 #include "src/arm64/frames-arm64.h" 9 #include "src/arm64/frames-arm64.h"
10 #include "src/arm64/macro-assembler-arm64-inl.h" 10 #include "src/arm64/macro-assembler-arm64-inl.h"
(...skipping 21 matching lines...) Expand all
32 void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode) { 32 void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode) {
33 // Generate enough nop's to make space for a call instruction. Avoid emitting 33 // Generate enough nop's to make space for a call instruction. Avoid emitting
34 // the constant pool in the debug break slot code. 34 // the constant pool in the debug break slot code.
35 InstructionAccurateScope scope(masm, Assembler::kDebugBreakSlotInstructions); 35 InstructionAccurateScope scope(masm, Assembler::kDebugBreakSlotInstructions);
36 masm->RecordDebugBreakSlot(mode); 36 masm->RecordDebugBreakSlot(mode);
37 EmitDebugBreakSlot(masm); 37 EmitDebugBreakSlot(masm);
38 } 38 }
39 39
40 40
41 void DebugCodegen::ClearDebugBreakSlot(Isolate* isolate, Address pc) { 41 void DebugCodegen::ClearDebugBreakSlot(Isolate* isolate, Address pc) {
42 PatchingAssembler patcher(isolate, reinterpret_cast<Instruction*>(pc), 42 PatchingAssembler patcher(isolate, pc,
43 Assembler::kDebugBreakSlotInstructions); 43 Assembler::kDebugBreakSlotInstructions);
44 EmitDebugBreakSlot(&patcher); 44 EmitDebugBreakSlot(&patcher);
45 } 45 }
46 46
47 47
48 void DebugCodegen::PatchDebugBreakSlot(Isolate* isolate, Address pc, 48 void DebugCodegen::PatchDebugBreakSlot(Isolate* isolate, Address pc,
49 Handle<Code> code) { 49 Handle<Code> code) {
50 DCHECK(code->is_debug_stub()); 50 DCHECK(code->is_debug_stub());
51 PatchingAssembler patcher(isolate, reinterpret_cast<Instruction*>(pc), 51 PatchingAssembler patcher(isolate, pc,
52 Assembler::kDebugBreakSlotInstructions); 52 Assembler::kDebugBreakSlotInstructions);
53 // Patch the code emitted by DebugCodegen::GenerateSlots, changing the debug 53 // Patch the code emitted by DebugCodegen::GenerateSlots, changing the debug
54 // break slot code from 54 // break slot code from
55 // mov x0, x0 @ nop DEBUG_BREAK_NOP 55 // mov x0, x0 @ nop DEBUG_BREAK_NOP
56 // mov x0, x0 @ nop DEBUG_BREAK_NOP 56 // mov x0, x0 @ nop DEBUG_BREAK_NOP
57 // mov x0, x0 @ nop DEBUG_BREAK_NOP 57 // mov x0, x0 @ nop DEBUG_BREAK_NOP
58 // mov x0, x0 @ nop DEBUG_BREAK_NOP 58 // mov x0, x0 @ nop DEBUG_BREAK_NOP
59 // mov x0, x0 @ nop DEBUG_BREAK_NOP 59 // mov x0, x0 @ nop DEBUG_BREAK_NOP
60 // to a call to the debug slot code. 60 // to a call to the debug slot code.
61 // ldr ip0, [pc, #(2 * kInstructionSize)] 61 // ldr ip0, [pc, #(2 * kInstructionSize)]
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 CheckDebugStepCallWrapper()); 158 CheckDebugStepCallWrapper());
159 } 159 }
160 160
161 161
162 const bool LiveEdit::kFrameDropperSupported = true; 162 const bool LiveEdit::kFrameDropperSupported = true;
163 163
164 } // namespace internal 164 } // namespace internal
165 } // namespace v8 165 } // namespace v8
166 166
167 #endif // V8_TARGET_ARCH_ARM64 167 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/debug/arm/debug-arm.cc ('k') | src/deoptimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698