blob: be7180485389b9d233df648b8745fbe7da32e821 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#ifndef _ORC_CODE_H_
#define _ORC_CODE_H_
#include <orc/orc.h>
#include <orc/orclimits.h>
#include <orc/orcexecutor.h>
#include <orc/orcinstruction.h>
ORC_BEGIN_DECLS
typedef struct _OrcCodeVariable OrcCodeVariable;
struct _OrcCodeVariable {
/*< private >*/
int vartype;
int size;
orc_union64 value;
};
struct _OrcCode {
/*< public >*/
OrcExecutorFunc exec;
/*< private >*/
OrcCompileResult result;
char *name;
/* for execution */
unsigned char *code;
int code_size;
void *chunk;
/* for emulation */
int n_insns;
OrcInstruction *insns;
OrcCodeVariable *vars;
int is_2d;
int constant_n;
int constant_m;
};
ORC_API void orc_code_allocate_codemem (OrcCode *code, int size);
ORC_API OrcCode * orc_code_new (void);
ORC_API void orc_code_free (OrcCode *code);
ORC_END_DECLS
#endif
|