Skip to content

v0.9.8-05

Choose a tag to compare

@zhyi-dp zhyi-dp released this 11 Jun 07:04

This release introduces critical compiler bug fixes, enhanced syntax validation, ABI optimizations, and documentation updates.

🚀 Features & Enhancements

  • Linux ARM64 Native Release Package: Added native compilation and packaging support for Linux ARM64 (AArch64). Release binaries are now natively built and validated under ARM64 GitHub Actions runner environments, ensuring complete platform stability.
  • Cross-Compilation & Target Override: Introduced experimental support for overriding the target triple via the TOKA_TARGET_TRIPLE environment variable, enabling developers to easily generate relocatable target files (e.g., targeting aarch64-unknown-linux-gnu from standard x86 host machines).
  • Relaxed Same-Directory Circular Imports: Supported same-physical-directory circular imports via a two-stage declareGlobals Sema pass, solving AST resolution recursion limits.
  • Strict Pointer Morphology Checks: Enforced syntax checks to prevent pointer morphology sigils (&, *, ^, ~) from prefixing type names inside struct definitions (e.g. source_file: &SourceFile is now a parse error, suggesting &source_file: SourceFile instead).
  • Explicit Morphology in Reference Bindings: Enforced checks requiring explicit pointer morphology (like &) on variables when initializing them from reference members.
  • Standard Library Cleanup: Fixed field sigil positions in standard library Entry shapes inside std/hashmap.tk to strictly follow Toka pointer rules.

🐛 Bug Fixes

  • Windows Path Normalization: Resolved a critical bug where backslashes \ in Windows file paths caused standard library directory checks to fail (wrongly auto-injecting core/prelude) and led to module resolution mismatches in Sema. Integrated a foolproof path-normalizer converting all backslashes to generic slashes across Driver, SourceManager, Parser, and Sema.
  • Memory Safety in Coroutines: Resolved memory safety issues during LLVM coroutine execution termination and destruction paths.
  • CodeGen Stability: Fixed stack buffer overflow and type mismatch bugs in conditional statements (IfExpr and GuardExpr codegen).
  • Compiler Crash on Circular Imports: Standardized file paths during circular dependency checks to prevent compiler segmentation faults.

⚡ Performance Optimizations

  • ABI Optimization: Redesigned pointer return conventions to completely bypass the LLVM sret (Struct Return) overhead, generating tighter machine code.
  • Intrinsics Refactoring: Migrated raw_ptr to compiler-level intrinsics to optimize memory copying (copy_memory removal).

📝 Documentation & Ecosystem

  • Windows Build Environment Guide: Updated documentation to properly guide MSYS2 UCRT64 terminal dependency setup and pacman commands.
  • Academic Citation: Strongly linked and synchronized professional citations with the official Toka arXiv research paper.