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 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
889 // rsp[16] : receiver ("this") | 889 // rsp[16] : receiver ("this") |
890 // rsp[24] : function | 890 // rsp[24] : function |
891 { | 891 { |
892 FrameScope frame_scope(masm, StackFrame::INTERNAL); | 892 FrameScope frame_scope(masm, StackFrame::INTERNAL); |
893 // Stack frame: | 893 // Stack frame: |
894 // rbp : Old base pointer | 894 // rbp : Old base pointer |
895 // rbp[8] : return address | 895 // rbp[8] : return address |
896 // rbp[16] : function arguments | 896 // rbp[16] : function arguments |
897 // rbp[24] : receiver | 897 // rbp[24] : receiver |
898 // rbp[32] : function | 898 // rbp[32] : function |
899 static const int kArgumentsOffset = 2 * kPointerSize; | 899 static const int kArgumentsOffset = kFPOnStackSize + kPCOnStackSize; |
900 static const int kReceiverOffset = 3 * kPointerSize; | 900 static const int kReceiverOffset = kArgumentsOffset + kPointerSize; |
901 static const int kFunctionOffset = 4 * kPointerSize; | 901 static const int kFunctionOffset = kReceiverOffset + kPointerSize; |
902 | 902 |
903 __ push(Operand(rbp, kFunctionOffset)); | 903 __ push(Operand(rbp, kFunctionOffset)); |
904 __ push(Operand(rbp, kArgumentsOffset)); | 904 __ push(Operand(rbp, kArgumentsOffset)); |
905 __ InvokeBuiltin(Builtins::APPLY_PREPARE, CALL_FUNCTION); | 905 __ InvokeBuiltin(Builtins::APPLY_PREPARE, CALL_FUNCTION); |
906 | 906 |
907 // Check the stack for overflow. We are not trying to catch | 907 // Check the stack for overflow. We are not trying to catch |
908 // interruptions (e.g. debug break and preemption) here, so the "real stack | 908 // interruptions (e.g. debug break and preemption) here, so the "real stack |
909 // limit" is checked. | 909 // limit" is checked. |
910 Label okay; | 910 Label okay; |
911 __ LoadRoot(kScratchRegister, Heap::kRealStackLimitRootIndex); | 911 __ LoadRoot(kScratchRegister, Heap::kRealStackLimitRootIndex); |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1399 // And "return" to the OSR entry point of the function. | 1399 // And "return" to the OSR entry point of the function. |
1400 __ ret(0); | 1400 __ ret(0); |
1401 } | 1401 } |
1402 | 1402 |
1403 | 1403 |
1404 #undef __ | 1404 #undef __ |
1405 | 1405 |
1406 } } // namespace v8::internal | 1406 } } // namespace v8::internal |
1407 | 1407 |
1408 #endif // V8_TARGET_ARCH_X64 | 1408 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |