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

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

Issue 265593004: Always initialize the debugger eagerly. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « src/liveedit.cc ('k') | src/serialize.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 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 5
6 6
7 #include "v8.h" 7 #include "v8.h"
8 8
9 #if V8_TARGET_ARCH_MIPS 9 #if V8_TARGET_ARCH_MIPS
10 10
(...skipping 15 matching lines...) Expand all
26 // lw ra, sp(4) 26 // lw ra, sp(4)
27 // addiu sp, sp, 8 27 // addiu sp, sp, 8
28 // addiu sp, sp, N 28 // addiu sp, sp, N
29 // jr ra 29 // jr ra
30 // nop (in branch delay slot) 30 // nop (in branch delay slot)
31 31
32 // Make sure this constant matches the number if instrucntions we emit. 32 // Make sure this constant matches the number if instrucntions we emit.
33 ASSERT(Assembler::kJSReturnSequenceInstructions == 7); 33 ASSERT(Assembler::kJSReturnSequenceInstructions == 7);
34 CodePatcher patcher(rinfo()->pc(), Assembler::kJSReturnSequenceInstructions); 34 CodePatcher patcher(rinfo()->pc(), Assembler::kJSReturnSequenceInstructions);
35 // li and Call pseudo-instructions emit two instructions each. 35 // li and Call pseudo-instructions emit two instructions each.
36 patcher.masm()->li(v8::internal::t9, 36 patcher.masm()->li(v8::internal::t9, Operand(reinterpret_cast<int32_t>(
37 Operand(reinterpret_cast<int32_t>( 37 debug_info_->GetIsolate()->builtins()->Return_DebugBreak()->entry())));
38 debug_info_->GetIsolate()->debug()->debug_break_return()->entry())));
39 patcher.masm()->Call(v8::internal::t9); 38 patcher.masm()->Call(v8::internal::t9);
40 patcher.masm()->nop(); 39 patcher.masm()->nop();
41 patcher.masm()->nop(); 40 patcher.masm()->nop();
42 patcher.masm()->nop(); 41 patcher.masm()->nop();
43 42
44 // TODO(mips): Open issue about using breakpoint instruction instead of nops. 43 // TODO(mips): Open issue about using breakpoint instruction instead of nops.
45 // patcher.masm()->bkpt(0); 44 // patcher.masm()->bkpt(0);
46 } 45 }
47 46
48 47
(...skipping 24 matching lines...) Expand all
73 // Patch the code changing the debug break slot code from: 72 // Patch the code changing the debug break slot code from:
74 // nop(DEBUG_BREAK_NOP) - nop(1) is sll(zero_reg, zero_reg, 1) 73 // nop(DEBUG_BREAK_NOP) - nop(1) is sll(zero_reg, zero_reg, 1)
75 // nop(DEBUG_BREAK_NOP) 74 // nop(DEBUG_BREAK_NOP)
76 // nop(DEBUG_BREAK_NOP) 75 // nop(DEBUG_BREAK_NOP)
77 // nop(DEBUG_BREAK_NOP) 76 // nop(DEBUG_BREAK_NOP)
78 // to a call to the debug break slot code. 77 // to a call to the debug break slot code.
79 // li t9, address (lui t9 / ori t9 instruction pair) 78 // li t9, address (lui t9 / ori t9 instruction pair)
80 // call t9 (jalr t9 / nop instruction pair) 79 // call t9 (jalr t9 / nop instruction pair)
81 CodePatcher patcher(rinfo()->pc(), Assembler::kDebugBreakSlotInstructions); 80 CodePatcher patcher(rinfo()->pc(), Assembler::kDebugBreakSlotInstructions);
82 patcher.masm()->li(v8::internal::t9, Operand(reinterpret_cast<int32_t>( 81 patcher.masm()->li(v8::internal::t9, Operand(reinterpret_cast<int32_t>(
83 debug_info_->GetIsolate()->debug()->debug_break_slot()->entry()))); 82 debug_info_->GetIsolate()->builtins()->Slot_DebugBreak()->entry())));
84 patcher.masm()->Call(v8::internal::t9); 83 patcher.masm()->Call(v8::internal::t9);
85 } 84 }
86 85
87 86
88 void BreakLocationIterator::ClearDebugBreakAtSlot() { 87 void BreakLocationIterator::ClearDebugBreakAtSlot() {
89 ASSERT(IsDebugBreakSlot()); 88 ASSERT(IsDebugBreakSlot());
90 rinfo()->PatchCode(original_rinfo()->pc(), 89 rinfo()->PatchCode(original_rinfo()->pc(),
91 Assembler::kDebugBreakSlotInstructions); 90 Assembler::kDebugBreakSlotInstructions);
92 } 91 }
93 92
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 } 309 }
311 310
312 311
313 const bool Debug::kFrameDropperSupported = false; 312 const bool Debug::kFrameDropperSupported = false;
314 313
315 #undef __ 314 #undef __
316 315
317 } } // namespace v8::internal 316 } } // namespace v8::internal
318 317
319 #endif // V8_TARGET_ARCH_MIPS 318 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/liveedit.cc ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698