Skip to content

Commit 2a3a417

Browse files
committed
[interop] Share one interop header between cpyrt and the wrapper
1 parent 3235039 commit 2a3a417

5 files changed

Lines changed: 30 additions & 521 deletions

File tree

‎src/cpyrt/CallContext.h‎

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,40 +12,8 @@
1212

1313
namespace cppjit::cpyrt {
1414

15-
// small number that allows use of stack for argument passing
16-
const int SMALL_ARGS_N = 8;
17-
18-
// convention to pass flag for direct calls (similar to Python's vector calls)
19-
#define DIRECT_CALL ((size_t)1 << (8 * sizeof(size_t) - 1))
20-
21-
#ifndef CPYRT_PARAMETER
22-
#define CPYRT_PARAMETER
23-
// general place holder for function parameters
24-
struct Parameter {
25-
union Value {
26-
bool fBool;
27-
int8_t fInt8;
28-
uint8_t fUInt8;
29-
short fShort;
30-
unsigned short fUShort;
31-
int fInt;
32-
unsigned int fUInt;
33-
long fLong;
34-
intptr_t fIntPtr;
35-
unsigned long fULong;
36-
long long fLLong;
37-
unsigned long long fULLong;
38-
int64_t fInt64;
39-
uint64_t fUInt64;
40-
float fFloat;
41-
double fDouble;
42-
long double fLDouble;
43-
void* fVoidp;
44-
} fValue;
45-
void* fRef;
46-
char fTypeCode;
47-
};
48-
#endif // CPYRT_PARAMETER
15+
// Parameter and the call-ABI constants (SMALL_ARGS_N, DIRECT_CALL) come
16+
// from the interop callcontext.h via cppjit_interop.h
4917

5018
// extra call information
5119
struct CallContext {

0 commit comments

Comments
 (0)