You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
v2: fix arm64 self-host, improve transformer type handling, and harden cleanc backend
ARM64 backend:
- Fix null pointer dereference when returning none (zero-fill return area)
- Add branch trampoline for CBNZ/CBZ 19-bit range overflow
- Fix large struct truthiness check in conditional branches
- Fix logical NOT to use (x == 0) instead of (x XOR 1)
SSA builder:
- Register sum types as {_tag, _data} struct pairs
- Resolve Option/Result types to their base type instead of i64 fallback
- Handle pointer type names (Type*), address-of non-addressable values
- Fix array struct field indices for offset field (data=0, offset=1, len=2)
- Prefer SSA struct field type over type environment for selectors
Transformer:
- Add post-transform type propagation pass (new type_propagation.v)
- Fix sumtype option returns to check _data field instead of raw truthiness
- Execute or-block side effects in else path, not unconditionally
- Skip uninstantiated generic functions (unchecked bodies)
- Fix smartcast: check variant has method before applying, disable when
passing sumtype args to sumtype params
- Use _data directly for native backend smartcasts (no union variants)
- Fix map index assignment scope-escape with prefix temp variables
- Lower `return none` to `return 0` for native backends
- Resolve enum shorthands in non-sumtype match expressions
Parser:
- Add in_top_level flag to prevent parsing declarations inside fn bodies
Cleanc:
- Fix &T(x) pointer type in assignments
- Use shallow clone (depth 0) to avoid type misidentification by size
- Implement BlockStmt recursion instead of TODO placeholder
Type checker:
- Check struct field defaults and enum values after all declarations
- Add comptime flags: little_endian, big_endian, debug, native, user-defined
- Check assert extras, comptime stmts, label stmts
Misc:
- Flush libc stdio before write() syscall to prevent output reordering
- Fix tcc fallback to check compiler binary, not full command string
0 commit comments