#ifndef VILE_NATIVE_ABI_H #define VILE_NATIVE_ABI_H #include typedef struct VileNativeValue {int64_t x;int64_t k;} VileNativeValue; /* The importer and generated code access the same private pool objects. */ typedef struct VileNativePair { int64_t car; struct VileNativePair *cdr; } VileNativePair; _Static_assert(sizeof(VileNativePair)==16,"native private pair layout"); /* Original handles stay in the invocation's C stack frame, visible to a * conservative collector even while generated code has overwritten a cell. */ typedef struct VileNativeVectorWrite { void *vector; int64_t index; uint64_t original[2]; } VileNativeVectorWrite; typedef struct VileNativeVectorJournal { VileNativeVectorWrite *entries; int64_t count,capacity; } VileNativeVectorJournal; typedef struct VileNativeHostApi { void *context; void (*vector)(void*,VileNativeVectorJournal*,int64_t,VileNativeValue*,int64_t,VileNativeValue*); void (*finish)(void*,VileNativeVectorJournal*,VileNativeValue*); } VileNativeHostApi; #endif