diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-08-12 14:23:12 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-08-12 14:23:12 -0300 |
commit | 8e4ac679ffce4a2d59b0a404473275411854f598 (patch) | |
tree | 8758db19adc160f2366d40f2d39287611a3d4279 /lvm.c | |
parent | 221b5be7b78dc401d4fac49df534f7ff68c04d58 (diff) | |
download | lua-8e4ac679ffce4a2d59b0a404473275411854f598.tar.gz lua-8e4ac679ffce4a2d59b0a404473275411854f598.tar.bz2 lua-8e4ac679ffce4a2d59b0a404473275411854f598.zip |
use a linear count for count hook
Diffstat (limited to 'lvm.c')
-rw-r--r-- | lvm.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.c,v 1.250 2002/08/07 14:24:24 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 1.251 2002/08/07 19:22:39 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 | */ |
@@ -70,8 +70,8 @@ int luaV_tostring (lua_State *L, TObject *obj) { | |||
70 | 70 | ||
71 | 71 | ||
72 | static void traceexec (lua_State *L) { | 72 | static void traceexec (lua_State *L) { |
73 | int mask = L->hookmask; | 73 | unsigned long mask = L->hookmask; |
74 | if (mask > LUA_MASKLINE) { /* instruction hook set? */ | 74 | if (mask > LUA_MASKLINE) { /* instruction-hook set? */ |
75 | if (L->hookcount == 0) { | 75 | if (L->hookcount == 0) { |
76 | luaD_callhook(L, LUA_HOOKCOUNT, -1); | 76 | luaD_callhook(L, LUA_HOOKCOUNT, -1); |
77 | resethookcount(L); | 77 | resethookcount(L); |
@@ -92,7 +92,6 @@ static void traceexec (lua_State *L) { | |||
92 | ci = L->ci; /* previous call may reallocate `ci' */ | 92 | ci = L->ci; /* previous call may reallocate `ci' */ |
93 | } | 93 | } |
94 | ci->u.l.savedpc = *ci->u.l.pc; | 94 | ci->u.l.savedpc = *ci->u.l.pc; |
95 | ci->state |= CI_SAVEDPC; /* `savedpc' is updated */ | ||
96 | } | 95 | } |
97 | } | 96 | } |
98 | 97 | ||