diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-06-05 11:56:18 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-06-05 11:56:18 -0300 |
commit | dbfb810267d8fd7ecf546ea1e1edc8892547e664 (patch) | |
tree | ca5906c0238233c903f2c9427646e67c74bc7806 /lgc.c | |
parent | 9c14b5e416e1ca3ebed37c4ceb860579124ac29f (diff) | |
download | lua-dbfb810267d8fd7ecf546ea1e1edc8892547e664.tar.gz lua-dbfb810267d8fd7ecf546ea1e1edc8892547e664.tar.bz2 lua-dbfb810267d8fd7ecf546ea1e1edc8892547e664.zip |
cleansing of lparser.c
Diffstat (limited to 'lgc.c')
-rw-r--r-- | lgc.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lgc.c,v 1.52 2000/05/30 18:54:49 roberto Exp roberto $ | 2 | ** $Id: lgc.c,v 1.53 2000/05/30 19:00:31 roberto Exp roberto $ |
3 | ** Garbage Collector | 3 | ** Garbage Collector |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -34,10 +34,15 @@ static void protomark (lua_State *L, Proto *f) { | |||
34 | int i; | 34 | int i; |
35 | f->marked = 1; | 35 | f->marked = 1; |
36 | strmark(L, f->source); | 36 | strmark(L, f->source); |
37 | for (i=f->nkstr-1; i>=0; i--) | 37 | for (i=0; i<f->nkstr; i++) |
38 | strmark(L, f->kstr[i]); | 38 | strmark(L, f->kstr[i]); |
39 | for (i=f->nkproto-1; i>=0; i--) | 39 | for (i=0; i<f->nkproto; i++) |
40 | protomark(L, f->kproto[i]); | 40 | protomark(L, f->kproto[i]); |
41 | if (f->locvars) { /* is there debug information? */ | ||
42 | LocVar *lv; | ||
43 | for (lv=f->locvars; lv->line != -1; lv++) /* mark local-variable names */ | ||
44 | if (lv->varname) strmark(L, lv->varname); | ||
45 | } | ||
41 | } | 46 | } |
42 | } | 47 | } |
43 | 48 | ||