Menu

[r45]: / templates_compiler / trunk / share / bytecode.h  Maximize  Restore  History

Download this file

42 lines (30 with data), 538 Bytes

 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
#ifndef _BYTECODE_H
#define _BYTECODE_H
#include <stdint.h>
#ifdef __cplusplus
extern "C"
{
#endif
enum {
OP_INLINE = 0,
OP_CALL = 1,
OP_VAR = 2,
OP_INCLUDE = 3,
OP_GOTO_IF_TRUE = 4,
OP_GOTO_IF_FALSE= 5,
OP_GOTO_IF_DEF = 6,
OP_GOTO_IF_NDEF = 7,
OP_GOTO = 8,
OP_INCLUDE_REF = 9,
OP_STOP = 0xFF
};
struct Tmpl_Op {
uint8_t opcode; // Operation
uint8_t reg_id; // foreach register
uint16_t parameter; // variable id
uint32_t jump; // Jump offset
};
#ifdef __cplusplus
}
#endif
#endif /* _BYTECODE_H */
MongoDB Logo MongoDB