Add generic function handling for debug modules.

Don't call record vmevent for non-Lua functions.
This commit is contained in:
Mike Pall
2010-02-15 17:36:29 +01:00
parent b838cd8dca
commit 3452bfcf8c
4 changed files with 52 additions and 48 deletions

View File

@@ -197,9 +197,12 @@ LJLIB_CF(jit_util_funcinfo)
} else {
GCfunc *fn = funcV(L->base);
GCtab *t;
lua_createtable(L, 0, 2); /* Increment hash size if fields are added. */
lua_createtable(L, 0, 4); /* Increment hash size if fields are added. */
t = tabV(L->top-1);
setintfield(L, t, "ffid", fn->c.ffid);
if (!iscfunc(fn))
setintfield(L, t, "ffid", fn->c.ffid);
setnumV(lj_tab_setstr(L, t, lj_str_newlit(L, "addr")),
cast_num((intptr_t)fn->c.f));
setintfield(L, t, "upvalues", fn->c.nupvalues);
}
return 1;