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

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

Issue 7050039: Revert 8122 (stub call asserts) while test failures are investigated. (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/ia32/debug-ia32.cc ('k') | src/ia32/full-codegen-ia32.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 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 // Allocate a new deoptimizer object. 643 // Allocate a new deoptimizer object.
644 __ PrepareCallCFunction(6, eax); 644 __ PrepareCallCFunction(6, eax);
645 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); 645 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
646 __ mov(Operand(esp, 0 * kPointerSize), eax); // Function. 646 __ mov(Operand(esp, 0 * kPointerSize), eax); // Function.
647 __ mov(Operand(esp, 1 * kPointerSize), Immediate(type())); // Bailout type. 647 __ mov(Operand(esp, 1 * kPointerSize), Immediate(type())); // Bailout type.
648 __ mov(Operand(esp, 2 * kPointerSize), ebx); // Bailout id. 648 __ mov(Operand(esp, 2 * kPointerSize), ebx); // Bailout id.
649 __ mov(Operand(esp, 3 * kPointerSize), ecx); // Code address or 0. 649 __ mov(Operand(esp, 3 * kPointerSize), ecx); // Code address or 0.
650 __ mov(Operand(esp, 4 * kPointerSize), edx); // Fp-to-sp delta. 650 __ mov(Operand(esp, 4 * kPointerSize), edx); // Fp-to-sp delta.
651 __ mov(Operand(esp, 5 * kPointerSize), 651 __ mov(Operand(esp, 5 * kPointerSize),
652 Immediate(ExternalReference::isolate_address())); 652 Immediate(ExternalReference::isolate_address()));
653 { 653 __ CallCFunction(ExternalReference::new_deoptimizer_function(isolate), 6);
654 AllowExternalCallThatCantCauseGC scope(masm());
655 __ CallCFunction(ExternalReference::new_deoptimizer_function(isolate), 6);
656 }
657 654
658 // Preserve deoptimizer object in register eax and get the input 655 // Preserve deoptimizer object in register eax and get the input
659 // frame descriptor pointer. 656 // frame descriptor pointer.
660 __ mov(ebx, Operand(eax, Deoptimizer::input_offset())); 657 __ mov(ebx, Operand(eax, Deoptimizer::input_offset()));
661 658
662 // Fill in the input registers. 659 // Fill in the input registers.
663 for (int i = kNumberOfRegisters - 1; i >= 0; i--) { 660 for (int i = kNumberOfRegisters - 1; i >= 0; i--) {
664 int offset = (i * kPointerSize) + FrameDescription::registers_offset(); 661 int offset = (i * kPointerSize) + FrameDescription::registers_offset();
665 __ pop(Operand(ebx, offset)); 662 __ pop(Operand(ebx, offset));
666 } 663 }
(...skipping 27 matching lines...) Expand all
694 __ bind(&pop_loop); 691 __ bind(&pop_loop);
695 __ pop(Operand(edx, 0)); 692 __ pop(Operand(edx, 0));
696 __ add(Operand(edx), Immediate(sizeof(uint32_t))); 693 __ add(Operand(edx), Immediate(sizeof(uint32_t)));
697 __ cmp(ecx, Operand(esp)); 694 __ cmp(ecx, Operand(esp));
698 __ j(not_equal, &pop_loop); 695 __ j(not_equal, &pop_loop);
699 696
700 // Compute the output frame in the deoptimizer. 697 // Compute the output frame in the deoptimizer.
701 __ push(eax); 698 __ push(eax);
702 __ PrepareCallCFunction(1, ebx); 699 __ PrepareCallCFunction(1, ebx);
703 __ mov(Operand(esp, 0 * kPointerSize), eax); 700 __ mov(Operand(esp, 0 * kPointerSize), eax);
704 { 701 __ CallCFunction(
705 AllowExternalCallThatCantCauseGC scope(masm()); 702 ExternalReference::compute_output_frames_function(isolate), 1);
706 __ CallCFunction(
707 ExternalReference::compute_output_frames_function(isolate), 1);
708 }
709 __ pop(eax); 703 __ pop(eax);
710 704
711 // Replace the current frame with the output frames. 705 // Replace the current frame with the output frames.
712 Label outer_push_loop, inner_push_loop; 706 Label outer_push_loop, inner_push_loop;
713 // Outer loop state: eax = current FrameDescription**, edx = one past the 707 // Outer loop state: eax = current FrameDescription**, edx = one past the
714 // last FrameDescription**. 708 // last FrameDescription**.
715 __ mov(edx, Operand(eax, Deoptimizer::output_count_offset())); 709 __ mov(edx, Operand(eax, Deoptimizer::output_count_offset()));
716 __ mov(eax, Operand(eax, Deoptimizer::output_offset())); 710 __ mov(eax, Operand(eax, Deoptimizer::output_offset()));
717 __ lea(edx, Operand(eax, edx, times_4, 0)); 711 __ lea(edx, Operand(eax, edx, times_4, 0));
718 __ bind(&outer_push_loop); 712 __ bind(&outer_push_loop);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 } 765 }
772 __ bind(&done); 766 __ bind(&done);
773 } 767 }
774 768
775 #undef __ 769 #undef __
776 770
777 771
778 } } // namespace v8::internal 772 } } // namespace v8::internal
779 773
780 #endif // V8_TARGET_ARCH_IA32 774 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/debug-ia32.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698