This repository was archived by the owner on Aug 18, 2025. It is now read-only.
v0.9.3
[v0.9.3] - 2025-08-19
Bytecode Virtual Machine System
- Implemented a complete bytecode virtual machine architecture, including instruction set design, compiler frontend, and execution engine
- Added new bytecode instruction set: LoadConst, LoadLocal, StoreLocal, Add, Sub, Call, Return, and other core instructions
- A compiler that translates AST to bytecode, supporting bytecode compilation for expressions, statements, and functions
- Building a stack-based virtual machine execution engine to provide an efficient bytecode execution environment
Command-line options
- Add
--cn-vmoption: Execute the program using the bytecode virtual machine - Add
--cn-vm-debugoption: Enable virtual machine debug mode, display detailed execution trace
Performance Optimization
- Bytecode virtual machine has higher execution efficiency compared to tree traversal interpreter
- Optimized function call mechanism, supports correct execution of recursive functions
- Improved string concatenation operations, supporting automatic conversion between strings and other types
- Complete call stack management, correctly handling parameter passing and return values
Technical Implementation
- Designed a complete bytecode instruction set, covering stack operations, arithmetic operations, comparison operations, control flow, etc
- Implemented the compiler core structure, including constant pool management and local variable table
- Built the stack-based virtual machine architecture, supporting instruction dispatch and execution
- Added call frame management, properly handling function calls and recursion
[v0.9.3] - 2025-08-19
字节码虚拟机系统
- 实现了完整的字节码虚拟机架构,包含指令集设计、编译器前端和执行引擎
- 新增字节码指令集:LoadConst、LoadLocal、StoreLocal、Add、Sub、Call、Return等核心指令
- 实现AST到字节码的编译器,支持表达式、语句、函数的字节码编译
- 构建栈式虚拟机执行引擎,提供高效的字节码执行环境
命令行选项
- 添加
--cn-vm选项:使用字节码虚拟机执行程序 - 添加
--cn-vm-debug选项:启用虚拟机调试模式,显示详细的执行跟踪
性能优化
- 字节码虚拟机相比树遍历解释器具有更高的执行效率
- 优化了函数调用机制,支持递归函数的正确执行
- 改进了字符串拼接操作,支持字符串与其他类型的自动转换
- 完整的调用栈管理,正确处理参数传递和返回值
技术实现
- 设计了完整的字节码指令集,涵盖栈操作、算术运算、比较操作、控制流等
- 实现了编译器核心结构,包括常量池管理和局部变量表
- 构建了栈式虚拟机架构,支持指令分发和执行
- 添加了调用帧管理,正确处理函数调用和递归
Full Changelog: CodeNothingCommunity/CodeNothing@v0.9.2...v0.9.3