diff options
Diffstat (limited to 'lpvm.h')
-rw-r--r-- | lpvm.h | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -43,7 +43,11 @@ typedef enum Opcode { | |||
43 | } Opcode; | 43 | } Opcode; |
44 | 44 | ||
45 | 45 | ||
46 | 46 | /* | |
47 | ** All array of instructions has a 'codesize' as its first element | ||
48 | ** and is referred by a pointer to its second element, which is the | ||
49 | ** first actual opcode. | ||
50 | */ | ||
47 | typedef union Instruction { | 51 | typedef union Instruction { |
48 | struct Inst { | 52 | struct Inst { |
49 | byte code; | 53 | byte code; |
@@ -57,6 +61,7 @@ typedef union Instruction { | |||
57 | } aux2; | 61 | } aux2; |
58 | } i; | 62 | } i; |
59 | int offset; | 63 | int offset; |
64 | uint codesize; | ||
60 | byte buff[1]; | 65 | byte buff[1]; |
61 | } Instruction; | 66 | } Instruction; |
62 | 67 | ||
@@ -66,7 +71,6 @@ typedef union Instruction { | |||
66 | 71 | ||
67 | 72 | ||
68 | int charinset (const Instruction *i, const byte *buff, uint c); | 73 | int charinset (const Instruction *i, const byte *buff, uint c); |
69 | void printpatt (Instruction *p, int n); | ||
70 | const char *match (lua_State *L, const char *o, const char *s, const char *e, | 74 | const char *match (lua_State *L, const char *o, const char *s, const char *e, |
71 | Instruction *op, Capture *capture, int ptop); | 75 | Instruction *op, Capture *capture, int ptop); |
72 | 76 | ||