OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
975 // Defined in ic.cc. | 975 // Defined in ic.cc. |
976 Object* CallIC_Miss(Arguments args); | 976 Object* CallIC_Miss(Arguments args); |
977 | 977 |
978 void CallIC::GenerateMegamorphic(MacroAssembler* masm, int argc) { | 978 void CallIC::GenerateMegamorphic(MacroAssembler* masm, int argc) { |
979 // ----------- S t a t e ------------- | 979 // ----------- S t a t e ------------- |
980 // rsp[0] return address | 980 // rsp[0] return address |
981 // rsp[8] argument argc | 981 // rsp[8] argument argc |
982 // rsp[16] argument argc - 1 | 982 // rsp[16] argument argc - 1 |
983 // ... | 983 // ... |
984 // rsp[argc * 8] argument 1 | 984 // rsp[argc * 8] argument 1 |
985 // rsp[(argc + 1) * 8] argument 0 = reciever | 985 // rsp[(argc + 1) * 8] argument 0 = receiver |
986 // rsp[(argc + 2) * 8] function name | 986 // rsp[(argc + 2) * 8] function name |
987 // ----------------------------------- | 987 // ----------------------------------- |
988 Label number, non_number, non_string, boolean, probe, miss; | 988 Label number, non_number, non_string, boolean, probe, miss; |
989 | 989 |
990 // Get the receiver of the function from the stack; 1 ~ return address. | 990 // Get the receiver of the function from the stack; 1 ~ return address. |
991 __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize)); | 991 __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize)); |
992 // Get the name of the function from the stack; 2 ~ return address, receiver | 992 // Get the name of the function from the stack; 2 ~ return address, receiver |
993 __ movq(rcx, Operand(rsp, (argc + 2) * kPointerSize)); | 993 __ movq(rcx, Operand(rsp, (argc + 2) * kPointerSize)); |
994 | 994 |
995 // Probe the stub cache. | 995 // Probe the stub cache. |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1071 } | 1071 } |
1072 | 1072 |
1073 | 1073 |
1074 void CallIC::GenerateNormal(MacroAssembler* masm, int argc) { | 1074 void CallIC::GenerateNormal(MacroAssembler* masm, int argc) { |
1075 // ----------- S t a t e ------------- | 1075 // ----------- S t a t e ------------- |
1076 // rsp[0] return address | 1076 // rsp[0] return address |
1077 // rsp[8] argument argc | 1077 // rsp[8] argument argc |
1078 // rsp[16] argument argc - 1 | 1078 // rsp[16] argument argc - 1 |
1079 // ... | 1079 // ... |
1080 // rsp[argc * 8] argument 1 | 1080 // rsp[argc * 8] argument 1 |
1081 // rsp[(argc + 1) * 8] argument 0 = reciever | 1081 // rsp[(argc + 1) * 8] argument 0 = receiver |
1082 // rsp[(argc + 2) * 8] function name | 1082 // rsp[(argc + 2) * 8] function name |
1083 // ----------------------------------- | 1083 // ----------------------------------- |
1084 | 1084 |
1085 Label miss, global_object, non_global_object; | 1085 Label miss, global_object, non_global_object; |
1086 | 1086 |
1087 // Get the receiver of the function from the stack. | 1087 // Get the receiver of the function from the stack. |
1088 __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize)); | 1088 __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize)); |
1089 // Get the name of the function from the stack. | 1089 // Get the name of the function from the stack. |
1090 __ movq(rcx, Operand(rsp, (argc + 2) * kPointerSize)); | 1090 __ movq(rcx, Operand(rsp, (argc + 2) * kPointerSize)); |
1091 | 1091 |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1384 | 1384 |
1385 // Cache miss: Jump to runtime. | 1385 // Cache miss: Jump to runtime. |
1386 Generate(masm, ExternalReference(IC_Utility(kStoreIC_Miss))); | 1386 Generate(masm, ExternalReference(IC_Utility(kStoreIC_Miss))); |
1387 } | 1387 } |
1388 | 1388 |
1389 | 1389 |
1390 #undef __ | 1390 #undef __ |
1391 | 1391 |
1392 | 1392 |
1393 } } // namespace v8::internal | 1393 } } // namespace v8::internal |
OLD | NEW |