2009-09-14から1日間の記事一覧

Lua処理系コード読み(4) luaV_execute

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…

Lua処理系コード読み(4) Instruction

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に /*==========================…

Lua処理系コード読み(3) StkId

lobject.h typedef TValue *StkId; /* index to stack elements */ Lua VMのスタック要素を示す型。実質TValueのポインタ。

test