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 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 // rsp[16] : receiver ("this") | 874 // rsp[16] : receiver ("this") |
875 // rsp[24] : function | 875 // rsp[24] : function |
876 { | 876 { |
877 FrameScope frame_scope(masm, StackFrame::INTERNAL); | 877 FrameScope frame_scope(masm, StackFrame::INTERNAL); |
878 // Stack frame: | 878 // Stack frame: |
879 // rbp : Old base pointer | 879 // rbp : Old base pointer |
880 // rbp[8] : return address | 880 // rbp[8] : return address |
881 // rbp[16] : function arguments | 881 // rbp[16] : function arguments |
882 // rbp[24] : receiver | 882 // rbp[24] : receiver |
883 // rbp[32] : function | 883 // rbp[32] : function |
884 static const int kArgumentsOffset = 2 * kPointerSize; | 884 static const int kArgumentsOffset = kFPOnStackSize + kPCOnStackSize; |
885 static const int kReceiverOffset = 3 * kPointerSize; | 885 static const int kReceiverOffset = kArgumentsOffset + kPointerSize; |
886 static const int kFunctionOffset = 4 * kPointerSize; | 886 static const int kFunctionOffset = kReceiverOffset + kPointerSize; |
887 | 887 |
888 __ push(Operand(rbp, kFunctionOffset)); | 888 __ push(Operand(rbp, kFunctionOffset)); |
889 __ push(Operand(rbp, kArgumentsOffset)); | 889 __ push(Operand(rbp, kArgumentsOffset)); |
890 __ InvokeBuiltin(Builtins::APPLY_PREPARE, CALL_FUNCTION); | 890 __ InvokeBuiltin(Builtins::APPLY_PREPARE, CALL_FUNCTION); |
891 | 891 |
892 // Check the stack for overflow. We are not trying to catch | 892 // Check the stack for overflow. We are not trying to catch |
893 // interruptions (e.g. debug break and preemption) here, so the "real stack | 893 // interruptions (e.g. debug break and preemption) here, so the "real stack |
894 // limit" is checked. | 894 // limit" is checked. |
895 Label okay; | 895 Label okay; |
896 __ LoadRoot(kScratchRegister, Heap::kRealStackLimitRootIndex); | 896 __ LoadRoot(kScratchRegister, Heap::kRealStackLimitRootIndex); |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1401 __ bind(&ok); | 1401 __ bind(&ok); |
1402 __ ret(0); | 1402 __ ret(0); |
1403 } | 1403 } |
1404 | 1404 |
1405 | 1405 |
1406 #undef __ | 1406 #undef __ |
1407 | 1407 |
1408 } } // namespace v8::internal | 1408 } } // namespace v8::internal |
1409 | 1409 |
1410 #endif // V8_TARGET_ARCH_X64 | 1410 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |