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

Side by Side Diff: src/x64/code-stubs-x64.cc

Issue 3141047: Cleanup the way the debugger stores live registers when entering at a break... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 3 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/serialize.cc ('k') | src/x64/debug-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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 2458 matching lines...) Expand 10 before | Expand all | Expand 10 after
2469 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); 2469 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset));
2470 __ bind(&skip); 2470 __ bind(&skip);
2471 __ ret(0); 2471 __ ret(0);
2472 } 2472 }
2473 2473
2474 2474
2475 void ApiGetterEntryStub::Generate(MacroAssembler* masm) { 2475 void ApiGetterEntryStub::Generate(MacroAssembler* masm) {
2476 Label empty_result; 2476 Label empty_result;
2477 Label prologue; 2477 Label prologue;
2478 Label promote_scheduled_exception; 2478 Label promote_scheduled_exception;
2479 __ EnterApiExitFrame(ExitFrame::MODE_NORMAL, kStackSpace, 0); 2479 __ EnterApiExitFrame(kStackSpace, 0);
2480 ASSERT_EQ(kArgc, 4); 2480 ASSERT_EQ(kArgc, 4);
2481 #ifdef _WIN64 2481 #ifdef _WIN64
2482 // All the parameters should be set up by a caller. 2482 // All the parameters should be set up by a caller.
2483 #else 2483 #else
2484 // Set 1st parameter register with property name. 2484 // Set 1st parameter register with property name.
2485 __ movq(rsi, rdx); 2485 __ movq(rsi, rdx);
2486 // Second parameter register rdi should be set with pointer to AccessorInfo 2486 // Second parameter register rdi should be set with pointer to AccessorInfo
2487 // by a caller. 2487 // by a caller.
2488 #endif 2488 #endif
2489 // Call the api function! 2489 // Call the api function!
(...skipping 10 matching lines...) Expand all
2500 #ifdef _WIN64 2500 #ifdef _WIN64
2501 // rax keeps a pointer to v8::Handle, unpack it. 2501 // rax keeps a pointer to v8::Handle, unpack it.
2502 __ movq(rax, Operand(rax, 0)); 2502 __ movq(rax, Operand(rax, 0));
2503 #endif 2503 #endif
2504 // Check if the result handle holds 0. 2504 // Check if the result handle holds 0.
2505 __ testq(rax, rax); 2505 __ testq(rax, rax);
2506 __ j(zero, &empty_result); 2506 __ j(zero, &empty_result);
2507 // It was non-zero. Dereference to get the result value. 2507 // It was non-zero. Dereference to get the result value.
2508 __ movq(rax, Operand(rax, 0)); 2508 __ movq(rax, Operand(rax, 0));
2509 __ bind(&prologue); 2509 __ bind(&prologue);
2510 __ LeaveExitFrame(ExitFrame::MODE_NORMAL); 2510 __ LeaveExitFrame();
2511 __ ret(0); 2511 __ ret(0);
2512 __ bind(&promote_scheduled_exception); 2512 __ bind(&promote_scheduled_exception);
2513 __ TailCallRuntime(Runtime::kPromoteScheduledException, 0, 1); 2513 __ TailCallRuntime(Runtime::kPromoteScheduledException, 0, 1);
2514 __ bind(&empty_result); 2514 __ bind(&empty_result);
2515 // It was zero; the result is undefined. 2515 // It was zero; the result is undefined.
2516 __ Move(rax, Factory::undefined_value()); 2516 __ Move(rax, Factory::undefined_value());
2517 __ jmp(&prologue); 2517 __ jmp(&prologue);
2518 } 2518 }
2519 2519
2520 2520
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
2610 __ movq(rax, Operand(rsp, 6 * kPointerSize)); 2610 __ movq(rax, Operand(rsp, 6 * kPointerSize));
2611 __ movq(rdx, Operand(rsp, 7 * kPointerSize)); 2611 __ movq(rdx, Operand(rsp, 7 * kPointerSize));
2612 } 2612 }
2613 #endif 2613 #endif
2614 __ lea(rcx, Operand(rax, 1)); 2614 __ lea(rcx, Operand(rax, 1));
2615 // Lower 2 bits of rcx are 0 iff rax has failure tag. 2615 // Lower 2 bits of rcx are 0 iff rax has failure tag.
2616 __ testl(rcx, Immediate(kFailureTagMask)); 2616 __ testl(rcx, Immediate(kFailureTagMask));
2617 __ j(zero, &failure_returned); 2617 __ j(zero, &failure_returned);
2618 2618
2619 // Exit the JavaScript to C++ exit frame. 2619 // Exit the JavaScript to C++ exit frame.
2620 __ LeaveExitFrame(mode_, result_size_); 2620 __ LeaveExitFrame(result_size_);
2621 __ ret(0); 2621 __ ret(0);
2622 2622
2623 // Handling of failure. 2623 // Handling of failure.
2624 __ bind(&failure_returned); 2624 __ bind(&failure_returned);
2625 2625
2626 Label retry; 2626 Label retry;
2627 // If the returned exception is RETRY_AFTER_GC continue at retry label 2627 // If the returned exception is RETRY_AFTER_GC continue at retry label
2628 STATIC_ASSERT(Failure::RETRY_AFTER_GC == 0); 2628 STATIC_ASSERT(Failure::RETRY_AFTER_GC == 0);
2629 __ testl(rax, Immediate(((1 << kFailureTypeTagSize) - 1) << kFailureTagSize)); 2629 __ testl(rax, Immediate(((1 << kFailureTypeTagSize) - 1) << kFailureTagSize));
2630 __ j(zero, &retry); 2630 __ j(zero, &retry);
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
2714 // rbp: frame pointer of calling JS frame (restored after C call) 2714 // rbp: frame pointer of calling JS frame (restored after C call)
2715 // rsp: stack pointer (restored after C call) 2715 // rsp: stack pointer (restored after C call)
2716 // rsi: current context (restored) 2716 // rsi: current context (restored)
2717 2717
2718 // NOTE: Invocations of builtins may return failure objects 2718 // NOTE: Invocations of builtins may return failure objects
2719 // instead of a proper result. The builtin entry handles 2719 // instead of a proper result. The builtin entry handles
2720 // this by performing a garbage collection and retrying the 2720 // this by performing a garbage collection and retrying the
2721 // builtin once. 2721 // builtin once.
2722 2722
2723 // Enter the exit frame that transitions from JavaScript to C++. 2723 // Enter the exit frame that transitions from JavaScript to C++.
2724 __ EnterExitFrame(mode_, result_size_); 2724 __ EnterExitFrame(result_size_);
2725 2725
2726 // rax: Holds the context at this point, but should not be used. 2726 // rax: Holds the context at this point, but should not be used.
2727 // On entry to code generated by GenerateCore, it must hold 2727 // On entry to code generated by GenerateCore, it must hold
2728 // a failure result if the collect_garbage argument to GenerateCore 2728 // a failure result if the collect_garbage argument to GenerateCore
2729 // is true. This failure result can be the result of code 2729 // is true. This failure result can be the result of code
2730 // generated by a previous call to GenerateCore. The value 2730 // generated by a previous call to GenerateCore. The value
2731 // of rax is then passed to Runtime::PerformGC. 2731 // of rax is then passed to Runtime::PerformGC.
2732 // rbx: pointer to builtin function (C callee-saved). 2732 // rbx: pointer to builtin function (C callee-saved).
2733 // rbp: frame pointer of exit frame (restored after C call). 2733 // rbp: frame pointer of exit frame (restored after C call).
2734 // rsp: stack pointer (restored after C call). 2734 // rsp: stack pointer (restored after C call).
(...skipping 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after
4007 // tagged as a small integer. 4007 // tagged as a small integer.
4008 __ bind(&runtime); 4008 __ bind(&runtime);
4009 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); 4009 __ TailCallRuntime(Runtime::kStringCompare, 2, 1);
4010 } 4010 }
4011 4011
4012 #undef __ 4012 #undef __
4013 4013
4014 } } // namespace v8::internal 4014 } } // namespace v8::internal
4015 4015
4016 #endif // V8_TARGET_ARCH_X64 4016 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/serialize.cc ('k') | src/x64/debug-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698