OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 __ LeaveInternalFrame(); | 662 __ LeaveInternalFrame(); |
663 __ ret(3 * kPointerSize); // remove this, receiver, and arguments | 663 __ ret(3 * kPointerSize); // remove this, receiver, and arguments |
664 } | 664 } |
665 | 665 |
666 | 666 |
667 static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) { | 667 static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) { |
668 __ push(ebp); | 668 __ push(ebp); |
669 __ mov(ebp, Operand(esp)); | 669 __ mov(ebp, Operand(esp)); |
670 | 670 |
671 // Store the arguments adaptor context sentinel. | 671 // Store the arguments adaptor context sentinel. |
672 __ push(Immediate(ArgumentsAdaptorFrame::SENTINEL)); | 672 __ push(Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
673 | 673 |
674 // Push the function on the stack. | 674 // Push the function on the stack. |
675 __ push(edi); | 675 __ push(edi); |
676 | 676 |
677 // Preserve the number of arguments on the stack. Must preserve both | 677 // Preserve the number of arguments on the stack. Must preserve both |
678 // eax and ebx because these registers are used when copying the | 678 // eax and ebx because these registers are used when copying the |
679 // arguments and the receiver. | 679 // arguments and the receiver. |
680 ASSERT(kSmiTagSize == 1); | 680 ASSERT(kSmiTagSize == 1); |
681 __ lea(ecx, Operand(eax, eax, times_1, kSmiTag)); | 681 __ lea(ecx, Operand(eax, eax, times_1, kSmiTag)); |
682 __ push(ecx); | 682 __ push(ecx); |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 // Dont adapt arguments. | 774 // Dont adapt arguments. |
775 // ------------------------------------------- | 775 // ------------------------------------------- |
776 __ bind(&dont_adapt_arguments); | 776 __ bind(&dont_adapt_arguments); |
777 __ jmp(Operand(edx)); | 777 __ jmp(Operand(edx)); |
778 } | 778 } |
779 | 779 |
780 | 780 |
781 #undef __ | 781 #undef __ |
782 | 782 |
783 } } // namespace v8::internal | 783 } } // namespace v8::internal |
OLD | NEW |