资源简介
基于JIT实现的Lua,里面的是2.0.5版本,支持Lua5.3的实现
代码片段和文件信息
/*
** Auxiliary library for the Lua/C API.
** Copyright (C) 2005-2017 Mike Pall. See Copyright Notice in luajit.h
**
** Major parts taken verbatim or adapted from the Lua interpreter.
** Copyright (C) 1994-2008 Lua.org PUC-Rio. See Copyright Notice in lua.h
*/
#include
#include
#include
#define lib_aux_c
#define LUA_LIB
#include “lua.h“
#include “lauxlib.h“
#include “lj_obj.h“
#include “lj_err.h“
#include “lj_state.h“
#include “lj_trace.h“
#include “lj_lib.h“
#if LJ_TARGET_POSIX
#include
#endif
/* -- I/O error handling -------------------------------------------------- */
LUALIB_API int luaL_fileresult(lua_State *L int stat const char *fname)
{
if (stat) {
setboolV(L->top++ 1);
return 1;
} else {
int en = errno; /* Lua API calls may change this value. */
setnilV(L->top++);
if (fname)
lua_pushfstring(L “%s: %s“ fname strerror(en));
else
lua_pushfstring(L “%s“ strerror(en));
setintV(L->top++ en);
lj_trace_abort(G(L));
return 3;
}
}
LUALIB_API int luaL_execresult(lua_State *L int stat)
{
if (stat != -1) {
#if LJ_TARGET_POSIX
if (WIFSIGNALED(stat)) {
stat = WTERMSIG(stat);
setnilV(L->top++);
lua_pushliteral(L “signal“);
} else {
if (WIFEXITED(stat))
stat = WEXITSTATUS(stat);
if (stat == 0)
setboolV(L->top++ 1);
else
setnilV(L->top++);
lua_pushliteral(L “exit“);
}
#else
if (stat == 0)
setboolV(L->top++ 1);
else
setnilV(L->top++);
lua_pushliteral(L “exit“);
#endif
setintV(L->top++ stat);
return 3;
}
return luaL_fileresult(L 0 NULL);
}
/* -- Module registration ------------------------------------------------- */
LUALIB_API const char *luaL_findtable(lua_State *L int idx
const char *fname int szhint)
{
const char *e;
lua_pushvalue(L idx);
do {
e = strchr(fname ‘.‘);
if (e == NULL) e = fname + strlen(fname);
lua_pushlstring(L fname (size_t)(e - fname));
lua_rawget(L -2);
if (lua_isnil(L -1)) { /* no such field? */
lua_pop(L 1); /* remove this nil */
lua_createtable(L 0 (*e == ‘.‘ ? 1 : szhint)); /* new table for field */
lua_pushlstring(L fname (size_t)(e - fname));
lua_pushvalue(L -2);
lua_settable(L -4); /* set new table into field */
} else if (!lua_istable(L -1)) { /* field has a non-table value? */
lua_pop(L 2); /* remove table and value */
return fname; /* return problematic part of the name */
}
lua_remove(L -2); /* remove previous table */
fname = e + 1;
} while (*e == ‘.‘);
return NULL;
}
static int libsize(const luaL_Reg *l)
{
int size = 0;
for (; l->name; l++) size++;
return size;
}
LUALIB_API void luaL_openlib(lua_State *L const char *libname
const luaL_Reg *l int nup)
{
lj_lib_checkfpu(L);
if (libname) {
int size = libsize(l);
/* check whether lib already exists */
l
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-05-01 18:11 LuaJIT-2.0.5\
文件 2932 2017-05-01 18:11 LuaJIT-2.0.5\COPYRIGHT
文件 5595 2017-05-01 18:11 LuaJIT-2.0.5\Makefile
文件 441 2017-05-01 18:11 LuaJIT-2.0.5\README
目录 0 2017-05-01 18:11 LuaJIT-2.0.5\doc\
文件 2514 2017-05-01 18:11 LuaJIT-2.0.5\doc\bluequad-print.css
文件 5575 2017-05-01 18:11 LuaJIT-2.0.5\doc\bluequad.css
文件 48265 2017-05-01 18:11 LuaJIT-2.0.5\doc\changes.html
文件 2938 2017-05-01 18:11 LuaJIT-2.0.5\doc\contact.html
文件 5991 2017-05-01 18:11 LuaJIT-2.0.5\doc\ext_c_api.html
文件 10285 2017-05-01 18:11 LuaJIT-2.0.5\doc\ext_ffi.html
文件 21296 2017-05-01 18:11 LuaJIT-2.0.5\doc\ext_ffi_api.html
文件 53100 2017-05-01 18:11 LuaJIT-2.0.5\doc\ext_ffi_semantics.html
文件 22506 2017-05-01 18:11 LuaJIT-2.0.5\doc\ext_ffi_tutorial.html
文件 5844 2017-05-01 18:11 LuaJIT-2.0.5\doc\ext_jit.html
文件 15247 2017-05-01 18:11 LuaJIT-2.0.5\doc\extensions.html
文件 7634 2017-05-01 18:11 LuaJIT-2.0.5\doc\faq.html
目录 0 2017-05-01 18:11 LuaJIT-2.0.5\doc\img\
文件 1340 2017-05-01 18:11 LuaJIT-2.0.5\doc\img\contact.png
文件 23195 2017-05-01 18:11 LuaJIT-2.0.5\doc\install.html
文件 8011 2017-05-01 18:11 LuaJIT-2.0.5\doc\luajit.html
文件 13567 2017-05-01 18:11 LuaJIT-2.0.5\doc\running.html
文件 3283 2017-05-01 18:11 LuaJIT-2.0.5\doc\status.html
目录 0 2017-05-01 18:11 LuaJIT-2.0.5\dynasm\
文件 13423 2017-05-01 18:11 LuaJIT-2.0.5\dynasm\dasm_arm.h
文件 34598 2017-05-01 18:11 LuaJIT-2.0.5\dynasm\dasm_arm.lua
文件 12200 2017-05-01 18:11 LuaJIT-2.0.5\dynasm\dasm_mips.h
文件 28080 2017-05-01 18:11 LuaJIT-2.0.5\dynasm\dasm_mips.lua
文件 12110 2017-05-01 18:11 LuaJIT-2.0.5\dynasm\dasm_ppc.h
文件 37064 2017-05-01 18:11 LuaJIT-2.0.5\dynasm\dasm_ppc.lua
文件 2062 2017-05-01 18:11 LuaJIT-2.0.5\dynasm\dasm_proto.h
............此处省略170个文件信息
- 上一篇:东翌学院mui.chm
- 下一篇:IDL实现(GF1/2和landsat8)水体提取
相关资源
- lua脚本加密工具:简单异或加密
- Lua.CLF用于Source Insight的Lua支持
- lua搓牌效果,已实现了四边
- lua+luabind 的lib库,免编译
- 罗技(Logitech) 游戏软件 G-series Lua
- wireshark GPON OMCI报文解析lua
- 微信62数据源码 LUA
- 魔兽世界插件编写教程与资料
- Lua-5.3.4_Win64_bin
- 老虎吃绵羊 人机对战 lua console
- 斗地主完整算法包含天地癞子
- esp8266控制步进电机.txt
- 解释器+编译器+Lua库+头文件(Lua 5.0
- box2d的lua导出LuaBox2D
- 斗地主牌型相关算法
- luasocket_lua5.2.4 X64.zip
-
Luaxm
l工具 -
Notepad++ 的lua.xm
l 语法高亮和自动补 - Lua5.2源码
- 触摸精灵lua脚本更新源码
- LuaInterface资源包
- xlua+unity单机版捕鱼视频教程+源码
- lua5.3解释器
- wireshark lua 插件 解析提取网络报文传
- luac逆向工具
- windows7下Lua的编译,使用Visual Studio
- Lua 5.1 for delphi 2010-XE4
- lua脚本语言零基础开发教程
- Risk-Neutral Valuation-Pricing and Hedging of
- Evaluation.zip
评论
共有 条评论