Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 2 additions & 34 deletions src/cpyrt/CallContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,40 +12,8 @@

namespace cppjit::cpyrt {

// small number that allows use of stack for argument passing
const int SMALL_ARGS_N = 8;

// convention to pass flag for direct calls (similar to Python's vector calls)
#define DIRECT_CALL ((size_t)1 << (8 * sizeof(size_t) - 1))

#ifndef CPYRT_PARAMETER
#define CPYRT_PARAMETER
// general place holder for function parameters
struct Parameter {
union Value {
bool fBool;
int8_t fInt8;
uint8_t fUInt8;
short fShort;
unsigned short fUShort;
int fInt;
unsigned int fUInt;
long fLong;
intptr_t fIntPtr;
unsigned long fULong;
long long fLLong;
unsigned long long fULLong;
int64_t fInt64;
uint64_t fUInt64;
float fFloat;
double fDouble;
long double fLDouble;
void* fVoidp;
} fValue;
void* fRef;
char fTypeCode;
};
#endif // CPYRT_PARAMETER
// Parameter and the call-ABI constants (SMALL_ARGS_N, DIRECT_CALL) come
// from the interop callcontext.h via cppjit_interop.h

// extra call information
struct CallContext {
Expand Down
Loading
Loading