关于luajit的bytecode模式
来源:互联网 发布:海洛因的网络名称 编辑:程序博客网 时间:2024/05/04 12:35
最近把android下的Lua换成了Luajit,并且使用了bytecode,后来发现某些品牌的手机崩溃的比较多,于是怀疑是不是luajit的问题,所以就对Luajit的bytecode模式做了点调研,我们先来看一下-b参数的说明
-b[options] input output
This option saves or lists bytecode. The following additional options are accepted:
- -l — Only list bytecode.
- -s — Strip debug info (this is the default).
- -g — Keep debug info.
- -n name — Set module name (default: auto-detect from input name)
- -t type — Set output file type (default: auto-detect from output name).
- -a arch — Override architecture for object files (default: native).
- -o os — Override OS for object files (default: native).
- -e chunk — Use chunk string as input.
- - (a single minus sign) — Use stdin as input and/or stdout as output.
The output file type is auto-detected from the extension of the output file name:
- c — C source file, exported bytecode data.
- h — C header file, static bytecode data.
- obj or o — Object file, exported bytecode data (OS- and architecture-specific).
- raw or any other extension — Raw bytecode file (portable).
比较值得说的一点是Output那里,根据文档,luajit -b是根据output的后缀名来决定应该编译成什么东西的
luajit -b main.lua main.c 输出就是一个c文件
luajit -b main.lua main.h 输出就是一个头文件
luajit -b main.lua main.o 输出就是一个object文件,这个时候要注意了,如果是交叉编译,那就得指定-o -a
luajit -b main.lua main.lua 输出就是一个原生的bytecode文件,这个文件是跨平台的,就跟普通的lua文件一样
所以看来崩溃跟Luajit关系不大了,继续找吧。
搜索了一下luajit的邮件列表,发现确认有人也发现会core在luajit里,必须如果使用了bytecode模式的话,情况会更糟糕,
另外发现cocos2dx自带的Luajit版本有点低了,先换到2.0.3看看效果
0 0
- 关于luajit的bytecode模式
- uLua运行LuaJIT编译后的bytecode文件
- uLua运行LuaJIT编译后的bytecode文件
- luajit ios arm64 编译bytecode
- Windows下LuaJIT的编译和使用,将Lua脚本编译为bytecode
- luajit 2.0 bytecode dump文件解析
- luajit笔记---编译bytecode(字节码文件)
- 从luajit bytecode dump文件提取字符串资源
- torch系列:关于luajit中string.format的支持
- 关于lua,luajit,以及lua的字节码形式
- luaJIT
- luajit
- Cocos2d-x使用Luajit将Lua脚本编译为bytecode,从而实现加密
- Cocos2d-x使用Luajit将Lua脚本编译为bytecode,从而实现加密
- Cocos2d-x使用Luajit将Lua脚本编译为bytecode,从而实现加密
- Cocos2d-x使用Luajit将Lua脚本编译为bytecode,从而实现加密
- Cocos2d-x使用Luajit将Lua脚本编译为bytecode,从而实现加密
- Cocos2d-x使用Luajit将Lua脚本编译为bytecode,实现加密 更新
- 加载
- 简易的分页方法(鄙人私自集成到了ZF的AbstractActionController.php中)
- 如何在Root的手机上开启ViewServer,使得HierachyViewer能够连接
- VFW技术资料基本解析
- Java排序方法总结
- 关于luajit的bytecode模式
- c/c++内存机制
- DBGridEh导出功能详解
- 让UITableView响应touch事件
- java格式化json数据(如斜杠...)
- java 程序员常用类库
- linux下登录远程MySQL
- Lua基础(一)——赋值语句、表达式、流程控制、函数
- 清除的文件怎么才能完整准确的恢复呢