diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-02-09 16:01:55 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-02-09 16:01:55 -0200 |
commit | b82ff713e321f4b65b2dc41fc1fe97633f7b197d (patch) | |
tree | 4b879a95ef1b9eedd9e13d9536452d7525f197d1 | |
parent | 77113ee02f383848cd4877e2780c36ffb4405b84 (diff) | |
download | lua-b82ff713e321f4b65b2dc41fc1fe97633f7b197d.tar.gz lua-b82ff713e321f4b65b2dc41fc1fe97633f7b197d.tar.bz2 lua-b82ff713e321f4b65b2dc41fc1fe97633f7b197d.zip |
new name for opcode
-rw-r--r-- | lopcodes.h | 6 | ||||
-rw-r--r-- | lparser.c | 4 | ||||
-rw-r--r-- | lvm.c | 6 |
3 files changed, 8 insertions, 8 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lopcodes.h,v 1.23 1999/02/08 18:54:19 roberto Exp roberto $ | 2 | ** $Id: lopcodes.h,v 1.24 1999/02/09 15:58:45 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 | */ |
@@ -27,8 +27,8 @@ POPDUP,/* b v v TOP-=b */ | |||
27 | PUSHNUMBERW,/* w - (float)w */ | 27 | PUSHNUMBERW,/* w - (float)w */ |
28 | PUSHNUMBER,/* b - (float)b */ | 28 | PUSHNUMBER,/* b - (float)b */ |
29 | 29 | ||
30 | PUSHNEGW,/* w - (float)-w */ | 30 | PUSHNUMBERNEGW,/* w - (float)-w */ |
31 | PUSHNEG,/* b - (float)-b */ | 31 | PUSHNUMBERNEG,/* b - (float)-b */ |
32 | 32 | ||
33 | PUSHCONSTANTW,/*w - CNST[w] */ | 33 | PUSHCONSTANTW,/*w - CNST[w] */ |
34 | PUSHCONSTANT,/* b - CNST[b] */ | 34 | PUSHCONSTANT,/* b - CNST[b] */ |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lparser.c,v 1.18 1999/02/08 18:54:19 roberto Exp roberto $ | 2 | ** $Id: lparser.c,v 1.19 1999/02/09 15:59:10 roberto Exp roberto $ |
3 | ** LL(1) Parser and code generator for Lua | 3 | ** LL(1) Parser and code generator for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -270,7 +270,7 @@ static void code_number (LexState *ls, real f) { | |||
270 | real af = (f<0) ? -f : f; | 270 | real af = (f<0) ? -f : f; |
271 | if (0 <= af && af <= (real)MAX_WORD && (int)af == af) { | 271 | if (0 <= af && af <= (real)MAX_WORD && (int)af == af) { |
272 | /* abs(f) has a short integer value */ | 272 | /* abs(f) has a short integer value */ |
273 | code_oparg(ls, (f<0) ? PUSHNEG : PUSHNUMBER, (int)af, 1); | 273 | code_oparg(ls, (f<0) ? PUSHNUMBERNEG : PUSHNUMBER, (int)af, 1); |
274 | } | 274 | } |
275 | else | 275 | else |
276 | code_constant(ls, real_constant(ls->fs, f)); | 276 | code_constant(ls, real_constant(ls->fs, f)); |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.c,v 1.47 1999/02/08 18:54:19 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 1.48 1999/02/09 15:58:45 roberto Exp roberto $ |
3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -359,8 +359,8 @@ StkId luaV_execute (Closure *cl, TProtoFunc *tf, StkId base) { | |||
359 | S->top++; | 359 | S->top++; |
360 | break; | 360 | break; |
361 | 361 | ||
362 | case PUSHNEGW: aux += highbyte(*pc++); | 362 | case PUSHNUMBERNEGW: aux += highbyte(*pc++); |
363 | case PUSHNEG: aux += *pc++; | 363 | case PUSHNUMBERNEG: aux += *pc++; |
364 | ttype(S->top) = LUA_T_NUMBER; | 364 | ttype(S->top) = LUA_T_NUMBER; |
365 | nvalue(S->top) = -aux; | 365 | nvalue(S->top) = -aux; |
366 | S->top++; | 366 | S->top++; |