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

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

Issue 7891042: Add asserts to ensure that we: (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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/x64/debug-x64.cc ('k') | src/x64/full-codegen-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 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 __ movq(Operand(rsp, 4 * kPointerSize), arg5); 706 __ movq(Operand(rsp, 4 * kPointerSize), arg5);
707 __ LoadAddress(arg5, ExternalReference::isolate_address()); 707 __ LoadAddress(arg5, ExternalReference::isolate_address());
708 __ movq(Operand(rsp, 5 * kPointerSize), arg5); 708 __ movq(Operand(rsp, 5 * kPointerSize), arg5);
709 #else 709 #else
710 __ movq(r8, arg5); 710 __ movq(r8, arg5);
711 __ LoadAddress(r9, ExternalReference::isolate_address()); 711 __ LoadAddress(r9, ExternalReference::isolate_address());
712 #endif 712 #endif
713 713
714 Isolate* isolate = masm()->isolate(); 714 Isolate* isolate = masm()->isolate();
715 715
716 __ CallCFunction(ExternalReference::new_deoptimizer_function(isolate), 6); 716 {
717 AllowExternalCallThatCantCauseGC scope(masm());
718 __ CallCFunction(ExternalReference::new_deoptimizer_function(isolate), 6);
719 }
717 // Preserve deoptimizer object in register rax and get the input 720 // Preserve deoptimizer object in register rax and get the input
718 // frame descriptor pointer. 721 // frame descriptor pointer.
719 __ movq(rbx, Operand(rax, Deoptimizer::input_offset())); 722 __ movq(rbx, Operand(rax, Deoptimizer::input_offset()));
720 723
721 // Fill in the input registers. 724 // Fill in the input registers.
722 for (int i = kNumberOfRegisters -1; i >= 0; i--) { 725 for (int i = kNumberOfRegisters -1; i >= 0; i--) {
723 int offset = (i * kPointerSize) + FrameDescription::registers_offset(); 726 int offset = (i * kPointerSize) + FrameDescription::registers_offset();
724 __ pop(Operand(rbx, offset)); 727 __ pop(Operand(rbx, offset));
725 } 728 }
726 729
(...skipping 25 matching lines...) Expand all
752 __ pop(Operand(rdx, 0)); 755 __ pop(Operand(rdx, 0));
753 __ addq(rdx, Immediate(sizeof(intptr_t))); 756 __ addq(rdx, Immediate(sizeof(intptr_t)));
754 __ cmpq(rcx, rsp); 757 __ cmpq(rcx, rsp);
755 __ j(not_equal, &pop_loop); 758 __ j(not_equal, &pop_loop);
756 759
757 // Compute the output frame in the deoptimizer. 760 // Compute the output frame in the deoptimizer.
758 __ push(rax); 761 __ push(rax);
759 __ PrepareCallCFunction(2); 762 __ PrepareCallCFunction(2);
760 __ movq(arg1, rax); 763 __ movq(arg1, rax);
761 __ LoadAddress(arg2, ExternalReference::isolate_address()); 764 __ LoadAddress(arg2, ExternalReference::isolate_address());
762 __ CallCFunction( 765 {
763 ExternalReference::compute_output_frames_function(isolate), 2); 766 AllowExternalCallThatCantCauseGC scope(masm());
767 __ CallCFunction(
768 ExternalReference::compute_output_frames_function(isolate), 2);
769 }
764 __ pop(rax); 770 __ pop(rax);
765 771
766 // Replace the current frame with the output frames. 772 // Replace the current frame with the output frames.
767 Label outer_push_loop, inner_push_loop; 773 Label outer_push_loop, inner_push_loop;
768 // Outer loop state: rax = current FrameDescription**, rdx = one past the 774 // Outer loop state: rax = current FrameDescription**, rdx = one past the
769 // last FrameDescription**. 775 // last FrameDescription**.
770 __ movl(rdx, Operand(rax, Deoptimizer::output_count_offset())); 776 __ movl(rdx, Operand(rax, Deoptimizer::output_count_offset()));
771 __ movq(rax, Operand(rax, Deoptimizer::output_offset())); 777 __ movq(rax, Operand(rax, Deoptimizer::output_offset()));
772 __ lea(rdx, Operand(rax, rdx, times_8, 0)); 778 __ lea(rdx, Operand(rax, rdx, times_8, 0));
773 __ bind(&outer_push_loop); 779 __ bind(&outer_push_loop);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 } 844 }
839 __ bind(&done); 845 __ bind(&done);
840 } 846 }
841 847
842 #undef __ 848 #undef __
843 849
844 850
845 } } // namespace v8::internal 851 } } // namespace v8::internal
846 852
847 #endif // V8_TARGET_ARCH_X64 853 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/debug-x64.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698