diff options
Diffstat (limited to 'lvm.c')
-rw-r--r-- | lvm.c | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.c,v 1.46 1999/02/08 17:07:59 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 1.47 1999/02/08 18:54:19 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 | */ |
@@ -355,7 +355,14 @@ StkId luaV_execute (Closure *cl, TProtoFunc *tf, StkId base) { | |||
355 | case PUSHNUMBERW: aux += highbyte(*pc++); | 355 | case PUSHNUMBERW: aux += highbyte(*pc++); |
356 | case PUSHNUMBER: aux += *pc++; | 356 | case PUSHNUMBER: aux += *pc++; |
357 | ttype(S->top) = LUA_T_NUMBER; | 357 | ttype(S->top) = LUA_T_NUMBER; |
358 | nvalue(S->top) = aux-NUMOFFSET; | 358 | nvalue(S->top) = aux; |
359 | S->top++; | ||
360 | break; | ||
361 | |||
362 | case PUSHNEGW: aux += highbyte(*pc++); | ||
363 | case PUSHNEG: aux += *pc++; | ||
364 | ttype(S->top) = LUA_T_NUMBER; | ||
365 | nvalue(S->top) = -aux; | ||
359 | S->top++; | 366 | S->top++; |
360 | break; | 367 | break; |
361 | 368 | ||
@@ -429,7 +436,7 @@ StkId luaV_execute (Closure *cl, TProtoFunc *tf, StkId base) { | |||
429 | S->top -= 2; /* pop table and index */ | 436 | S->top -= 2; /* pop table and index */ |
430 | break; | 437 | break; |
431 | 438 | ||
432 | case SETTABPPDUP: { | 439 | case SETTABLEPOPDUP: { |
433 | TObject temp = *(S->top-1); | 440 | TObject temp = *(S->top-1); |
434 | luaV_settable(S->top-3); | 441 | luaV_settable(S->top-3); |
435 | S->top--; /* pop index (temp goes into "table" position) */ | 442 | S->top--; /* pop index (temp goes into "table" position) */ |
@@ -605,7 +612,8 @@ StkId luaV_execute (Closure *cl, TProtoFunc *tf, StkId base) { | |||
605 | if (ttype(--S->top) == LUA_T_NIL) pc -= aux; | 612 | if (ttype(--S->top) == LUA_T_NIL) pc -= aux; |
606 | break; | 613 | break; |
607 | 614 | ||
608 | case CLOSURE: aux = *pc++; | 615 | case CLOSUREW: aux += highbyte(*pc++); |
616 | case CLOSURE: aux += *pc++; | ||
609 | *S->top++ = consts[aux]; | 617 | *S->top++ = consts[aux]; |
610 | luaV_closure(*pc++); | 618 | luaV_closure(*pc++); |
611 | luaC_checkGC(); | 619 | luaC_checkGC(); |