OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 } | 671 } |
672 | 672 |
673 // Restore the function to edi. | 673 // Restore the function to edi. |
674 __ mov(edi, Operand(esp, eax, times_4, 1 * kPointerSize)); | 674 __ mov(edi, Operand(esp, eax, times_4, 1 * kPointerSize)); |
675 __ jmp(&patch_receiver); | 675 __ jmp(&patch_receiver); |
676 | 676 |
677 // Use the global receiver object from the called function as the | 677 // Use the global receiver object from the called function as the |
678 // receiver. | 678 // receiver. |
679 __ bind(&use_global_receiver); | 679 __ bind(&use_global_receiver); |
680 const int kGlobalIndex = | 680 const int kGlobalIndex = |
681 Context::kHeaderSize + Context::GLOBAL_INDEX * kPointerSize; | 681 Context::kHeaderSize + Context::GLOBAL_OBJECT_INDEX * kPointerSize; |
682 __ mov(ebx, FieldOperand(esi, kGlobalIndex)); | 682 __ mov(ebx, FieldOperand(esi, kGlobalIndex)); |
683 __ mov(ebx, FieldOperand(ebx, GlobalObject::kNativeContextOffset)); | 683 __ mov(ebx, FieldOperand(ebx, GlobalObject::kNativeContextOffset)); |
684 __ mov(ebx, FieldOperand(ebx, kGlobalIndex)); | 684 __ mov(ebx, FieldOperand(ebx, kGlobalIndex)); |
685 __ mov(ebx, FieldOperand(ebx, GlobalObject::kGlobalReceiverOffset)); | 685 __ mov(ebx, FieldOperand(ebx, GlobalObject::kGlobalReceiverOffset)); |
686 | 686 |
687 __ bind(&patch_receiver); | 687 __ bind(&patch_receiver); |
688 __ mov(Operand(esp, eax, times_4, 0), ebx); | 688 __ mov(Operand(esp, eax, times_4, 0), ebx); |
689 | 689 |
690 __ jmp(&shift_arguments); | 690 __ jmp(&shift_arguments); |
691 } | 691 } |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
849 | 849 |
850 __ bind(&call_to_object); | 850 __ bind(&call_to_object); |
851 __ push(ebx); | 851 __ push(ebx); |
852 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); | 852 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); |
853 __ mov(ebx, eax); | 853 __ mov(ebx, eax); |
854 __ jmp(&push_receiver); | 854 __ jmp(&push_receiver); |
855 | 855 |
856 // Use the current global receiver object as the receiver. | 856 // Use the current global receiver object as the receiver. |
857 __ bind(&use_global_receiver); | 857 __ bind(&use_global_receiver); |
858 const int kGlobalOffset = | 858 const int kGlobalOffset = |
859 Context::kHeaderSize + Context::GLOBAL_INDEX * kPointerSize; | 859 Context::kHeaderSize + Context::GLOBAL_OBJECT_INDEX * kPointerSize; |
860 __ mov(ebx, FieldOperand(esi, kGlobalOffset)); | 860 __ mov(ebx, FieldOperand(esi, kGlobalOffset)); |
861 __ mov(ebx, FieldOperand(ebx, GlobalObject::kNativeContextOffset)); | 861 __ mov(ebx, FieldOperand(ebx, GlobalObject::kNativeContextOffset)); |
862 __ mov(ebx, FieldOperand(ebx, kGlobalOffset)); | 862 __ mov(ebx, FieldOperand(ebx, kGlobalOffset)); |
863 __ mov(ebx, FieldOperand(ebx, GlobalObject::kGlobalReceiverOffset)); | 863 __ mov(ebx, FieldOperand(ebx, GlobalObject::kGlobalReceiverOffset)); |
864 | 864 |
865 // Push the receiver. | 865 // Push the receiver. |
866 __ bind(&push_receiver); | 866 __ bind(&push_receiver); |
867 __ push(ebx); | 867 __ push(ebx); |
868 | 868 |
869 // Copy all arguments from the array to the stack. | 869 // Copy all arguments from the array to the stack. |
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1767 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); | 1767 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); |
1768 generator.Generate(); | 1768 generator.Generate(); |
1769 } | 1769 } |
1770 | 1770 |
1771 | 1771 |
1772 #undef __ | 1772 #undef __ |
1773 } | 1773 } |
1774 } // namespace v8::internal | 1774 } // namespace v8::internal |
1775 | 1775 |
1776 #endif // V8_TARGET_ARCH_IA32 | 1776 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |