build.zig | 2 +- doc/docgen.zig | 4 +- doc/langref.html.in | 148 ++++++++++--------- lib/std/array_list.zig | 16 +-- lib/std/ascii.zig | 22 +-- lib/std/atomic/queue.zig | 4 +- lib/std/atomic/stack.zig | 6 +- lib/std/bloom_filter.zig | 22 +-- lib/std/c/darwin.zig | 2 +- lib/std/child_process.zig | 4 +- lib/std/crypto/aes.zig | 20 +-- lib/std/crypto/blake2.zig | 16 +-- lib/std/crypto/chacha20.zig | 8 +- lib/std/crypto/gimli.zig | 8 +- lib/std/crypto/md5.zig | 8 +- lib/std/crypto/poly1305.zig | 12 +- lib/std/crypto/sha1.zig | 30 ++-- lib/std/crypto/sha2.zig | 38 ++--- lib/std/crypto/sha3.zig | 2 +- lib/std/crypto/x25519.zig | 66 ++++----- lib/std/debug.zig | 23 +-- lib/std/debug/leb128.zig | 6 +- lib/std/dynamic_library.zig | 4 +- lib/std/elf.zig | 24 ++-- lib/std/event/fs.zig | 4 +- lib/std/event/loop.zig | 22 +-- lib/std/fifo.zig | 26 ++-- lib/std/fmt.zig | 124 ++++++++-------- lib/std/fmt/errol.zig | 4 +- lib/std/fmt/parse_float.zig | 20 +-- lib/std/fs.zig | 2 +- lib/std/fs/file.zig | 6 +- lib/std/hash/auto_hash.zig | 14 +- lib/std/hash/cityhash.zig | 8 +- lib/std/hash/crc.zig | 8 +- lib/std/hash/murmur.zig | 2 +- lib/std/hash/siphash.zig | 14 +- lib/std/hash_map.zig | 2 +- lib/std/heap.zig | 4 +- lib/std/http/headers.zig | 10 +- lib/std/io.zig | 30 ++-- lib/std/io/out_stream.zig | 4 +- lib/std/io/test.zig | 64 ++++----- lib/std/json.zig | 4 +- lib/std/lazy_init.zig | 2 +- lib/std/math.zig | 160 ++++++++++----------- lib/std/math/acos.zig | 4 +- lib/std/math/acosh.zig | 4 +- lib/std/math/asin.zig | 4 +- lib/std/math/asinh.zig | 4 +- lib/std/math/atan.zig | 4 +- lib/std/math/atanh.zig | 4 +- lib/std/math/big/int.zig | 22 +-- lib/std/math/cbrt.zig | 10 +- lib/std/math/ceil.zig | 6 +- lib/std/math/complex.zig | 8 +- lib/std/math/complex/acos.zig | 2 +- lib/std/math/complex/ldexp.zig | 4 +- lib/std/math/complex/sqrt.zig | 4 +- lib/std/math/complex/tanh.zig | 2 +- lib/std/math/copysign.zig | 6 +- lib/std/math/cos.zig | 4 +- lib/std/math/cosh.zig | 4 +- lib/std/math/exp.zig | 6 +- lib/std/math/exp2.zig | 6 +- lib/std/math/expm1.zig | 4 +- lib/std/math/expo2.zig | 2 +- lib/std/math/fabs.zig | 8 +- lib/std/math/floor.zig | 10 +- lib/std/math/fma.zig | 2 +- lib/std/math/frexp.zig | 4 +- lib/std/math/hypot.zig | 2 +- lib/std/math/ilogb.zig | 6 +- lib/std/math/isfinite.zig | 12 +- lib/std/math/isinf.zig | 48 +++---- lib/std/math/isnan.zig | 8 +- lib/std/math/isnormal.zig | 12 +- lib/std/math/ln.zig | 10 +- lib/std/math/log.zig | 14 +- lib/std/math/log10.zig | 10 +- lib/std/math/log1p.zig | 6 +- lib/std/math/log2.zig | 8 +- lib/std/math/modf.zig | 8 +- lib/std/math/round.zig | 4 +- lib/std/math/scalbn.zig | 4 +- lib/std/math/signbit.zig | 6 +- lib/std/math/sin.zig | 6 +- lib/std/math/sinh.zig | 4 +- lib/std/math/sqrt.zig | 10 +- lib/std/math/tan.zig | 4 +- lib/std/math/tanh.zig | 4 +- lib/std/math/trunc.zig | 8 +- lib/std/mem.zig | 20 +-- lib/std/meta.zig | 4 +- lib/std/meta/trait.zig | 4 +- lib/std/net.zig | 22 +-- lib/std/os.zig | 14 +- lib/std/os/bits/dragonfly.zig | 2 +- lib/std/os/bits/linux.zig | 10 +- lib/std/os/linux.zig | 188 ++++++++++++------------ lib/std/os/linux/arm-eabi.zig | 4 +- lib/std/os/linux/arm64.zig | 2 +- lib/std/os/linux/mipsel.zig | 6 +- lib/std/os/linux/riscv64.zig | 2 +- lib/std/os/linux/test.zig | 6 +- lib/std/os/linux/vdso.zig | 4 +- lib/std/os/linux/x86_64.zig | 2 +- lib/std/os/test.zig | 2 +- lib/std/os/windows.zig | 4 +- lib/std/os/windows/bits.zig | 24 ++-- lib/std/os/zen.zig | 4 +- lib/std/packed_int_array.zig | 36 ++--- lib/std/pdb.zig | 2 +- lib/std/priority_queue.zig | 60 ++++---- lib/std/rand.zig | 16 +-- lib/std/rand/ziggurat.zig | 2 +- lib/std/segmented_list.zig | 10 +- lib/std/sort.zig | 8 +- lib/std/special/c.zig | 6 +- lib/std/special/compiler_rt.zig | 34 ++--- lib/std/special/compiler_rt/addXf3.zig | 26 ++-- lib/std/special/compiler_rt/addXf3_test.zig | 8 +- lib/std/special/compiler_rt/comparedf2.zig | 20 +-- lib/std/special/compiler_rt/comparesf2.zig | 20 +-- lib/std/special/compiler_rt/comparetf2.zig | 20 +-- lib/std/special/compiler_rt/divdf3.zig | 66 ++++----- lib/std/special/compiler_rt/divsf3.zig | 22 +-- lib/std/special/compiler_rt/divti3_test.zig | 8 +- lib/std/special/compiler_rt/extendXfYf2.zig | 14 +- lib/std/special/compiler_rt/extendXfYf2_test.zig | 8 +- lib/std/special/compiler_rt/fixdfdi_test.zig | 2 +- lib/std/special/compiler_rt/fixdfsi_test.zig | 2 +- lib/std/special/compiler_rt/fixdfti_test.zig | 2 +- lib/std/special/compiler_rt/fixint.zig | 6 +- lib/std/special/compiler_rt/fixint_test.zig | 26 ++-- lib/std/special/compiler_rt/fixsfdi_test.zig | 2 +- lib/std/special/compiler_rt/fixsfsi_test.zig | 2 +- lib/std/special/compiler_rt/fixsfti_test.zig | 2 +- lib/std/special/compiler_rt/fixtfdi_test.zig | 2 +- lib/std/special/compiler_rt/fixtfsi_test.zig | 2 +- lib/std/special/compiler_rt/fixtfti_test.zig | 2 +- lib/std/special/compiler_rt/fixuint.zig | 8 +- lib/std/special/compiler_rt/fixunstfsi_test.zig | 2 +- lib/std/special/compiler_rt/fixunstfti_test.zig | 2 +- lib/std/special/compiler_rt/floatsiXf.zig | 10 +- lib/std/special/compiler_rt/floattidf.zig | 2 +- lib/std/special/compiler_rt/floattisf.zig | 2 +- lib/std/special/compiler_rt/floattitf.zig | 2 +- lib/std/special/compiler_rt/floatunsidf.zig | 6 +- lib/std/special/compiler_rt/floatuntidf.zig | 4 +- lib/std/special/compiler_rt/floatuntisf.zig | 4 +- lib/std/special/compiler_rt/floatuntitf.zig | 4 +- lib/std/special/compiler_rt/mulXf3.zig | 50 +++---- lib/std/special/compiler_rt/mulXf3_test.zig | 18 +-- lib/std/special/compiler_rt/muldi3.zig | 2 +- lib/std/special/compiler_rt/mulodi4.zig | 2 +- lib/std/special/compiler_rt/mulodi4_test.zig | 48 +++---- lib/std/special/compiler_rt/muloti4.zig | 2 +- lib/std/special/compiler_rt/muloti4_test.zig | 62 ++++---- lib/std/special/compiler_rt/multi3.zig | 2 +- lib/std/special/compiler_rt/negXf2.zig | 2 +- lib/std/special/compiler_rt/popcountdi2_test.zig | 6 +- lib/std/special/compiler_rt/truncXfYf2.zig | 2 +- lib/std/special/compiler_rt/truncXfYf2_test.zig | 20 +-- lib/std/special/compiler_rt/udivmod.zig | 6 +- lib/std/target.zig | 2 +- lib/std/thread.zig | 2 +- lib/std/time.zig | 8 +- lib/std/unicode.zig | 26 ++-- lib/std/valgrind.zig | 2 +- lib/std/zig/parse_string_literal.zig | 2 +- lib/std/zig/parser_test.zig | 2 +- lib/std/zig/render.zig | 6 +- lib/std/zig/tokenizer.zig | 2 +- src-self-hosted/stage1.zig | 2 +- src-self-hosted/translate_c.zig | 18 ++- src/all_types.hpp | 25 ++-- src/codegen.cpp | 1 + src/ir.cpp | 246 +++++++++++++++++++++++--------- src/ir_print.cpp | 23 +-- src/translate_c.cpp | 29 ++-- test/compare_output.zig | 68 ++++----- test/compile_errors.zig | 134 +++++++++-------- test/stage1/behavior/align.zig | 4 +- test/stage1/behavior/array.zig | 4 +- test/stage1/behavior/asm.zig | 16 +-- test/stage1/behavior/async_fn.zig | 10 +- test/stage1/behavior/atomics.zig | 6 +- test/stage1/behavior/bitreverse.zig | 28 ++-- test/stage1/behavior/bool.zig | 8 +- test/stage1/behavior/bugs/1322.zig | 4 +- test/stage1/behavior/bugs/1421.zig | 2 +- test/stage1/behavior/bugs/2114.zig | 8 +- test/stage1/behavior/bugs/3046.zig | 2 +- test/stage1/behavior/byteswap.zig | 24 ++-- test/stage1/behavior/cast.zig | 24 ++-- test/stage1/behavior/defer.zig | 2 +- test/stage1/behavior/enum.zig | 4 +- test/stage1/behavior/error.zig | 4 +- test/stage1/behavior/eval.zig | 36 ++--- test/stage1/behavior/floatop.zig | 4 +- test/stage1/behavior/fn.zig | 4 +- test/stage1/behavior/if.zig | 4 +- test/stage1/behavior/import.zig | 4 +- test/stage1/behavior/math.zig | 24 ++-- test/stage1/behavior/misc.zig | 16 +-- test/stage1/behavior/popcount.zig | 2 +- test/stage1/behavior/pub_enum.zig | 2 +- test/stage1/behavior/shuffle.zig | 26 ++-- test/stage1/behavior/slicetobytes.zig | 2 +- test/stage1/behavior/struct.zig | 16 +-- test/stage1/behavior/switch.zig | 8 +- test/stage1/behavior/try.zig | 6 +- test/stage1/behavior/type_info.zig | 46 +++--- test/stage1/behavior/union.zig | 24 ++-- test/stage1/behavior/var_args.zig | 10 +- test/stage1/behavior/vector.zig | 50 +++---- test/stage1/behavior/void.zig | 2 +- test/stage1/behavior/while.zig | 16 +-- test/tests.zig | 4 +- test/translate_c.zig | 114 +++++++-------- 221 files changed, 1852 insertions(+), 1705 deletions(-)