This website requires JavaScript.
About
Status
₊˚⊹Discord
Explore
Register
Sign in
Reference in a new issue
Blame
Copy permalink
Reference in a new issue
Copy permalink
DKB
/
zig
Star
0
Fork
You've already forked zig
0
mirror of
https://codeberg.org/ziglang/zig
synced
2026-11-18 07:05:05 +00:00
Code
Issues
Releases
Packages
Activity
609b84611d
zig
/
test
/
behavior
/
basic.zig
85 lines
1.5 KiB
Raw
Normal View
History
stage2: implement `@truncate`
2021-08-01 16:13:58 -07:00
Sema: implement comptime variables Sema now properly handles alloc_inferred and alloc_inferred_mut ZIR instructions inside a comptime execution context. In this case it creates Decl objects and points to them with the new `decl_ref_mut` Value Tag. `storePtr` is updated to mutate such Decl types and values. In this case it destroys the old arena and makes a new one, preventing memory growth during comptime code execution. Additionally: * Fix `storePtr` to emit a compile error for a pointer comptime-known to be undefined. * Fix `storePtr` to emit runtime instructions for all the cases that a pointer is comptime-known but does not support comptime dereferencing, such as `@intToPtr` on a hard-coded address, or an extern function. * Fix `ret_coerce` not coercing inside inline function call context.
2021-08-01 12:27:22 -07:00
stage2: implement `@truncate`
2021-08-01 16:13:58 -07:00
move some behavior tests to the "passing for stage2" section
2021-08-01 23:27:38 -07:00