geode/loader/dobby/source/TrampolineBridge/ClosureTrampolineBridge/AssemblyClosureTrampoline.h

43 lines
778 B
C
Raw Normal View History

2022-07-30 12:24:03 -04:00
#ifndef ASSEMBLY_CLOSURE_TRAMPOLINE_H
#define ASSEMBLY_CLOSURE_TRAMPOLINE_H
#include "dobby_internal.h"
#ifdef ENABLE_CLOSURE_TRAMPOLINE_TEMPLATE
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
void closure_trampoline_template();
void closure_bridge_template();
#ifdef __cplusplus
}
#endif //__cplusplus
#endif
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
typedef struct _ClosureTrampolineEntry {
void *address;
int size;
void *carry_handler;
void *carry_data;
} ClosureTrampolineEntry;
void *get_closure_bridge();
#ifdef __cplusplus
}
#endif //__cplusplus
class ClosureTrampoline {
private:
static LiteMutableArray *trampolines_;
public:
static ClosureTrampolineEntry *CreateClosureTrampoline(void *carry_data, void *carry_handler);
};
#endif