diff options
Diffstat (limited to '')
| -rw-r--r-- | lvm.c | 34 |
1 files changed, 17 insertions, 17 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lvm.c,v 1.82 2000/01/24 20:14:07 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 1.83 2000/01/25 13:57:18 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 | */ |
| @@ -314,7 +314,7 @@ StkId luaV_execute (lua_State *L, const Closure *cl, const TProtoFunc *tf, | |||
| 314 | StkId base) { | 314 | StkId base) { |
| 315 | register StkId top; /* keep top local, for performance */ | 315 | register StkId top; /* keep top local, for performance */ |
| 316 | register const Byte *pc = tf->code; | 316 | register const Byte *pc = tf->code; |
| 317 | TaggedString **strcnst = tf->strcnst; | 317 | TaggedString **kstr = tf->kstr; |
| 318 | if (L->callhook) | 318 | if (L->callhook) |
| 319 | luaD_callHook(L, base-1, L->callhook, "call"); | 319 | luaD_callHook(L, base-1, L->callhook, "call"); |
| 320 | luaD_checkstack(L, (*pc++)+EXTRA_STACK); | 320 | luaD_checkstack(L, (*pc++)+EXTRA_STACK); |
| @@ -358,31 +358,31 @@ StkId luaV_execute (lua_State *L, const Closure *cl, const TProtoFunc *tf, | |||
| 358 | top -= aux; | 358 | top -= aux; |
| 359 | break; | 359 | break; |
| 360 | 360 | ||
| 361 | case PUSHNUMBERW: aux += highbyte(L, *pc++); | 361 | case PUSHINTW: aux += highbyte(L, *pc++); |
| 362 | case PUSHNUMBER: aux += *pc++; | 362 | case PUSHINT: aux += *pc++; |
| 363 | ttype(top) = LUA_T_NUMBER; | 363 | ttype(top) = LUA_T_NUMBER; |
| 364 | nvalue(top) = aux; | 364 | nvalue(top) = aux; |
| 365 | top++; | 365 | top++; |
| 366 | break; | 366 | break; |
| 367 | 367 | ||
| 368 | case PUSHNUMBERNEGW: aux += highbyte(L, *pc++); | 368 | case PUSHINTNEGW: aux += highbyte(L, *pc++); |
| 369 | case PUSHNUMBERNEG: aux += *pc++; | 369 | case PUSHINTNEG: aux += *pc++; |
| 370 | ttype(top) = LUA_T_NUMBER; | 370 | ttype(top) = LUA_T_NUMBER; |
| 371 | nvalue(top) = -aux; | 371 | nvalue(top) = -aux; |
| 372 | top++; | 372 | top++; |
| 373 | break; | 373 | break; |
| 374 | 374 | ||
| 375 | case PUSHSTRCNSTW: aux += highbyte(L, *pc++); | 375 | case PUSHSTRINGW: aux += highbyte(L, *pc++); |
| 376 | case PUSHSTRCNST: aux += *pc++; | 376 | case PUSHSTRING: aux += *pc++; |
| 377 | ttype(top) = LUA_T_STRING; | 377 | ttype(top) = LUA_T_STRING; |
| 378 | tsvalue(top) = strcnst[aux]; | 378 | tsvalue(top) = kstr[aux]; |
| 379 | top++; | 379 | top++; |
| 380 | break; | 380 | break; |
| 381 | 381 | ||
| 382 | case PUSHNUMCNSTW: aux += highbyte(L, *pc++); | 382 | case PUSHNUMBERW: aux += highbyte(L, *pc++); |
| 383 | case PUSHNUMCNST: aux += *pc++; | 383 | case PUSHNUMBER: aux += *pc++; |
| 384 | ttype(top) = LUA_T_NUMBER; | 384 | ttype(top) = LUA_T_NUMBER; |
| 385 | nvalue(top) = tf->numcnst[aux]; | 385 | nvalue(top) = tf->knum[aux]; |
| 386 | top++; | 386 | top++; |
| 387 | break; | 387 | break; |
| 388 | 388 | ||
| @@ -396,7 +396,7 @@ StkId luaV_execute (lua_State *L, const Closure *cl, const TProtoFunc *tf, | |||
| 396 | 396 | ||
| 397 | case GETGLOBALW: aux += highbyte(L, *pc++); | 397 | case GETGLOBALW: aux += highbyte(L, *pc++); |
| 398 | case GETGLOBAL: aux += *pc++; | 398 | case GETGLOBAL: aux += *pc++; |
| 399 | luaV_getglobal(L, strcnst[aux]->u.s.gv, top); | 399 | luaV_getglobal(L, kstr[aux]->u.s.gv, top); |
| 400 | top++; | 400 | top++; |
| 401 | break; | 401 | break; |
| 402 | 402 | ||
| @@ -408,7 +408,7 @@ StkId luaV_execute (lua_State *L, const Closure *cl, const TProtoFunc *tf, | |||
| 408 | case GETDOTTEDW: aux += highbyte(L, *pc++); | 408 | case GETDOTTEDW: aux += highbyte(L, *pc++); |
| 409 | case GETDOTTED: aux += *pc++; | 409 | case GETDOTTED: aux += *pc++; |
| 410 | ttype(top) = LUA_T_STRING; | 410 | ttype(top) = LUA_T_STRING; |
| 411 | tsvalue(top++) = strcnst[aux]; | 411 | tsvalue(top++) = kstr[aux]; |
| 412 | luaV_gettable(L, top); | 412 | luaV_gettable(L, top); |
| 413 | top--; | 413 | top--; |
| 414 | break; | 414 | break; |
| @@ -418,7 +418,7 @@ StkId luaV_execute (lua_State *L, const Closure *cl, const TProtoFunc *tf, | |||
| 418 | TObject receiver; | 418 | TObject receiver; |
| 419 | receiver = *(top-1); | 419 | receiver = *(top-1); |
| 420 | ttype(top) = LUA_T_STRING; | 420 | ttype(top) = LUA_T_STRING; |
| 421 | tsvalue(top++) = strcnst[aux]; | 421 | tsvalue(top++) = kstr[aux]; |
| 422 | luaV_gettable(L, top); | 422 | luaV_gettable(L, top); |
| 423 | *(top-1) = receiver; | 423 | *(top-1) = receiver; |
| 424 | break; | 424 | break; |
| @@ -439,7 +439,7 @@ StkId luaV_execute (lua_State *L, const Closure *cl, const TProtoFunc *tf, | |||
| 439 | 439 | ||
| 440 | case SETGLOBALW: aux += highbyte(L, *pc++); | 440 | case SETGLOBALW: aux += highbyte(L, *pc++); |
| 441 | case SETGLOBAL: aux += *pc++; | 441 | case SETGLOBAL: aux += *pc++; |
| 442 | luaV_setglobal(L, strcnst[aux]->u.s.gv, top); | 442 | luaV_setglobal(L, kstr[aux]->u.s.gv, top); |
| 443 | top--; | 443 | top--; |
| 444 | break; | 444 | break; |
| 445 | 445 | ||
| @@ -632,7 +632,7 @@ StkId luaV_execute (lua_State *L, const Closure *cl, const TProtoFunc *tf, | |||
| 632 | case CLOSUREW: aux += highbyte(L, *pc++); | 632 | case CLOSUREW: aux += highbyte(L, *pc++); |
| 633 | case CLOSURE: aux += *pc++; | 633 | case CLOSURE: aux += *pc++; |
| 634 | ttype(top) = LUA_T_LPROTO; | 634 | ttype(top) = LUA_T_LPROTO; |
| 635 | tfvalue(top) = tf->protocnst[aux]; | 635 | tfvalue(top) = tf->kproto[aux]; |
| 636 | L->top = ++top; | 636 | L->top = ++top; |
| 637 | aux = *pc++; /* number of upvalues */ | 637 | aux = *pc++; /* number of upvalues */ |
| 638 | luaV_closure(L, aux); | 638 | luaV_closure(L, aux); |
