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/x64/debug-x64.cc

Issue 9297019: Fix and adapt debugger for new call target caches. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Yang Guo. Created 8 years, 11 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/objects-inl.h ('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 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 222
223 void Debug::GenerateCallICDebugBreak(MacroAssembler* masm) { 223 void Debug::GenerateCallICDebugBreak(MacroAssembler* masm) {
224 // Register state for IC call call (from ic-x64.cc) 224 // Register state for IC call call (from ic-x64.cc)
225 // ----------- S t a t e ------------- 225 // ----------- S t a t e -------------
226 // -- rcx: function name 226 // -- rcx: function name
227 // ----------------------------------- 227 // -----------------------------------
228 Generate_DebugBreakCallHelper(masm, rcx.bit(), 0, false); 228 Generate_DebugBreakCallHelper(masm, rcx.bit(), 0, false);
229 } 229 }
230 230
231 231
232 void Debug::GenerateConstructCallDebugBreak(MacroAssembler* masm) {
233 // Register state just before return from JS function (from codegen-x64.cc).
234 // rax is the actual number of arguments not encoded as a smi, see comment
235 // above IC call.
236 // ----------- S t a t e -------------
237 // -- rax: number of arguments
238 // -- rbx: cache cell for call target
239 // -----------------------------------
240 // The number of arguments in rax is not smi encoded.
241 Generate_DebugBreakCallHelper(masm, rbx.bit() | rdi.bit(), rax.bit(), false);
242 }
243
244
245 void Debug::GenerateReturnDebugBreak(MacroAssembler* masm) { 232 void Debug::GenerateReturnDebugBreak(MacroAssembler* masm) {
246 // Register state just before return from JS function (from codegen-x64.cc). 233 // Register state just before return from JS function (from codegen-x64.cc).
247 // ----------- S t a t e ------------- 234 // ----------- S t a t e -------------
248 // -- rax: return value 235 // -- rax: return value
249 // ----------------------------------- 236 // -----------------------------------
250 Generate_DebugBreakCallHelper(masm, rax.bit(), 0, true); 237 Generate_DebugBreakCallHelper(masm, rax.bit(), 0, true);
251 } 238 }
252 239
253 240
254 void Debug::GenerateCallFunctionStubDebugBreak(MacroAssembler* masm) { 241 void Debug::GenerateCallFunctionStubDebugBreak(MacroAssembler* masm) {
255 // Register state for CallFunctionStub (from code-stubs-x64.cc). 242 // Register state for CallFunctionStub (from code-stubs-x64.cc).
256 // ----------- S t a t e ------------- 243 // ----------- S t a t e -------------
257 // -- rdi : function 244 // -- rdi : function
258 // ----------------------------------- 245 // -----------------------------------
259 Generate_DebugBreakCallHelper(masm, rdi.bit(), 0, false); 246 Generate_DebugBreakCallHelper(masm, rdi.bit(), 0, false);
260 } 247 }
261 248
262 249
250 void Debug::GenerateCallFunctionStubRecordDebugBreak(MacroAssembler* masm) {
251 // Register state for CallFunctionStub (from code-stubs-x64.cc).
252 // ----------- S t a t e -------------
253 // -- rdi : function
254 // -- rbx: cache cell for call target
255 // -----------------------------------
256 Generate_DebugBreakCallHelper(masm, rbx.bit() | rdi.bit(), 0, false);
257 }
258
259
260 void Debug::GenerateCallConstructStubDebugBreak(MacroAssembler* masm) {
261 // Register state for CallConstructStub (from code-stubs-x64.cc).
262 // rax is the actual number of arguments not encoded as a smi, see comment
263 // above IC call.
264 // ----------- S t a t e -------------
265 // -- rax: number of arguments
266 // -----------------------------------
267 // The number of arguments in rax is not smi encoded.
268 Generate_DebugBreakCallHelper(masm, rdi.bit(), rax.bit(), false);
269 }
270
271
272 void Debug::GenerateCallConstructStubRecordDebugBreak(MacroAssembler* masm) {
273 // Register state for CallConstructStub (from code-stubs-x64.cc).
274 // rax is the actual number of arguments not encoded as a smi, see comment
275 // above IC call.
276 // ----------- S t a t e -------------
277 // -- rax: number of arguments
278 // -- rbx: cache cell for call target
279 // -----------------------------------
280 // The number of arguments in rax is not smi encoded.
281 Generate_DebugBreakCallHelper(masm, rbx.bit() | rdi.bit(), rax.bit(), false);
282 }
283
284
263 void Debug::GenerateSlot(MacroAssembler* masm) { 285 void Debug::GenerateSlot(MacroAssembler* masm) {
264 // Generate enough nop's to make space for a call instruction. 286 // Generate enough nop's to make space for a call instruction.
265 Label check_codesize; 287 Label check_codesize;
266 __ bind(&check_codesize); 288 __ bind(&check_codesize);
267 __ RecordDebugBreakSlot(); 289 __ RecordDebugBreakSlot();
268 __ Nop(Assembler::kDebugBreakSlotLength); 290 __ Nop(Assembler::kDebugBreakSlotLength);
269 ASSERT_EQ(Assembler::kDebugBreakSlotLength, 291 ASSERT_EQ(Assembler::kDebugBreakSlotLength,
270 masm->SizeOfCodeGeneratedSince(&check_codesize)); 292 masm->SizeOfCodeGeneratedSince(&check_codesize));
271 } 293 }
272 294
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 332
311 const bool Debug::kFrameDropperSupported = true; 333 const bool Debug::kFrameDropperSupported = true;
312 334
313 #undef __ 335 #undef __
314 336
315 #endif // ENABLE_DEBUGGER_SUPPORT 337 #endif // ENABLE_DEBUGGER_SUPPORT
316 338
317 } } // namespace v8::internal 339 } } // namespace v8::internal
318 340
319 #endif // V8_TARGET_ARCH_X64 341 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698