红联Linux门户
Linux帮助

LuaJIT 2.0.3稳定版发布,Lua编译器

发布时间:2014-03-13 09:21:58来源:红联作者:empast
LuaJIT 2.0.3 发布,此版本是目前最新的稳定版本。更新内容如下:

添加了 PS4 端口

Add support for multilib distro builds.

Fix OSX build.

Fix MinGW build.

Fix Xbox 360 build.

Improve ULOAD forwarding for open upvalues.

Fix GC steps threshold handling when called by JIT-compiled code.

Fix argument checks for math.deg() and math.rad().

Fix jit.flush(func|true).

Respect jit.off(func) when returning to a function, too.

Fix compilation of string.byte(s, nil, n).

Fix line number for relocated bytecode after closure fixup

Fix frame traversal for backtraces.

Fix ABC elimination.

Fix handling of redundant PHIs.

Fix snapshot restore for exit to function header.

Fix type punning alias analysis for constified pointers

Fix call unroll checks in the presence of metamethod frames.

Fix initial maxslot for down-recursive traces.

Prevent BASE register coalescing if parent uses IR_RETF.

Don't purge modified function from stack slots in BC_RET.

Fix recording of BC_VARG.

Don't access dangling reference to reallocated IR.

Fix frame depth display for bytecode dump in -jdump.

ARM: Fix register allocation when rematerializing FPRs.

x64: Fix store to upvalue for lightuserdata values.

FFI: Add missing GC steps for callback argument conversions.

FFI: Properly unload loaded DLLs.

FFI: Fix argument checks for ffi.string().

FFI/x64: Fix passing of vector arguments to calls.

FFI: Rehash finalizer table after GC cycle, if needed.

FFI: Fix cts->L for cdata unsinking in snapshot restore.

LuaJIT:采用C语言写的Lua的解释器的代码

LuaJIT is a Just-In-Time Compiler for the Lua* programming language.

LuaJIT试图保留Lua的精髓--轻量级,高效和可扩展.
功能
所有的函数缺省会被JIT(即时编译器)编译到本地机器码:
* 没有被使用的函数不会被编译.
* 可以选择性打开和关闭即时编译函数,子函数甚至整个模块.
* 需要解析的函数(译注:即没有被编译的函数)和编译过的函数可以自由的混合使用.
预编译(Ahead-of-time AOT)也是被支持的:
* 一些API函数和命令行选项允许用户全盘控制编译过程
这个即时编译器是可扩展的:
* 优化器是一个外部模块可以附着在编译器流水线上.
* 一些模块提供了关于编译过程的跟踪和调试信息.
* 所以这些功能可以通过命令行参数来激活.

LuaJIT被设计成全兼容Lua 5.1.她接受同样的源代码和/或预编译字节码.她支持所有标准语言语义.特别是:
* 支持所有标准类型,操作符和元方法.
* 隐式类型强制转换(number/string).
* 完全 IEEE-754 语义浮点算法(NaN, +-Inf, +-0, ...).
* 完全支持词法闭包.正确的尾调用不会消耗栈帧(译注:栈空间).
* 异常是精确的.回溯追踪工作的很好.
* 通过CoCo提供协程支持.(译注:一点兼容性问题 )
* 没有改变Lua 5.1的增量垃圾收集器.
* 没有改变标准Lua/C API.
* 动态加载的C模块保持和Lua 5.1一样链接兼容性(同样的ABI 抽象二进制接口).(译注:基本不用重新编译老的Lua模块,但是仍然偶遇兼容性问题).
* LuaJIT可以像Lua那样嵌入到一个应用程序里.
一些次要的不同点和调试有关:
* 调试钩子只在调试代码生成使能时调用
* 在JIT编译过的代码中不支持尾调用计数.HOOKTAILRET 也不会被调用.注意: 除非你写Lua调试器,否则这些对你没有影响.

项目主页:http://luajit.org/

下载地址:http://luajit.org/download.html

来自:oschina开源中国社区
文章评论

共有 0 条评论