diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-07-15 22:36:35 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-07-15 22:36:35 -0700 |
| commit | d29dd5834b9d7386bb88e44bd2852428863cae81 (patch) | |
| tree | 6a1f15d341c00be937ef9308ec750b35c308a5c0 /src/codegen.cpp | |
| parent | af12596e8d728423e361e4755a6078c5ef8faf69 (diff) | |
| download | zig-d29dd5834b9d7386bb88e44bd2852428863cae81.tar.gz zig-d29dd5834b9d7386bb88e44bd2852428863cae81.zip | |
stage2: local consts
These are now supported enough that this example code hits the
limitations of the register allocator:
fn add(a: u32, b: u32) void {
const c = a + b; // 7
const d = a + c; // 10
const e = d + b; // 14
assert(e == 14);
}
// error: TODO implement copyToNewRegister
So now the next step is to implement register allocation as planned.
Diffstat (limited to 'src/codegen.cpp')
0 files changed, 0 insertions, 0 deletions
