diff options
Diffstat (limited to 'lopcodes.h')
-rw-r--r-- | lopcodes.h | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lopcodes.h,v 1.53 2000/03/27 14:31:12 roberto Exp roberto $ | 2 | ** $Id: lopcodes.h,v 1.54 2000/04/04 20:48:44 roberto Exp roberto $ |
3 | ** Opcodes for Lua virtual machine | 3 | ** Opcodes for Lua virtual machine |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -105,35 +105,35 @@ OP_PUSHNEGNUM,/* N - -KNUM[u] */ | |||
105 | 105 | ||
106 | OP_PUSHUPVALUE,/* U - Closure[u] */ | 106 | OP_PUSHUPVALUE,/* U - Closure[u] */ |
107 | 107 | ||
108 | OP_PUSHLOCAL,/* L - LOC[u] */ | 108 | OP_GETLOCAL,/* L - LOC[u] */ |
109 | OP_GETGLOBAL,/* K - VAR[KSTR[k]] */ | 109 | OP_GETGLOBAL,/* K - VAR[KSTR[k]] */ |
110 | 110 | ||
111 | OP_GETTABLE,/* - i t t[i] */ | 111 | OP_GETTABLE,/* - i t t[i] */ |
112 | OP_GETDOTTED,/* K t t[KSTR[k]] */ | 112 | OP_GETDOTTED,/* K t t[KSTR[k]] */ |
113 | OP_GETINDEXED,/* L t t[LOC[U]] */ | ||
113 | OP_PUSHSELF,/* K t t t[KSTR[k]] */ | 114 | OP_PUSHSELF,/* K t t t[KSTR[k]] */ |
114 | 115 | ||
115 | OP_CREATETABLE,/* U - newarray(size = u) */ | 116 | OP_CREATETABLE,/* U - newarray(size = u) */ |
116 | 117 | ||
117 | OP_SETLOCAL,/* L x - LOC[u]=x */ | 118 | OP_SETLOCAL,/* L B v_b-v_1 - LOC[L]=v_b */ |
118 | OP_SETGLOBAL,/* K x - VAR[KSTR[k]]=x */ | 119 | OP_SETGLOBAL,/* K x - VAR[KSTR[k]]=x */ |
119 | OP_SETTABLEPOP,/* - v i t - t[i]=v */ | 120 | OP_SETTABLE,/* A B v a_a-a_1 i t a_x-a_1 i t t[i]=v */ |
120 | OP_SETTABLE,/* U v a_u-a_1 i t a_u-a_1 i t t[i]=v */ | ||
121 | 121 | ||
122 | OP_SETLIST,/* A B v_b-v_0 t t t[i+a*FPF]=v_i */ | 122 | OP_SETLIST,/* A B v_b-v_0 t t t[i+a*FPF]=v_i */ |
123 | OP_SETMAP,/* U v_u k_u - v_0 k_0 t t t[k_i]=v_i */ | 123 | OP_SETMAP,/* U v_u k_u - v_0 k_0 t t t[k_i]=v_i */ |
124 | 124 | ||
125 | OP_INCLOCAL,/* sA B - - LOC[B]+=sA */ | 125 | OP_INCLOCAL,/* sA L - - LOC[L]+=sA */ |
126 | OP_ADD,/* - y x x+y */ | 126 | OP_ADD,/* - y x x+y */ |
127 | OP_ADDI,/* S x x+s */ | 127 | OP_ADDI,/* S x x+s */ |
128 | OP_SUB,/* - y x x-y */ | 128 | OP_SUB,/* - y x x-y */ |
129 | OP_MULT,/* - y x x*y */ | 129 | OP_MULT,/* - y x x*y */ |
130 | OP_DIV,/* - y x x/y */ | 130 | OP_DIV,/* - y x x/y */ |
131 | OP_POW,/* - y x x^y */ | 131 | OP_POW,/* - y x x^y */ |
132 | OP_CONC,/* U v_u-v_1 v1..-..v_u */ | 132 | OP_CONCAT,/* U v_u-v_1 v1..-..v_u */ |
133 | OP_MINUS,/* - x -x */ | 133 | OP_MINUS,/* - x -x */ |
134 | OP_NOT,/* - x (x==nil)? 1 : nil */ | 134 | OP_NOT,/* - x (x==nil)? 1 : nil */ |
135 | 135 | ||
136 | OP_JMPNEQ,/* J y x - (x~=y)? PC+=s */ | 136 | OP_JMPNE,/* J y x - (x~=y)? PC+=s */ |
137 | OP_JMPEQ,/* J y x - (x==y)? PC+=s */ | 137 | OP_JMPEQ,/* J y x - (x==y)? PC+=s */ |
138 | OP_JMPLT,/* J y x - (x<y)? PC+=s */ | 138 | OP_JMPLT,/* J y x - (x<y)? PC+=s */ |
139 | OP_JMPLE,/* J y x - (x<y)? PC+=s */ | 139 | OP_JMPLE,/* J y x - (x<y)? PC+=s */ |
@@ -156,7 +156,7 @@ OP_SETLINE/* U - - LINE=u */ | |||
156 | 156 | ||
157 | 157 | ||
158 | 158 | ||
159 | #define ISJUMP(o) (OP_JMPNEQ <= (o) && (o) <= OP_JMP) | 159 | #define ISJUMP(o) (OP_JMPNE <= (o) && (o) <= OP_JMP) |
160 | 160 | ||
161 | 161 | ||
162 | #endif | 162 | #endif |