summaryrefslogtreecommitdiff
path: root/src/lib_io.c
diff options
context:
space:
mode:
authorMike Pall <mike>2010-02-13 04:51:56 +0100
committerMike Pall <mike>2010-02-13 04:51:56 +0100
commitc93138b59e8f28b3d412cd7ec0c6631fd27e3e1b (patch)
tree8c0ffe2086ab0b032ed8e9f92ae6fb9d4d040d66 /src/lib_io.c
parent4f8d7be8ea8a103f4d9046188d6005740b74f3d4 (diff)
downloadluajit-c93138b59e8f28b3d412cd7ec0c6631fd27e3e1b.tar.gz
luajit-c93138b59e8f28b3d412cd7ec0c6631fd27e3e1b.tar.bz2
luajit-c93138b59e8f28b3d412cd7ec0c6631fd27e3e1b.zip
Major redesign of function call handling.
Drop call gates. Use function headers, dispatched like bytecodes. Emit BC_FUNCF/BC_FUNCV bytecode at PC 0 for all Lua functions. C functions and ASM fast functions get extra bytecodes. Modify internal calling convention: new base in BASE (formerly in RA). Can now use better C function wrapper semantics (dynamic on/off). Prerequisite for call hooks with zero-overhead if disabled. Prerequisite for compiling recursive calls. Prerequisite for efficient 32/64 bit prototype guards.
Diffstat (limited to 'src/lib_io.c')
-rw-r--r--src/lib_io.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib_io.c b/src/lib_io.c
index 42200201..e8eb09cb 100644
--- a/src/lib_io.c
+++ b/src/lib_io.c
@@ -502,8 +502,7 @@ static GCobj *io_std_new(lua_State *L, FILE *fp, const char *name)
502 502
503LUALIB_API int luaopen_io(lua_State *L) 503LUALIB_API int luaopen_io(lua_State *L)
504{ 504{
505 lua_pushcfunction(L, lj_cf_io_lines_iter); 505 lj_lib_pushcf(L, lj_cf_io_lines_iter, FF_io_lines_iter);
506 funcV(L->top-1)->c.ffid = FF_io_lines_iter;
507 LJ_LIB_REG_(L, NULL, io_method); 506 LJ_LIB_REG_(L, NULL, io_method);
508 copyTV(L, L->top, L->top-1); L->top++; 507 copyTV(L, L->top, L->top-1); L->top++;
509 lua_setfield(L, LUA_REGISTRYINDEX, LUA_FILEHANDLE); 508 lua_setfield(L, LUA_REGISTRYINDEX, LUA_FILEHANDLE);