aboutsummaryrefslogtreecommitdiff
path: root/lib/std/atomic
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-06-26 02:25:09 -0400
committerAndrew Kelley <andrew@ziglang.org>2020-06-26 02:30:14 -0400
commit130c7fd23b9f23aa5afad2eb1744ffab9e193715 (patch)
treeb39e5cf093a901c7713009d4c4448e0702d4ead7 /lib/std/atomic
parente820678ca1c1a66b561e760fb6aae4df4babf8ba (diff)
downloadzig-130c7fd23b9f23aa5afad2eb1744ffab9e193715.tar.gz
zig-130c7fd23b9f23aa5afad2eb1744ffab9e193715.zip
self-hosted: working towards conditional branching test case
New features: * Functions can have parameters in semantic analysis. Codegen is not implemented yet. * Support for i8, i16, i32, i64, u8, u16, u32, u64 primitive identifiers. * New ZIR instructions: arg, block, and breakvoid Implementation details: * Move Module.Body to ir.Body * Scope.Block gains a parent field and an optional Label field * Fix bug in integer type equality comparison. Here's the test case I'm working towards: ``` @void = primitive(void) @i32 = primitive(i32) @fnty = fntype([@i32, @i32], @void) @0 = str("entry") @1 = export(@0, "entry") @entry = fn(@fnty, { %0 = arg(0) %1 = arg(1) %2 = add(%0, %1) %3 = int(7) %4 = block("if", { %neq = cmp(%2, neq, %3) %5 = condbr(%neq, { %6 = unreachable() }, { %7 = breakvoid("if") }) }) %11 = returnvoid() }) ``` $ ./zig-cache/bin/zig build-obj test.zir test.zir:9:12: error: TODO implement function parameters for Arch.x86_64 That's where I left off.
Diffstat (limited to 'lib/std/atomic')
0 files changed, 0 insertions, 0 deletions