mirror of
https://github.com/love2d/megasource.git
synced 2026-08-19 20:20:11 +02:00
Update LuaJIT to the latest 2.1.0 source (f3c8569)
This commit is contained in:
+10
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
** Garbage collector.
|
||||
** Copyright (C) 2005-2020 Mike Pall. See Copyright Notice in luajit.h
|
||||
** Copyright (C) 2005-2021 Mike Pall. See Copyright Notice in luajit.h
|
||||
**
|
||||
** Major portions taken verbatim or adapted from the Lua interpreter.
|
||||
** Copyright (C) 1994-2008 Lua.org, PUC-Rio. See Copyright Notice in lua.h
|
||||
@@ -65,6 +65,15 @@ static void gc_mark(global_State *g, GCobj *o)
|
||||
gray2black(o); /* Userdata are never gray. */
|
||||
if (mt) gc_markobj(g, mt);
|
||||
gc_markobj(g, tabref(gco2ud(o)->env));
|
||||
if (LJ_HASBUFFER && gco2ud(o)->udtype == UDTYPE_BUFFER) {
|
||||
SBufExt *sbx = (SBufExt *)uddata(gco2ud(o));
|
||||
if (sbufiscow(sbx) && gcref(sbx->cowref))
|
||||
gc_markobj(g, gcref(sbx->cowref));
|
||||
if (gcref(sbx->dict_str))
|
||||
gc_markobj(g, gcref(sbx->dict_str));
|
||||
if (gcref(sbx->dict_mt))
|
||||
gc_markobj(g, gcref(sbx->dict_mt));
|
||||
}
|
||||
} else if (LJ_UNLIKELY(gct == ~LJ_TUPVAL)) {
|
||||
GCupval *uv = gco2uv(o);
|
||||
gc_marktv(g, uvval(uv));
|
||||
|
||||
Reference in New Issue
Block a user