aboutsummaryrefslogtreecommitdiff
path: root/lvm.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-08-08 17:42:07 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-08-08 17:42:07 -0300
commit0802a9df9e9326c5e61f0d6b69685c2c253de5f2 (patch)
treec0f34b8fbf79694ea3d5f9d98f14680ba74a2b14 /lvm.c
parentf90bc248b3c3c18941a96038b2a7517ad571d8b1 (diff)
downloadlua-0802a9df9e9326c5e61f0d6b69685c2c253de5f2.tar.gz
lua-0802a9df9e9326c5e61f0d6b69685c2c253de5f2.tar.bz2
lua-0802a9df9e9326c5e61f0d6b69685c2c253de5f2.zip
no more options for debug information: it is always on
Diffstat (limited to 'lvm.c')
-rw-r--r--lvm.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/lvm.c b/lvm.c
index 0ea8ea9f..1a7629de 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lvm.c,v 1.120 2000/06/30 14:35:17 roberto Exp roberto $ 2** $Id: lvm.c,v 1.121 2000/08/08 18:26:05 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*/
@@ -71,19 +71,17 @@ static void traceexec (lua_State *L, StkId base, StkId top, lua_Hook linehook) {
71 CallInfo *ci = infovalue(base-1); 71 CallInfo *ci = infovalue(base-1);
72 int *lineinfo = ci->func->f.l->lineinfo; 72 int *lineinfo = ci->func->f.l->lineinfo;
73 int pc = (*ci->pc - 1) - ci->func->f.l->code; 73 int pc = (*ci->pc - 1) - ci->func->f.l->code;
74 if (lineinfo) { 74 int newline;
75 int newline; 75 if (ci->line == 0) { /* first time? */
76 if (ci->line == 0) { /* first time? */ 76 ci->line = 1;
77 ci->line = 1; 77 ci->refi = 0;
78 ci->refi = 0; 78 }
79 } 79 newline = luaG_getline(lineinfo, pc, ci->line, &ci->refi);
80 newline = luaG_getline(lineinfo, pc, ci->line, &ci->refi); 80 /* calls linehook when enters a new line or jumps back (loop) */
81 /* calls linehook when enters a new line or jumps back (loop) */ 81 if (newline != ci->line || pc <= ci->lastpc) {
82 if (newline != ci->line || pc <= ci->lastpc) { 82 ci->line = newline;
83 ci->line = newline; 83 L->top = top;
84 L->top = top; 84 luaD_lineHook(L, base-2, newline, linehook);
85 luaD_lineHook(L, base-2, newline, linehook);
86 }
87 } 85 }
88 ci->lastpc = pc; 86 ci->lastpc = pc;
89} 87}