Llamavm
Implementation of lua virtual machine
Install / Use
/learn @throne-developer/LlamavmREADME
llama虚拟机
详细文档参见 Wiki
(1)编译方法
Windows系统
- 安装Visual Studio 2013开发工具
- 打开llama.vcxproj 工程文件
- F5调试运行
Linux系统
- 执行命令: bash build.sh
- 编译成功后,生成 llamavm 可执行程序
- 执行命令: ./llamavm test.lua
- 调试信息写入 debug.log 文件
- vim阅读源码时中文会出现乱码,用vim.sh脚本打开源码
(2)功能列表
- 虚拟机基础功能:词法分析、语法分析、指令生成、执行指令、垃圾回收
- 表达式求值:加减乘除、比较运算、and/or逻辑运算、字符串拼接
- 控制语句:if、while、for、break、continue
- 变量:全局变量、局部变量、多重赋值
- 函数:函数定义、函数调用、多返回值
- 数据结构:table
- 内置函数:tostring、print、floor等
(3)源码说明
- src目录存放源代码,testcase目录存放测试用例
- base目录:基础类型定义
- code目录:源码编译和指令生成
- lib目录:内置函数库
- test目录:测试用例
- vm目录:执行指令和gc
Related Skills
node-connect
345.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
106.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
