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

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

Issue 10387116: Fix issue 825 (LiveEdit vs. function with no locals) for x64. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: follow codereview Created 8 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/ia32/debug-ia32.cc ('k') | no next file » | 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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 Isolate::Current()->debug()->debug_break_slot()->entry(), 84 Isolate::Current()->debug()->debug_break_slot()->entry(),
85 Assembler::kDebugBreakSlotLength - Assembler::kCallInstructionLength); 85 Assembler::kDebugBreakSlotLength - Assembler::kCallInstructionLength);
86 } 86 }
87 87
88 88
89 void BreakLocationIterator::ClearDebugBreakAtSlot() { 89 void BreakLocationIterator::ClearDebugBreakAtSlot() {
90 ASSERT(IsDebugBreakSlot()); 90 ASSERT(IsDebugBreakSlot());
91 rinfo()->PatchCode(original_rinfo()->pc(), Assembler::kDebugBreakSlotLength); 91 rinfo()->PatchCode(original_rinfo()->pc(), Assembler::kDebugBreakSlotLength);
92 } 92 }
93 93
94 const bool Debug::FramePaddingLayout::kIsSupported = false; 94 const bool Debug::FramePaddingLayout::kIsSupported = true;
95 95
96 96
97 #define __ ACCESS_MASM(masm) 97 #define __ ACCESS_MASM(masm)
98 98
99 99
100 static void Generate_DebugBreakCallHelper(MacroAssembler* masm, 100 static void Generate_DebugBreakCallHelper(MacroAssembler* masm,
101 RegList object_regs, 101 RegList object_regs,
102 RegList non_object_regs, 102 RegList non_object_regs,
103 bool convert_call_to_jmp) { 103 bool convert_call_to_jmp) {
104 // Enter an internal frame. 104 // Enter an internal frame.
105 { 105 {
106 FrameScope scope(masm, StackFrame::INTERNAL); 106 FrameScope scope(masm, StackFrame::INTERNAL);
107 107
108 // Load padding words on stack.
109 for (int i = 0; i < Debug::FramePaddingLayout::kInitialSize; i++) {
110 __ Push(Smi::FromInt(Debug::FramePaddingLayout::kPaddingValue));
111 }
112 __ Push(Smi::FromInt(Debug::FramePaddingLayout::kInitialSize));
113
108 // Store the registers containing live values on the expression stack to 114 // Store the registers containing live values on the expression stack to
109 // make sure that these are correctly updated during GC. Non object values 115 // make sure that these are correctly updated during GC. Non object values
110 // are stored as as two smis causing it to be untouched by GC. 116 // are stored as as two smis causing it to be untouched by GC.
111 ASSERT((object_regs & ~kJSCallerSaved) == 0); 117 ASSERT((object_regs & ~kJSCallerSaved) == 0);
112 ASSERT((non_object_regs & ~kJSCallerSaved) == 0); 118 ASSERT((non_object_regs & ~kJSCallerSaved) == 0);
113 ASSERT((object_regs & non_object_regs) == 0); 119 ASSERT((object_regs & non_object_regs) == 0);
114 for (int i = 0; i < kNumJSCallerSaved; i++) { 120 for (int i = 0; i < kNumJSCallerSaved; i++) {
115 int r = JSCallerSavedCode(i); 121 int r = JSCallerSavedCode(i);
116 Register reg = { r }; 122 Register reg = { r };
117 ASSERT(!reg.is(kScratchRegister)); 123 ASSERT(!reg.is(kScratchRegister));
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 if ((non_object_regs & (1 << r)) != 0) { 158 if ((non_object_regs & (1 << r)) != 0) {
153 __ pop(kScratchRegister); 159 __ pop(kScratchRegister);
154 __ SmiToInteger32(kScratchRegister, kScratchRegister); 160 __ SmiToInteger32(kScratchRegister, kScratchRegister);
155 __ shl(kScratchRegister, Immediate(32)); 161 __ shl(kScratchRegister, Immediate(32));
156 __ pop(reg); 162 __ pop(reg);
157 __ SmiToInteger32(reg, reg); 163 __ SmiToInteger32(reg, reg);
158 __ or_(reg, kScratchRegister); 164 __ or_(reg, kScratchRegister);
159 } 165 }
160 } 166 }
161 167
168 // Read current padding counter and skip corresponding number of words.
169 __ pop(kScratchRegister);
170 __ SmiToInteger32(kScratchRegister, kScratchRegister);
171 __ lea(rsp, Operand(rsp, kScratchRegister, times_pointer_size, 0));
172
162 // Get rid of the internal frame. 173 // Get rid of the internal frame.
163 } 174 }
164 175
165 // If this call did not replace a call but patched other code then there will 176 // If this call did not replace a call but patched other code then there will
166 // be an unwanted return address left on the stack. Here we get rid of that. 177 // be an unwanted return address left on the stack. Here we get rid of that.
167 if (convert_call_to_jmp) { 178 if (convert_call_to_jmp) {
168 __ addq(rsp, Immediate(kPointerSize)); 179 __ addq(rsp, Immediate(kPointerSize));
169 } 180 }
170 181
171 // Now that the break point has been handled, resume normal execution by 182 // Now that the break point has been handled, resume normal execution by
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 345
335 const bool Debug::kFrameDropperSupported = true; 346 const bool Debug::kFrameDropperSupported = true;
336 347
337 #undef __ 348 #undef __
338 349
339 #endif // ENABLE_DEBUGGER_SUPPORT 350 #endif // ENABLE_DEBUGGER_SUPPORT
340 351
341 } } // namespace v8::internal 352 } } // namespace v8::internal
342 353
343 #endif // V8_TARGET_ARCH_X64 354 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/debug-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698