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

Side by Side Diff: src/ia32/debug-ia32.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/heap.cc ('k') | src/isolate.h » ('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 #include "v8.h" 5 #include "v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "codegen.h" 9 #include "codegen.h"
10 #include "debug.h" 10 #include "debug.h"
11 11
12 12
13 namespace v8 { 13 namespace v8 {
14 namespace internal { 14 namespace internal {
15 15
16 bool BreakLocationIterator::IsDebugBreakAtReturn() { 16 bool BreakLocationIterator::IsDebugBreakAtReturn() {
17 return Debug::IsDebugBreakAtReturn(rinfo()); 17 return Debug::IsDebugBreakAtReturn(rinfo());
18 } 18 }
19 19
20 20
21 // Patch the JS frame exit code with a debug break call. See 21 // Patch the JS frame exit code with a debug break call. See
22 // CodeGenerator::VisitReturnStatement and VirtualFrame::Exit in codegen-ia32.cc 22 // CodeGenerator::VisitReturnStatement and VirtualFrame::Exit in codegen-ia32.cc
23 // for the precise return instructions sequence. 23 // for the precise return instructions sequence.
24 void BreakLocationIterator::SetDebugBreakAtReturn() { 24 void BreakLocationIterator::SetDebugBreakAtReturn() {
25 ASSERT(Assembler::kJSReturnSequenceLength >= 25 ASSERT(Assembler::kJSReturnSequenceLength >=
26 Assembler::kCallInstructionLength); 26 Assembler::kCallInstructionLength);
27 rinfo()->PatchCodeWithCall( 27 rinfo()->PatchCodeWithCall(
28 debug_info_->GetIsolate()->debug()->debug_break_return()->entry(), 28 debug_info_->GetIsolate()->builtins()->Return_DebugBreak()->entry(),
29 Assembler::kJSReturnSequenceLength - Assembler::kCallInstructionLength); 29 Assembler::kJSReturnSequenceLength - Assembler::kCallInstructionLength);
30 } 30 }
31 31
32 32
33 // Restore the JS frame exit code. 33 // Restore the JS frame exit code.
34 void BreakLocationIterator::ClearDebugBreakAtReturn() { 34 void BreakLocationIterator::ClearDebugBreakAtReturn() {
35 rinfo()->PatchCode(original_rinfo()->pc(), 35 rinfo()->PatchCode(original_rinfo()->pc(),
36 Assembler::kJSReturnSequenceLength); 36 Assembler::kJSReturnSequenceLength);
37 } 37 }
38 38
(...skipping 10 matching lines...) Expand all
49 ASSERT(IsDebugBreakSlot()); 49 ASSERT(IsDebugBreakSlot());
50 // Check whether the debug break slot instructions have been patched. 50 // Check whether the debug break slot instructions have been patched.
51 return rinfo()->IsPatchedDebugBreakSlotSequence(); 51 return rinfo()->IsPatchedDebugBreakSlotSequence();
52 } 52 }
53 53
54 54
55 void BreakLocationIterator::SetDebugBreakAtSlot() { 55 void BreakLocationIterator::SetDebugBreakAtSlot() {
56 ASSERT(IsDebugBreakSlot()); 56 ASSERT(IsDebugBreakSlot());
57 Isolate* isolate = debug_info_->GetIsolate(); 57 Isolate* isolate = debug_info_->GetIsolate();
58 rinfo()->PatchCodeWithCall( 58 rinfo()->PatchCodeWithCall(
59 isolate->debug()->debug_break_slot()->entry(), 59 isolate->builtins()->Slot_DebugBreak()->entry(),
60 Assembler::kDebugBreakSlotLength - Assembler::kCallInstructionLength); 60 Assembler::kDebugBreakSlotLength - Assembler::kCallInstructionLength);
61 } 61 }
62 62
63 63
64 void BreakLocationIterator::ClearDebugBreakAtSlot() { 64 void BreakLocationIterator::ClearDebugBreakAtSlot() {
65 ASSERT(IsDebugBreakSlot()); 65 ASSERT(IsDebugBreakSlot());
66 rinfo()->PatchCode(original_rinfo()->pc(), Assembler::kDebugBreakSlotLength); 66 rinfo()->PatchCode(original_rinfo()->pc(), Assembler::kDebugBreakSlotLength);
67 } 67 }
68 68
69 69
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 __ jmp(edx); 330 __ jmp(edx);
331 } 331 }
332 332
333 const bool Debug::kFrameDropperSupported = true; 333 const bool Debug::kFrameDropperSupported = true;
334 334
335 #undef __ 335 #undef __
336 336
337 } } // namespace v8::internal 337 } } // namespace v8::internal
338 338
339 #endif // V8_TARGET_ARCH_IA32 339 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698