Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
callcontext.h
Go to the documentation of this file.
1#ifndef CPPJIT_INTEROP_CALLCONTEXT_H
2#define CPPJIT_INTEROP_CALLCONTEXT_H
3
4// Standard
5#include <cstddef>
6#include <cstdint>
7
8// convention to pass flag for direct calls (similar to Python's vector calls)
9#define DIRECT_CALL ((size_t)1 << (8 * sizeof(size_t) - 1))
10
11namespace cppjit::cpyrt {
12
13// small number that allows use of stack for argument passing
14const int SMALL_ARGS_N = 8;
15
16// The shipped cpyrt/API.h carries an identical Parameter for JIT-side
17// code, which cannot see this in-tree header; the shared CPYRT_PARAMETER
18// guard keeps one definition per TU. Keep both copies identical.
19#ifndef CPYRT_PARAMETER
20#define CPYRT_PARAMETER
21// general place holder for function parameters
22struct Parameter {
23 union Value {
24 bool fBool;
25 int8_t fInt8;
26 int16_t fInt16;
27 int32_t fInt32;
28 uint8_t fUInt8;
29 uint16_t fUInt16;
30 uint32_t fUInt32;
31 short fShort;
32 unsigned short fUShort;
33 int fInt;
34 unsigned int fUInt;
35 long fLong;
36 intptr_t fIntPtr;
37 unsigned long fULong;
38 long long fLLong;
39 unsigned long long fULLong;
40 int64_t fInt64;
41 uint64_t fUInt64;
42 float fFloat;
43 double fDouble;
44 long double fLDouble;
45 void* fVoidp;
46 } fValue;
47 void* fRef;
48 char fTypeCode;
49};
50#endif // CPYRT_PARAMETER
51
52} // namespace cppjit::cpyrt
53
54#endif // !CPPJIT_INTEROP_CALLCONTEXT_H
const int SMALL_ARGS_N
Definition callcontext.h:14
union cppjit::cpyrt::Parameter::Value fValue
unsigned short fUShort
Definition API.h:74
unsigned long long fULLong
Definition API.h:81