2009-09-01ãã1ã¶æéã®è¨äºä¸è¦§
lobject.h /* ** Upvalues */ typedef struct UpVal { CommonHeader; TValue *v; /* points to stack or to its own value */ union { TValue value; /* the value (when closed) */ struct { /* double linked list (when open) */ struct UpVal *prev; strâ¦
lobject.h /* ** Function Prototypes */ typedef struct Proto { CommonHeader; TValue *k; /* constants used by the function */ Instruction *code; struct Proto **p; /* functions defined inside the function */ int *lineinfo; /* map from opcodesâ¦
lobject.h /* ** Closures */ #define ClosureHeader \ CommonHeader; lu_byte isC; lu_byte nupvalues; GCObject *gclist; \ struct Table *env typedef struct CClosure { ClosureHeader; lua_CFunction f; TValue upvalue[1]; } CClosure; typedef structâ¦
lgc.h #define luaC_checkGC(L) { \ condhardstacktests(luaD_reallocstack(L, L->stacksize - EXTRA_STACK - 1)); \ if (G(L)->totalbytes >= G(L)->GCthreshold) \ luaC_step(L); } ç·ã¢ãã±ã¼ãéãé¾å¤ãè¶ ãã¦ããã¨ãã«GCã¹ãããã®å¼ã³åºããè¶ ãã¦ãªâ¦
lmem.c /* ** generic allocation routine. */ void *luaM_realloc_ (lua_State *L, void *block, size_t osize, size_t nsize) { global_State *g = G(L); lua_assert((osize == 0) == (block == NULL)); block = (*g->frealloc)(g->ud, block, osize, nsizâ¦
lvm.c void luaV_execute (lua_State *L, int nexeccalls) { LClosure *cl; StkId base; TValue *k; const Instruction *pc; reentry: /* entry point */ lua_assert(isLua(L->ci)); pc = L->savedpc; cl = &clvalue(L->ci->func)->l; base = L->base; k = câ¦
llimits.h /* ** type for virtual-machine instructions ** must be an unsigned with (at least) 4 bytes (see details in lopcodes.h) */ typedef lu_int32 Instruction; Lua VMå½ä»¤ã®åã4ãã¤ã(=32ããã)ãlopcodes.hã« /*==========================â¦
lobject.h typedef TValue *StkId; /* index to stack elements */ Lua VMã®ã¹ã¿ãã¯è¦ç´ ã示ãåãå®è³ªTValueã®ãã¤ã³ã¿ã