Repository navigation
v0.4.0
Highlights
String Interning
All identifiers are now interned as Symbol(u32) — variable lookups, field access, and pattern matching use O(1) integer comparison instead of O(n) string comparison across the lexer, parser, compiler, and typechecker.
Architecture Improvements
- VM split into 6 sub-modules: execute, dispatch, arithmetic, runtime, error, tests (was 5,500 LOC monolith)
- Compiler split: pattern matching compilation extracted into
compiler/patterns.rs - Unified module registry:
vm/dispatch.rsnow consumesmodule.rs— single source of truth for builtin functions - Extracted
compile_file()in main.rs — eliminated 70-80% pipeline duplication - Removed dead concurrency opcodes — committed to builtin-based concurrency
Constant Pool Optimization
HashMap-based O(1) deduplication replaces O(n) linear scan for constants.
Testing
- 1,353 tests (up from ~1,100)
- Property-based tests via proptest: formatter idempotency, no-panic guarantees for lexer/parser/formatter (9,300+ generated inputs)
- 4 cargo-fuzz targets: lexer, parser, formatter, roundtrip
- CLI integration tests (15 tests)
- REPL unit tests (16 tests) — also fixed
has_unclosed_delimitersnot detecting unclosed strings - Coverage CI via cargo-tarpaulin
Stdlib Completions
fsmodule:is_file,is_dir,list_dirimplementedregexmodule:captures,captures_allimplementedio.inspectandmath.expadded to module registry (fixes aliased import bug)- REPL completions now dynamically generated from module registry
Bug Fixes
- Two-tier float system:
Float(finite) andExtFloat(IEEE 754) - Checked integer overflow, negative index errors
- Fixed type safety holes, range OOM, mutex poisoning cascades
- Hex (
0xFF), binary (0b1010), scientific (1.5e10) numeric literals - Helpful errors for spread syntax in records, non-callable types, undefined pin vars
Full Changelog: v0.3.0...v0.4.0