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 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
742 | 742 |
743 | 743 |
744 void LoadIC::Generate(MacroAssembler* masm, const ExternalReference& f) { | 744 void LoadIC::Generate(MacroAssembler* masm, const ExternalReference& f) { |
745 // ----------- S t a t e ------------- | 745 // ----------- S t a t e ------------- |
746 // -- ecx : name | 746 // -- ecx : name |
747 // -- esp[0] : return address | 747 // -- esp[0] : return address |
748 // -- esp[4] : receiver | 748 // -- esp[4] : receiver |
749 // ----------------------------------- | 749 // ----------------------------------- |
750 | 750 |
751 __ mov(eax, Operand(esp, kPointerSize)); | 751 __ mov(eax, Operand(esp, kPointerSize)); |
752 | |
753 // Move the return address below the arguments. | |
754 __ pop(ebx); | 752 __ pop(ebx); |
Lasse Reichstein
2009/07/27 10:32:11
Perhaps add comment to this line as well?
// retur
| |
755 __ push(eax); | 753 __ push(eax); // receiver |
756 __ push(ecx); | 754 __ push(ecx); // name |
757 __ push(ebx); | 755 __ push(ebx); // return address |
758 | 756 |
759 // Perform tail call to the entry. | 757 // Perform tail call to the entry. |
760 __ TailCallRuntime(f, 2); | 758 __ TailCallRuntime(f, 2); |
761 } | 759 } |
762 | 760 |
763 | 761 |
764 // One byte opcode for test eax,0xXXXXXXXX. | 762 // One byte opcode for test eax,0xXXXXXXXX. |
765 static const byte kTestEaxByte = 0xA9; | 763 static const byte kTestEaxByte = 0xA9; |
766 | 764 |
767 | 765 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
870 | 868 |
871 void KeyedLoadIC::Generate(MacroAssembler* masm, const ExternalReference& f) { | 869 void KeyedLoadIC::Generate(MacroAssembler* masm, const ExternalReference& f) { |
872 // ----------- S t a t e ------------- | 870 // ----------- S t a t e ------------- |
873 // -- esp[0] : return address | 871 // -- esp[0] : return address |
874 // -- esp[4] : name | 872 // -- esp[4] : name |
875 // -- esp[8] : receiver | 873 // -- esp[8] : receiver |
876 // ----------------------------------- | 874 // ----------------------------------- |
877 | 875 |
878 __ mov(eax, Operand(esp, kPointerSize)); | 876 __ mov(eax, Operand(esp, kPointerSize)); |
879 __ mov(ecx, Operand(esp, 2 * kPointerSize)); | 877 __ mov(ecx, Operand(esp, 2 * kPointerSize)); |
880 | |
881 // Move the return address below the arguments. | |
882 __ pop(ebx); | 878 __ pop(ebx); |
883 __ push(ecx); | 879 __ push(ecx); // receiver |
884 __ push(eax); | 880 __ push(eax); // name |
885 __ push(ebx); | 881 __ push(ebx); // return address |
886 | 882 |
887 // Perform tail call to the entry. | 883 // Perform tail call to the entry. |
888 __ TailCallRuntime(f, 2); | 884 __ TailCallRuntime(f, 2); |
889 } | 885 } |
890 | 886 |
891 | 887 |
892 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { | 888 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { |
893 // ----------- S t a t e ------------- | 889 // ----------- S t a t e ------------- |
894 // -- eax : value | 890 // -- eax : value |
895 // -- ecx : name | 891 // -- ecx : name |
(...skipping 14 matching lines...) Expand all Loading... | |
910 | 906 |
911 | 907 |
912 void StoreIC::GenerateExtendStorage(MacroAssembler* masm) { | 908 void StoreIC::GenerateExtendStorage(MacroAssembler* masm) { |
913 // ----------- S t a t e ------------- | 909 // ----------- S t a t e ------------- |
914 // -- eax : value | 910 // -- eax : value |
915 // -- ecx : transition map | 911 // -- ecx : transition map |
916 // -- esp[0] : return address | 912 // -- esp[0] : return address |
917 // -- esp[4] : receiver | 913 // -- esp[4] : receiver |
918 // ----------------------------------- | 914 // ----------------------------------- |
919 | 915 |
920 // Move the return address below the arguments. | |
921 __ pop(ebx); | 916 __ pop(ebx); |
922 __ push(Operand(esp, 0)); | 917 __ push(Operand(esp, 0)); // receiver |
923 __ push(ecx); | 918 __ push(ecx); // transition map |
924 __ push(eax); | 919 __ push(eax); // value |
925 __ push(ebx); | 920 __ push(ebx); // return address |
921 | |
926 // Perform tail call to the entry. | 922 // Perform tail call to the entry. |
927 __ TailCallRuntime( | 923 __ TailCallRuntime( |
928 ExternalReference(IC_Utility(kSharedStoreIC_ExtendStorage)), 3); | 924 ExternalReference(IC_Utility(kSharedStoreIC_ExtendStorage)), 3); |
929 } | 925 } |
930 | 926 |
931 | 927 |
932 void StoreIC::Generate(MacroAssembler* masm, const ExternalReference& f) { | 928 void StoreIC::Generate(MacroAssembler* masm, const ExternalReference& f) { |
933 // ----------- S t a t e ------------- | 929 // ----------- S t a t e ------------- |
934 // -- eax : value | 930 // -- eax : value |
935 // -- ecx : name | 931 // -- ecx : name |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
990 | 986 |
991 // Do tail-call to runtime routine. | 987 // Do tail-call to runtime routine. |
992 __ TailCallRuntime( | 988 __ TailCallRuntime( |
993 ExternalReference(IC_Utility(kSharedStoreIC_ExtendStorage)), 3); | 989 ExternalReference(IC_Utility(kSharedStoreIC_ExtendStorage)), 3); |
994 } | 990 } |
995 | 991 |
996 #undef __ | 992 #undef __ |
997 | 993 |
998 | 994 |
999 } } // namespace v8::internal | 995 } } // namespace v8::internal |
OLD | NEW |