diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-06-05 15:17:01 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-06-05 15:17:01 -0300 |
| commit | 762d059a13d83eb367238a6115bbb4f5f13fcb49 (patch) | |
| tree | f35fdf0675b791865d0d4800522b172903b34803 /lgc.c | |
| parent | 572a69b6afbd368beab8844bc876b0f9690b5253 (diff) | |
| download | lua-762d059a13d83eb367238a6115bbb4f5f13fcb49.tar.gz lua-762d059a13d83eb367238a6115bbb4f5f13fcb49.tar.bz2 lua-762d059a13d83eb367238a6115bbb4f5f13fcb49.zip | |
new implementation for the Virtual Machine
Diffstat (limited to 'lgc.c')
| -rw-r--r-- | lgc.c | 8 |
1 files changed, 5 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lgc.c,v 1.96 2001/04/11 14:42:41 roberto Exp roberto $ | 2 | ** $Id: lgc.c,v 1.97 2001/04/17 17:35:54 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 | */ |
| @@ -48,8 +48,10 @@ static void protomark (Proto *f) { | |||
| 48 | int i; | 48 | int i; |
| 49 | f->marked = 1; | 49 | f->marked = 1; |
| 50 | strmark(f->source); | 50 | strmark(f->source); |
| 51 | for (i=0; i<f->sizekstr; i++) | 51 | for (i=0; i<f->sizek; i++) { |
| 52 | strmark(f->kstr[i]); | 52 | if (ttype(f->k+i) == LUA_TSTRING) |
| 53 | strmark(tsvalue(f->k+i)); | ||
| 54 | } | ||
| 53 | for (i=0; i<f->sizekproto; i++) | 55 | for (i=0; i<f->sizekproto; i++) |
| 54 | protomark(f->kproto[i]); | 56 | protomark(f->kproto[i]); |
| 55 | for (i=0; i<f->sizelocvars; i++) /* mark local-variable names */ | 57 | for (i=0; i<f->sizelocvars; i++) /* mark local-variable names */ |
