This repository was archived by the owner on Aug 18, 2025. It is now read-only.
v0.9.4 Pre1 (0.9.400000000001)
Pre-release
Pre-release
[v0.9.4 Pre1] - 2025-08-15
Core Changes
VM Library Support System
- Removed hardcoded function index limits, implemented dynamic function lookup mechanism
- Full support for
using lib <>statements - VM and interpreter now use the same library loading interface
- VM functionality coverage has been significantly expanded
Bytecode instruction set extension
- New commands:
CallLibrary(String, String, u8)- Library function callMul- Multiplication operationDiv- Division operation
Greater,GreaterEqual,Equal,NotEqual,Less- Comparison operators- Data structure changes:
CompiledProgramaddedimported_librariesfieldCompileradded library management related fields
Compiler module changes (src/vm/compiler.rs)
- Added parsing and handling logic for library import statements
- Implemented dynamic function index allocation mechanism
- Supported bytecode generation for library function calls
- Improved error message for library loading failure
Execution engine module changes (src/vm/vm.rs)
- Implemented execution logic for the
CallLibraryinstruction - Added dynamic function lookup based on function names
- Implement arithmetic operation methods:
mul_values()- Multiplication operationdiv_values()- Division operation (includes division by zero check)- Various comparison operation methods
- Fixed stack management issues in recursive function calls
[v0.9.4 Pre1] - 2025-08-15
核心变更
VM库支持系统
- 移除硬编码的函数索引限制,实现动态函数查找机制
- 添加对
using lib <>语句的完整支持 - VM与解释器现在使用相同的库加载接口
- VM功能覆盖范围显著扩展
字节码指令集扩展
- 新增指令:
CallLibrary(String, String, u8)- 库函数调用Mul- 乘法运算Div- 除法运算Greater,GreaterEqual,Equal,NotEqual,Less- 比较运算
- 数据结构变更:
CompiledProgram增加imported_libraries字段Compiler增加库管理相关字段
编译器模块变更 (src/vm/compiler.rs)
- 添加库导入语句的解析和处理逻辑
- 实现动态函数索引分配机制
- 支持库函数调用的字节码生成
- 改进库加载失败时的错误信息
执行引擎模块变更 (src/vm/vm.rs)
- 实现
CallLibrary指令的执行逻辑 - 添加基于函数名的动态函数查找
- 实现算术运算方法:
mul_values()- 乘法运算div_values()- 除法运算(含除零检查)- 各类比较运算方法
- 修复递归函数调用的栈管理问题
Full Changelog: CodeNothingCommunity/CodeNothing@v0.9.3...v0.9.4