diff options
author | Mike Pall <mike> | 2010-02-05 00:52:21 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2010-02-05 00:52:21 +0100 |
commit | d7789821208336a7fe6e0b6d706b6b4844e6fa9e (patch) | |
tree | f6b3c28815c0dec1164ec851d10f76cf8cb62102 /src/lj_gc.c | |
parent | c8d55e850624bc237532fd103d1591b64d291081 (diff) | |
download | luajit-d7789821208336a7fe6e0b6d706b6b4844e6fa9e.tar.gz luajit-d7789821208336a7fe6e0b6d706b6b4844e6fa9e.tar.bz2 luajit-d7789821208336a7fe6e0b6d706b6b4844e6fa9e.zip |
32/64 bit memory ref cleanup, part 2: GCproto ->uvname and ->chunkname.
Diffstat (limited to 'src/lj_gc.c')
-rw-r--r-- | src/lj_gc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lj_gc.c b/src/lj_gc.c index 9f0ff2b6..3c1b847a 100644 --- a/src/lj_gc.c +++ b/src/lj_gc.c | |||
@@ -251,13 +251,13 @@ static void gc_traverse_proto(global_State *g, GCproto *pt) | |||
251 | } | 251 | } |
252 | #endif | 252 | #endif |
253 | /* GC during prototype creation could cause NULL fields. */ | 253 | /* GC during prototype creation could cause NULL fields. */ |
254 | if (pt->chunkname) | 254 | if (gcref(pt->chunkname)) |
255 | gc_mark_str(pt->chunkname); | 255 | gc_mark_str(proto_chunkname(pt)); |
256 | for (i = -(ptrdiff_t)pt->sizekgc; i < 0; i++) /* Mark collectable consts. */ | 256 | for (i = -(ptrdiff_t)pt->sizekgc; i < 0; i++) /* Mark collectable consts. */ |
257 | gc_markobj(g, proto_kgc(pt, i)); | 257 | gc_markobj(g, proto_kgc(pt, i)); |
258 | for (i = 0; i < (ptrdiff_t)pt->sizeuvname; i++) /* Mark upvalue names. */ | 258 | for (i = 0; i < (ptrdiff_t)pt->sizeuvname; i++) /* Mark upvalue names. */ |
259 | if (pt->uvname[i]) | 259 | if (proto_uvname(pt, i)) |
260 | gc_mark_str(pt->uvname[i]); | 260 | gc_mark_str(gco2str(proto_uvname(pt, i))); |
261 | for (i = 0; i < (ptrdiff_t)pt->sizevarinfo; i++) /* Mark names of locals. */ | 261 | for (i = 0; i < (ptrdiff_t)pt->sizevarinfo; i++) /* Mark names of locals. */ |
262 | if (pt->varinfo[i].name) | 262 | if (pt->varinfo[i].name) |
263 | gc_mark_str(pt->varinfo[i].name); | 263 | gc_mark_str(pt->varinfo[i].name); |
@@ -332,7 +332,7 @@ static size_t propagatemark(global_State *g) | |||
332 | sizeof(uint16_t) * pt->sizeuv + | 332 | sizeof(uint16_t) * pt->sizeuv + |
333 | sizeof(int32_t) * pt->sizelineinfo + | 333 | sizeof(int32_t) * pt->sizelineinfo + |
334 | sizeof(VarInfo) * pt->sizevarinfo + | 334 | sizeof(VarInfo) * pt->sizevarinfo + |
335 | sizeof(GCstr *) * pt->sizeuvname; | 335 | sizeof(GCRef) * pt->sizeuvname; |
336 | } else { | 336 | } else { |
337 | lua_State *th = gco2th(o); | 337 | lua_State *th = gco2th(o); |
338 | setgcrefr(th->gclist, g->gc.grayagain); | 338 | setgcrefr(th->gclist, g->gc.grayagain); |