diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-05-02 10:06:20 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-05-02 10:06:20 -0300 |
commit | 9a0f0dcc77adbde0618af1f10e5d430f42b76cc2 (patch) | |
tree | 04162ec7fc538fc3054ffa7fb4c5e0181c3f3571 /lvm.c | |
parent | 751cd867d3e0338279fa6f3390c8b7ddc0108659 (diff) | |
download | lua-9a0f0dcc77adbde0618af1f10e5d430f42b76cc2.tar.gz lua-9a0f0dcc77adbde0618af1f10e5d430f42b76cc2.tar.bz2 lua-9a0f0dcc77adbde0618af1f10e5d430f42b76cc2.zip |
precompiler may create functions without `lineinfo'
Diffstat (limited to 'lvm.c')
-rw-r--r-- | lvm.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.c,v 1.226 2002/04/22 14:40:23 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 1.227 2002/04/24 20:07:46 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 | */ |
@@ -65,11 +65,11 @@ int luaV_tostring (lua_State *L, TObject *obj) { | |||
65 | static void traceexec (lua_State *L) { | 65 | static void traceexec (lua_State *L) { |
66 | CallInfo *ci = L->ci; | 66 | CallInfo *ci = L->ci; |
67 | Proto *p = ci_func(ci)->l.p; | 67 | Proto *p = ci_func(ci)->l.p; |
68 | int newline = p->lineinfo[pcRel(*ci->pc, p)]; | 68 | int newline = getline(p, pcRel(*ci->pc, p)); |
69 | if (pcRel(*ci->pc, p) == 0) /* tracing may be starting now? */ | 69 | if (pcRel(*ci->pc, p) == 0) /* tracing may be starting now? */ |
70 | ci->savedpc = *ci->pc; /* initialize `savedpc' */ | 70 | ci->savedpc = *ci->pc; /* initialize `savedpc' */ |
71 | /* calls linehook when enters a new line or jumps back (loop) */ | 71 | /* calls linehook when enters a new line or jumps back (loop) */ |
72 | if (*ci->pc <= ci->savedpc || newline != p->lineinfo[pcRel(ci->savedpc, p)]) { | 72 | if (*ci->pc <= ci->savedpc || newline != getline(p, pcRel(ci->savedpc, p))) { |
73 | luaD_lineHook(L, newline); | 73 | luaD_lineHook(L, newline); |
74 | ci = L->ci; /* previous call may reallocate `ci' */ | 74 | ci = L->ci; /* previous call may reallocate `ci' */ |
75 | } | 75 | } |