diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-01-22 16:08:03 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-01-22 16:08:03 -0200 |
| commit | 67b44c9493c7eb1882a9a059b8b39ed350b5b635 (patch) | |
| tree | 59679c801011dc35bd584423ac747126a332c2d2 | |
| parent | 758a38164481891acb1dd07003c1726554034d67 (diff) | |
| download | lua-67b44c9493c7eb1882a9a059b8b39ed350b5b635.tar.gz lua-67b44c9493c7eb1882a9a059b8b39ed350b5b635.tar.bz2 lua-67b44c9493c7eb1882a9a059b8b39ed350b5b635.zip | |
local names are all in the constant pool, so they do not need to be
marked in GC.
| -rw-r--r-- | lgc.c | 11 |
1 files changed, 2 insertions, 9 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lgc.c,v 1.18 1998/03/09 21:49:52 roberto Exp roberto $ | 2 | ** $Id: lgc.c,v 1.19 1998/07/12 16:10:38 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 | */ |
| @@ -163,20 +163,13 @@ static void strmark (TaggedString *s) | |||
| 163 | } | 163 | } |
| 164 | 164 | ||
| 165 | 165 | ||
| 166 | static void protomark (TProtoFunc *f) | 166 | static void protomark (TProtoFunc *f) { |
| 167 | { | ||
| 168 | if (!f->head.marked) { | 167 | if (!f->head.marked) { |
| 169 | LocVar *v = f->locvars; | ||
| 170 | int i; | 168 | int i; |
| 171 | f->head.marked = 1; | 169 | f->head.marked = 1; |
| 172 | strmark(f->fileName); | 170 | strmark(f->fileName); |
| 173 | for (i=0; i<f->nconsts; i++) | 171 | for (i=0; i<f->nconsts; i++) |
| 174 | markobject(&f->consts[i]); | 172 | markobject(&f->consts[i]); |
| 175 | if (v) { | ||
| 176 | for (; v->line != -1; v++) | ||
| 177 | if (v->varname) | ||
| 178 | strmark(v->varname); | ||
| 179 | } | ||
| 180 | } | 173 | } |
| 181 | } | 174 | } |
| 182 | 175 | ||
