/home/travis/build/MoarVM/MoarVM/src/jit/compile.h
Line | Count | Source |
1 | | typedef MVMint32 (*MVMJitFunc)(MVMThreadContext *tc, MVMCompUnit *cu, void * label); |
2 | | |
3 | | struct MVMJitCode { |
4 | | MVMJitFunc func_ptr; |
5 | | size_t size; |
6 | | MVMuint8 *bytecode; |
7 | | |
8 | | MVMStaticFrame *sf; |
9 | | /* The basic idea here is that /all/ label names are indexes into |
10 | | * the single labels array. This isn't particularly efficient at |
11 | | * runtime (because we need a second dereference to figure the |
12 | | * labels out), but very simple for me now, and super-easy to |
13 | | * optimise at a later date */ |
14 | | MVMint32 num_labels; /* for labels */ |
15 | | MVMint32 num_bbs; /* for bb_labels */ |
16 | | void **labels; |
17 | | MVMint32 *bb_labels; |
18 | | |
19 | | MVMint32 num_deopts; |
20 | | MVMint32 num_inlines; |
21 | | MVMJitDeopt *deopts; |
22 | | MVMJitInline *inlines; |
23 | | |
24 | | MVMint32 num_handlers; /* for handlers */ |
25 | | MVMint32 seq_nr; |
26 | | MVMJitHandler *handlers; |
27 | | }; |
28 | | |
29 | | MVMJitCode* MVM_jit_compile_graph(MVMThreadContext *tc, MVMJitGraph *graph); |
30 | | void MVM_jit_destroy_code(MVMThreadContext *tc, MVMJitCode *code); |
31 | | MVMint32 MVM_jit_enter_code(MVMThreadContext *tc, MVMCompUnit *cu, |
32 | | MVMJitCode * code); |
33 | | |
34 | 15.0k | #define MVM_JIT_CTRL_DEOPT -1 |
35 | | #define MVM_JIT_CTRL_NORMAL 0 |