]> git.bts.cx Git - sun.git/blob - runtime/src/sun/compiler/compiler.h
increase instruction count
[sun.git] / runtime / src / sun / compiler / compiler.h
1 #ifndef SUN_COMPILER_COMPILER_H
2 #define SUN_COMPILER_COMPILER_H
3
4 #include <sun/vm/vm.h>
5 #include <stddef.h>
6
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10
11 typedef void *(*SLCMallocCallback)(void *memory, size_t size);
12 typedef void (*SLCFreeCallback)(void *memory);
13
14 typedef size_t (*SLCSourceReadCallback)(char *out, size_t outSize, void *userParam);
15
16 struct SLCCompileConfiguration {
17 SLCMallocCallback realloc;
18 SLCFreeCallback free;
19
20 SLCSourceReadCallback sourceReadCallback;
21 void *sourceUserParam;
22 };
23 typedef struct SLCCompileConfiguration SLCCompileConfiguration;
24
25 extern SVMModule *slcCompileSource(const SLCCompileConfiguration *configuration);
26
27 #ifdef __cplusplus
28 }
29 #endif
30
31 #endif