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

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

Issue 6713074: Require an isolate parameter for most external reference creation to (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Further cleanup Created 9 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 | Annotate | Revision Log
« no previous file with comments | « src/x64/codegen-x64.cc ('k') | src/x64/deoptimizer-x64.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 __ sar(kScratchRegister, Immediate(32)); 122 __ sar(kScratchRegister, Immediate(32));
123 __ Integer32ToSmi(kScratchRegister, kScratchRegister); 123 __ Integer32ToSmi(kScratchRegister, kScratchRegister);
124 __ push(kScratchRegister); 124 __ push(kScratchRegister);
125 } 125 }
126 } 126 }
127 127
128 #ifdef DEBUG 128 #ifdef DEBUG
129 __ RecordComment("// Calling from debug break to runtime - come in - over"); 129 __ RecordComment("// Calling from debug break to runtime - come in - over");
130 #endif 130 #endif
131 __ Set(rax, 0); // No arguments (argc == 0). 131 __ Set(rax, 0); // No arguments (argc == 0).
132 __ movq(rbx, ExternalReference::debug_break()); 132 __ movq(rbx, ExternalReference::debug_break(masm->isolate()));
133 133
134 CEntryStub ceb(1); 134 CEntryStub ceb(1);
135 __ CallStub(&ceb); 135 __ CallStub(&ceb);
136 136
137 // Restore the register values from the expression stack. 137 // Restore the register values from the expression stack.
138 for (int i = kNumJSCallerSaved - 1; i >= 0; i--) { 138 for (int i = kNumJSCallerSaved - 1; i >= 0; i--) {
139 int r = JSCallerSavedCode(i); 139 int r = JSCallerSavedCode(i);
140 Register reg = { r }; 140 Register reg = { r };
141 if (FLAG_debug_code) { 141 if (FLAG_debug_code) {
142 __ Set(reg, kDebugZapValue); 142 __ Set(reg, kDebugZapValue);
(...skipping 18 matching lines...) Expand all
161 // If this call did not replace a call but patched other code then there will 161 // If this call did not replace a call but patched other code then there will
162 // be an unwanted return address left on the stack. Here we get rid of that. 162 // be an unwanted return address left on the stack. Here we get rid of that.
163 if (convert_call_to_jmp) { 163 if (convert_call_to_jmp) {
164 __ addq(rsp, Immediate(kPointerSize)); 164 __ addq(rsp, Immediate(kPointerSize));
165 } 165 }
166 166
167 // Now that the break point has been handled, resume normal execution by 167 // Now that the break point has been handled, resume normal execution by
168 // jumping to the target address intended by the caller and that was 168 // jumping to the target address intended by the caller and that was
169 // overwritten by the address of DebugBreakXXX. 169 // overwritten by the address of DebugBreakXXX.
170 ExternalReference after_break_target = 170 ExternalReference after_break_target =
171 ExternalReference(Debug_Address::AfterBreakTarget()); 171 ExternalReference(Debug_Address::AfterBreakTarget(), masm->isolate());
172 __ movq(kScratchRegister, after_break_target); 172 __ movq(kScratchRegister, after_break_target);
173 __ jmp(Operand(kScratchRegister, 0)); 173 __ jmp(Operand(kScratchRegister, 0));
174 } 174 }
175 175
176 176
177 void Debug::GenerateLoadICDebugBreak(MacroAssembler* masm) { 177 void Debug::GenerateLoadICDebugBreak(MacroAssembler* masm) {
178 // Register state for IC load call (from ic-x64.cc). 178 // Register state for IC load call (from ic-x64.cc).
179 // ----------- S t a t e ------------- 179 // ----------- S t a t e -------------
180 // -- rax : receiver 180 // -- rax : receiver
181 // -- rcx : name 181 // -- rcx : name
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 } 277 }
278 278
279 279
280 void Debug::GeneratePlainReturnLiveEdit(MacroAssembler* masm) { 280 void Debug::GeneratePlainReturnLiveEdit(MacroAssembler* masm) {
281 masm->ret(0); 281 masm->ret(0);
282 } 282 }
283 283
284 284
285 void Debug::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { 285 void Debug::GenerateFrameDropperLiveEdit(MacroAssembler* masm) {
286 ExternalReference restarter_frame_function_slot = 286 ExternalReference restarter_frame_function_slot =
287 ExternalReference(Debug_Address::RestarterFrameFunctionPointer()); 287 ExternalReference(Debug_Address::RestarterFrameFunctionPointer(),
288 masm->isolate());
288 __ movq(rax, restarter_frame_function_slot); 289 __ movq(rax, restarter_frame_function_slot);
289 __ movq(Operand(rax, 0), Immediate(0)); 290 __ movq(Operand(rax, 0), Immediate(0));
290 291
291 // We do not know our frame height, but set rsp based on rbp. 292 // We do not know our frame height, but set rsp based on rbp.
292 __ lea(rsp, Operand(rbp, -1 * kPointerSize)); 293 __ lea(rsp, Operand(rbp, -1 * kPointerSize));
293 294
294 __ pop(rdi); // Function. 295 __ pop(rdi); // Function.
295 __ pop(rbp); 296 __ pop(rbp);
296 297
297 // Load context from the function. 298 // Load context from the function.
(...skipping 10 matching lines...) Expand all
308 309
309 const bool Debug::kFrameDropperSupported = true; 310 const bool Debug::kFrameDropperSupported = true;
310 311
311 #undef __ 312 #undef __
312 313
313 #endif // ENABLE_DEBUGGER_SUPPORT 314 #endif // ENABLE_DEBUGGER_SUPPORT
314 315
315 } } // namespace v8::internal 316 } } // namespace v8::internal
316 317
317 #endif // V8_TARGET_ARCH_X64 318 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/codegen-x64.cc ('k') | src/x64/deoptimizer-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698