Skip to content
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

Choose a tag to compare

@HelloAIXIAOJI HelloAIXIAOJI released this 15 Aug 12:54
· 62 commits to master since this 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 call
    • Mul - Multiplication operation
    • Div - Division operation
  • Greater, GreaterEqual, Equal, NotEqual, Less - Comparison operators
  • Data structure changes:
    • CompiledProgram added imported_libraries field
    • Compiler added 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 CallLibrary instruction
  • Added dynamic function lookup based on function names
  • Implement arithmetic operation methods:
    • mul_values() - Multiplication operation
    • div_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