Tiny v0.2.3 - Advanced JIT and Native Data Structures
Tiny v0.2.3 - Advanced JIT and Native Data Structures
This release focuses on a complete overhaul of the JIT compilation engine, transitioning to a unified multi-function architecture and introducing high-performance native memory management for objects and arrays.
JIT Compiler Overhaul
- Multi-Function Compilation: The JIT engine now compiles all eligible functions into a single WASM module. This enables direct inter-function calls within WASM, significantly reducing context-switching overhead between the VM and host environment.
- WASM-Native Allocations: Objects and arrays created within JIT-compiled functions are now allocated directly in WASM linear memory. This eliminates the need for Go-side allocation for hot code paths.
- Expanded Opcode Support: Added JIT support for complex operations including property access (
get,set), array indexing, and built-in method acceleration forpush,get, andlength. - Intelligent Type Inference: The compiler now performs static type flow analysis to optimize tagged value handling, specifically for boolean and numeric operations.
VM and Runtime Improvements
- Unified Arithmetic Engine: Refactored core arithmetic operations into a centralized provider. This ensures strict behavioral parity between interpreted and JIT-compiled execution, particularly for floating-point division and modulo operations.
- Zero-Copy Interop: Introduced proxy types for WASM-resident objects and arrays, allowing the interpreter to interact with JIT-allocated data structures without costly serialization.
- Packing Detection: Added
runtime.isPacked()to the standard library, enabling applications to detect if they are running within a standalone binary created bytiny pack. - Enhanced Debugging: Test infrastructure now captures
stderroutput from the VM, improving the diagnostic capabilities for JIT deoptimization and runtime panics.
Breaking Changes
- Internal Bytecode Version: Bumped to 22 to accommodate new JIT metadata and assumption tracking.
- Float Truncation: Removed implicit float-to-int truncation in several internal bytecode conversion paths to enforce stricter type adherence.