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 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
937 // rsp[16] : receiver ("this") | 937 // rsp[16] : receiver ("this") |
938 // rsp[24] : function | 938 // rsp[24] : function |
939 { | 939 { |
940 FrameScope frame_scope(masm, StackFrame::INTERNAL); | 940 FrameScope frame_scope(masm, StackFrame::INTERNAL); |
941 // Stack frame: | 941 // Stack frame: |
942 // rbp : Old base pointer | 942 // rbp : Old base pointer |
943 // rbp[8] : return address | 943 // rbp[8] : return address |
944 // rbp[16] : function arguments | 944 // rbp[16] : function arguments |
945 // rbp[24] : receiver | 945 // rbp[24] : receiver |
946 // rbp[32] : function | 946 // rbp[32] : function |
947 static const int kArgumentsOffset = 2 * kPointerSize; | 947 static const int kArgumentsOffset = kFPOnStackSize + kPCOnStackSize; |
948 static const int kReceiverOffset = 3 * kPointerSize; | 948 static const int kReceiverOffset = kArgumentsOffset + kPointerSize; |
949 static const int kFunctionOffset = 4 * kPointerSize; | 949 static const int kFunctionOffset = kReceiverOffset + kPointerSize; |
950 | 950 |
951 __ push(Operand(rbp, kFunctionOffset)); | 951 __ push(Operand(rbp, kFunctionOffset)); |
952 __ push(Operand(rbp, kArgumentsOffset)); | 952 __ push(Operand(rbp, kArgumentsOffset)); |
953 __ InvokeBuiltin(Builtins::APPLY_PREPARE, CALL_FUNCTION); | 953 __ InvokeBuiltin(Builtins::APPLY_PREPARE, CALL_FUNCTION); |
954 | 954 |
955 // Check the stack for overflow. We are not trying to catch | 955 // Check the stack for overflow. We are not trying to catch |
956 // interruptions (e.g. debug break and preemption) here, so the "real stack | 956 // interruptions (e.g. debug break and preemption) here, so the "real stack |
957 // limit" is checked. | 957 // limit" is checked. |
958 Label okay; | 958 Label okay; |
959 __ LoadRoot(kScratchRegister, Heap::kRealStackLimitRootIndex); | 959 __ LoadRoot(kScratchRegister, Heap::kRealStackLimitRootIndex); |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1442 // And "return" to the OSR entry point of the function. | 1442 // And "return" to the OSR entry point of the function. |
1443 __ ret(0); | 1443 __ ret(0); |
1444 } | 1444 } |
1445 | 1445 |
1446 | 1446 |
1447 #undef __ | 1447 #undef __ |
1448 | 1448 |
1449 } } // namespace v8::internal | 1449 } } // namespace v8::internal |
1450 | 1450 |
1451 #endif // V8_TARGET_ARCH_X64 | 1451 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |