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 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
806 void CallExternalReference(const ExternalReference& ext, | 806 void CallExternalReference(const ExternalReference& ext, |
807 int num_arguments); | 807 int num_arguments); |
808 | 808 |
809 // Tail call of a runtime routine (jump). | 809 // Tail call of a runtime routine (jump). |
810 // Like JumpToExternalReference, but also takes care of passing the number | 810 // Like JumpToExternalReference, but also takes care of passing the number |
811 // of parameters. | 811 // of parameters. |
812 void TailCallExternalReference(const ExternalReference& ext, | 812 void TailCallExternalReference(const ExternalReference& ext, |
813 int num_arguments, | 813 int num_arguments, |
814 int result_size); | 814 int result_size); |
815 | 815 |
816 MUST_USE_RESULT MaybeObject* TryTailCallExternalReference( | |
817 const ExternalReference& ext, int num_arguments, int result_size); | |
818 | |
816 // Convenience function: tail call a runtime routine (jump). | 819 // Convenience function: tail call a runtime routine (jump). |
817 void TailCallRuntime(Runtime::FunctionId fid, | 820 void TailCallRuntime(Runtime::FunctionId fid, |
818 int num_arguments, | 821 int num_arguments, |
819 int result_size); | 822 int result_size); |
820 | 823 |
824 MUST_USE_RESULT MaybeObject* TryTailCallRuntime(Runtime::FunctionId fid, | |
825 int num_arguments, | |
826 int result_size); | |
827 | |
821 // Jump to a runtime routine. | 828 // Jump to a runtime routine. |
822 void JumpToExternalReference(const ExternalReference& ext, int result_size); | 829 void JumpToExternalReference(const ExternalReference& ext, int result_size); |
823 | 830 |
831 // Jump to a runtime routine. | |
832 MaybeObject* TryJumpToExternalReference(const ExternalReference& ext, | |
833 int result_size); | |
834 | |
824 // Prepares stack to put arguments (aligns and so on). | 835 // Prepares stack to put arguments (aligns and so on). |
825 // Uses calle-saved esi to restore stack state after call. | 836 // Uses calle-saved esi to restore stack state after call. In WIN64 puts |
antonm
2010/11/13 11:34:46
esi -> rsi
calle -> callee
antonm
2010/11/13 11:34:46
"In WIN64 puts" doesn't sound fine imho.
WIN64 ca
SeRya
2010/11/15 12:09:11
Done.
| |
826 void PrepareCallApiFunction(int stack_space); | 837 // the pointer to the return value slot into rcx (rcx must be preserverd |
838 // untill TryCallApiFunctionAndReturn). | |
antonm
2010/11/13 11:34:46
untill -> until
SeRya
2010/11/15 12:09:11
Done.
| |
839 void PrepareCallApiFunction(int stack_space, int argc); | |
antonm
2010/11/13 11:34:46
Please, add comments about semantics of stack_spac
SeRya
2010/11/15 12:09:11
Done.
| |
827 | 840 |
828 // Tail call an API function (jump). Allocates HandleScope, extracts | 841 // Tail call an API function (jump). Allocates HandleScope, extracts |
829 // returned value from handle and propogates exceptions. | 842 // returned value from handle and propogates exceptions. |
830 // Clobbers ebx, edi and caller-save registers. | 843 // Clobbers ebx, edi and caller-save registers. |
831 void CallApiFunctionAndReturn(ApiFunction* function); | 844 MUST_USE_RESULT MaybeObject* TryCallApiFunctionAndReturn( |
antonm
2010/11/13 11:34:46
I think you should unify doc with ia32 variant
SeRya
2010/11/15 12:09:11
Done.
| |
845 ApiFunction* function); | |
832 | 846 |
833 // Before calling a C-function from generated code, align arguments on stack. | 847 // Before calling a C-function from generated code, align arguments on stack. |
834 // After aligning the frame, arguments must be stored in esp[0], esp[4], | 848 // After aligning the frame, arguments must be stored in esp[0], esp[4], |
835 // etc., not pushed. The argument count assumes all arguments are word sized. | 849 // etc., not pushed. The argument count assumes all arguments are word sized. |
836 // The number of slots reserved for arguments depends on platform. On Windows | 850 // The number of slots reserved for arguments depends on platform. On Windows |
837 // stack slots are reserved for the arguments passed in registers. On other | 851 // stack slots are reserved for the arguments passed in registers. On other |
838 // platforms stack slots are only reserved for the arguments actually passed | 852 // platforms stack slots are only reserved for the arguments actually passed |
839 // on the stack. | 853 // on the stack. |
840 void PrepareCallCFunction(int num_arguments); | 854 void PrepareCallCFunction(int num_arguments); |
841 | 855 |
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1691 Jump(adaptor, RelocInfo::CODE_TARGET); | 1705 Jump(adaptor, RelocInfo::CODE_TARGET); |
1692 } | 1706 } |
1693 bind(&invoke); | 1707 bind(&invoke); |
1694 } | 1708 } |
1695 } | 1709 } |
1696 | 1710 |
1697 | 1711 |
1698 } } // namespace v8::internal | 1712 } } // namespace v8::internal |
1699 | 1713 |
1700 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1714 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
OLD | NEW |