|
native Lua
0.5.0-devel
Lua on the platform you use with the compiler you choose
|
#include "lprefix.h"#include <stdio.h>#include <string.h>#include "lua.h"#include "ldebug.h"#include "ldo.h"#include "lfunc.h"#include "lgc.h"#include "lmem.h"#include "lobject.h"#include "lstate.h"#include "lstring.h"#include "ltable.h"#include "ltm.h"
Macros | |
| #define | lgc_c |
| #define | LUA_CORE |
| #define | GCSWEEPMAX 100 |
| #define | GCFINMAX 10 |
| #define | GCFINALIZECOST 50 |
| #define | WORK2MEM sizeof(TValue) |
| #define | PAUSEADJ 100 |
| #define | maskcolors (~(bitmask(BLACKBIT) | WHITEBITS | AGEBITS)) |
| #define | makewhite(g, x) (x->marked = cast_byte((x->marked & maskcolors) | luaC_white(g))) |
| #define | white2gray(x) resetbits(x->marked, WHITEBITS) |
| #define | black2gray(x) resetbit(x->marked, BLACKBIT) |
| #define | valiswhite(x) (iscollectable(x) && iswhite(gcvalue(x))) |
| #define | keyiswhite(n) (keyiscollectable(n) && iswhite(gckey(n))) |
| #define | checkconsistency(obj) lua_longassert(!iscollectable(obj) || righttt(obj)) |
| #define | gcvalueN(o) (iscollectable(o) ? gcvalue(o) : NULL) |
| #define | markvalue(g, o) |
| #define | markkey(g, n) { if keyiswhite(n) reallymarkobject(g,gckey(n)); } |
| #define | markobject(g, t) { if (iswhite(t)) reallymarkobject(g, obj2gco(t)); } |
| #define | markobjectN(g, t) { if (t) markobject(g,t); } |
| #define | gnodelast(h) gnode(h, cast_sizet(sizenode(h))) |
| #define | linkgclist(o, p) ((o)->gclist = (p), (p) = obj2gco(o)) |
| #define | linkobjgclist(o, p) (*getgclist(o) = (p), (p) = obj2gco(o)) |
| #define | maskgencolors (~(bitmask(BLACKBIT) | WHITEBITS)) |
Functions | |
| void | luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v) |
| void | luaC_barrierback_ (lua_State *L, GCObject *o) |
| void | luaC_fix (lua_State *L, GCObject *o) |
| GCObject * | luaC_newobj (lua_State *L, int tt, size_t sz) |
| void | luaC_checkfinalizer (lua_State *L, GCObject *o, Table *mt) |
| void | luaC_changemode (lua_State *L, int newmode) |
| void | luaC_freeallobjects (lua_State *L) |
| void | luaC_runtilstate (lua_State *L, int statesmask) |
| void | luaC_step (lua_State *L) |
| void | luaC_fullgc (lua_State *L, int isemergency) |
| #define checkconsistency | ( | obj | ) | lua_longassert(!iscollectable(obj) || righttt(obj)) |
| #define GCFINALIZECOST 50 |
| #define GCFINMAX 10 |
| #define GCSWEEPMAX 100 |
| #define gcvalueN | ( | o | ) | (iscollectable(o) ? gcvalue(o) : NULL) |
| #define gnodelast | ( | h | ) | gnode(h, cast_sizet(sizenode(h))) |
| #define keyiswhite | ( | n | ) | (keyiscollectable(n) && iswhite(gckey(n))) |
| #define lgc_c |
| #define linkgclist | ( | o, | |
| p | |||
| ) | ((o)->gclist = (p), (p) = obj2gco(o)) |
| #define linkobjgclist | ( | o, | |
| p | |||
| ) | (*getgclist(o) = (p), (p) = obj2gco(o)) |
| #define LUA_CORE |
| #define makewhite | ( | g, | |
| x | |||
| ) | (x->marked = cast_byte((x->marked & maskcolors) | luaC_white(g))) |
| #define markkey | ( | g, | |
| n | |||
| ) | { if keyiswhite(n) reallymarkobject(g,gckey(n)); } |
| #define markobjectN | ( | g, | |
| t | |||
| ) | { if (t) markobject(g,t); } |
| #define markvalue | ( | g, | |
| o | |||
| ) |
| #define PAUSEADJ 100 |
| #define valiswhite | ( | x | ) | (iscollectable(x) && iswhite(gcvalue(x))) |
| #define WORK2MEM sizeof(TValue) |
| void luaC_changemode | ( | lua_State * | L, |
| int | newmode | ||
| ) |
| void luaC_freeallobjects | ( | lua_State * | L | ) |
| void luaC_fullgc | ( | lua_State * | L, |
| int | isemergency | ||
| ) |
| void luaC_runtilstate | ( | lua_State * | L, |
| int | statesmask | ||
| ) |
| void luaC_step | ( | lua_State * | L | ) |
1.8.18