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

Issue 7084032: Add asserts and state tracking to ensure that we do not call (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 6 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 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 __ movq(Operand(rsp, 4 * kPointerSize), arg5); 674 __ movq(Operand(rsp, 4 * kPointerSize), arg5);
675 __ LoadAddress(arg5, ExternalReference::isolate_address()); 675 __ LoadAddress(arg5, ExternalReference::isolate_address());
676 __ movq(Operand(rsp, 5 * kPointerSize), arg5); 676 __ movq(Operand(rsp, 5 * kPointerSize), arg5);
677 #else 677 #else
678 __ movq(r8, arg5); 678 __ movq(r8, arg5);
679 __ LoadAddress(r9, ExternalReference::isolate_address()); 679 __ LoadAddress(r9, ExternalReference::isolate_address());
680 #endif 680 #endif
681 681
682 Isolate* isolate = masm()->isolate(); 682 Isolate* isolate = masm()->isolate();
683 683
684 __ CallCFunction(ExternalReference::new_deoptimizer_function(isolate), 6); 684 {
685 AllowExternalCallThatCantCauseGC scope(masm());
686 __ CallCFunction(ExternalReference::new_deoptimizer_function(isolate), 6);
687 }
685 // Preserve deoptimizer object in register rax and get the input 688 // Preserve deoptimizer object in register rax and get the input
686 // frame descriptor pointer. 689 // frame descriptor pointer.
687 __ movq(rbx, Operand(rax, Deoptimizer::input_offset())); 690 __ movq(rbx, Operand(rax, Deoptimizer::input_offset()));
688 691
689 // Fill in the input registers. 692 // Fill in the input registers.
690 for (int i = kNumberOfRegisters -1; i >= 0; i--) { 693 for (int i = kNumberOfRegisters -1; i >= 0; i--) {
691 int offset = (i * kPointerSize) + FrameDescription::registers_offset(); 694 int offset = (i * kPointerSize) + FrameDescription::registers_offset();
692 __ pop(Operand(rbx, offset)); 695 __ pop(Operand(rbx, offset));
693 } 696 }
694 697
(...skipping 25 matching lines...) Expand all
720 __ pop(Operand(rdx, 0)); 723 __ pop(Operand(rdx, 0));
721 __ addq(rdx, Immediate(sizeof(intptr_t))); 724 __ addq(rdx, Immediate(sizeof(intptr_t)));
722 __ cmpq(rcx, rsp); 725 __ cmpq(rcx, rsp);
723 __ j(not_equal, &pop_loop); 726 __ j(not_equal, &pop_loop);
724 727
725 // Compute the output frame in the deoptimizer. 728 // Compute the output frame in the deoptimizer.
726 __ push(rax); 729 __ push(rax);
727 __ PrepareCallCFunction(2); 730 __ PrepareCallCFunction(2);
728 __ movq(arg1, rax); 731 __ movq(arg1, rax);
729 __ LoadAddress(arg2, ExternalReference::isolate_address()); 732 __ LoadAddress(arg2, ExternalReference::isolate_address());
730 __ CallCFunction( 733 {
731 ExternalReference::compute_output_frames_function(isolate), 2); 734 AllowExternalCallThatCantCauseGC scope(masm());
735 __ CallCFunction(
736 ExternalReference::compute_output_frames_function(isolate), 2);
737 }
732 __ pop(rax); 738 __ pop(rax);
733 739
734 // Replace the current frame with the output frames. 740 // Replace the current frame with the output frames.
735 Label outer_push_loop, inner_push_loop; 741 Label outer_push_loop, inner_push_loop;
736 // Outer loop state: rax = current FrameDescription**, rdx = one past the 742 // Outer loop state: rax = current FrameDescription**, rdx = one past the
737 // last FrameDescription**. 743 // last FrameDescription**.
738 __ movl(rdx, Operand(rax, Deoptimizer::output_count_offset())); 744 __ movl(rdx, Operand(rax, Deoptimizer::output_count_offset()));
739 __ movq(rax, Operand(rax, Deoptimizer::output_offset())); 745 __ movq(rax, Operand(rax, Deoptimizer::output_offset()));
740 __ lea(rdx, Operand(rax, rdx, times_8, 0)); 746 __ lea(rdx, Operand(rax, rdx, times_8, 0));
741 __ bind(&outer_push_loop); 747 __ bind(&outer_push_loop);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 } 812 }
807 __ bind(&done); 813 __ bind(&done);
808 } 814 }
809 815
810 #undef __ 816 #undef __
811 817
812 818
813 } } // namespace v8::internal 819 } } // namespace v8::internal
814 820
815 #endif // V8_TARGET_ARCH_X64 821 #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