diff options
| -rw-r--r-- | lvm.c | 10 |
1 files changed, 1 insertions, 9 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lvm.c,v 1.281 2003/03/07 13:21:31 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 1.282 2003/03/11 12:30:37 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 | */ |
| @@ -394,21 +394,15 @@ static void Arith (lua_State *L, StkId ra, | |||
| 394 | #define dojump(pc, i) ((pc) += (i)) | 394 | #define dojump(pc, i) ((pc) += (i)) |
| 395 | 395 | ||
| 396 | 396 | ||
| 397 | unsigned int count = 0; | ||
| 398 | |||
| 399 | StkId luaV_execute (lua_State *L) { | 397 | StkId luaV_execute (lua_State *L) { |
| 400 | LClosure *cl; | 398 | LClosure *cl; |
| 401 | TObject *k; | 399 | TObject *k; |
| 402 | const Instruction *pc; | 400 | const Instruction *pc; |
| 403 | unsigned int ii, ic, ir, io; | ||
| 404 | ii = count; | ||
| 405 | callentry: /* entry point when calling new functions */ | 401 | callentry: /* entry point when calling new functions */ |
| 406 | ic = count; | ||
| 407 | L->ci->u.l.pc = &pc; | 402 | L->ci->u.l.pc = &pc; |
| 408 | if (L->hookmask & LUA_MASKCALL) | 403 | if (L->hookmask & LUA_MASKCALL) |
| 409 | luaD_callhook(L, LUA_HOOKCALL, -1); | 404 | luaD_callhook(L, LUA_HOOKCALL, -1); |
| 410 | retentry: /* entry point when returning to old functions */ | 405 | retentry: /* entry point when returning to old functions */ |
| 411 | ir = count; | ||
| 412 | lua_assert(L->ci->state == CI_SAVEDPC || | 406 | lua_assert(L->ci->state == CI_SAVEDPC || |
| 413 | L->ci->state == (CI_SAVEDPC | CI_CALLING)); | 407 | L->ci->state == (CI_SAVEDPC | CI_CALLING)); |
| 414 | L->ci->state = CI_HASFRAME; /* activate frame */ | 408 | L->ci->state = CI_HASFRAME; /* activate frame */ |
| @@ -419,7 +413,6 @@ ir = count; | |||
| 419 | for (;;) { | 413 | for (;;) { |
| 420 | const Instruction i = *pc++; | 414 | const Instruction i = *pc++; |
| 421 | StkId base, ra; | 415 | StkId base, ra; |
| 422 | count++; | ||
| 423 | if ((L->hookmask & (LUA_MASKLINE | LUA_MASKCOUNT)) && | 416 | if ((L->hookmask & (LUA_MASKLINE | LUA_MASKCOUNT)) && |
| 424 | (--L->hookcount == 0 || L->hookmask & LUA_MASKLINE)) { | 417 | (--L->hookcount == 0 || L->hookmask & LUA_MASKLINE)) { |
| 425 | traceexec(L); | 418 | traceexec(L); |
| @@ -668,7 +661,6 @@ count++; | |||
| 668 | case OP_RETURN: { | 661 | case OP_RETURN: { |
| 669 | CallInfo *ci = L->ci - 1; /* previous function frame */ | 662 | CallInfo *ci = L->ci - 1; /* previous function frame */ |
| 670 | int b = GETARG_B(i); | 663 | int b = GETARG_B(i); |
| 671 | io = count; | ||
| 672 | if (b != 0) L->top = ra+b-1; | 664 | if (b != 0) L->top = ra+b-1; |
| 673 | lua_assert(L->ci->state & CI_HASFRAME); | 665 | lua_assert(L->ci->state & CI_HASFRAME); |
| 674 | if (L->openupval) luaF_close(L, base); | 666 | if (L->openupval) luaF_close(L, base); |
