CMakeLists.txt | 1 + cmake/Findllvm.cmake | 4 + doc/docgen.zig | 5 +- doc/langref.html.in | 2 +- src-self-hosted/arg.zig | 23 +- src-self-hosted/test.zig | 4 +- src/all_types.hpp | 10 + src/analyze.cpp | 6 +- src/codegen.cpp | 237 +++++++++++++-------- src/ir.cpp | 66 ++++-- src/ir_print.cpp | 9 + std/array_list.zig | 106 ++++----- std/atomic/queue.zig | 23 +- std/atomic/stack.zig | 5 +- std/base64.zig | 13 +- std/buf_map.zig | 16 +- std/buf_set.zig | 6 +- std/buffer.zig | 15 +- std/crypto/chacha20.zig | 15 +- std/crypto/poly1305.zig | 2 +- std/crypto/test.zig | 9 +- std/crypto/x25519.zig | 24 +-- std/cstr.zig | 6 +- std/debug/index.zig | 38 +--- std/dynamic_library.zig | 3 +- std/event/channel.zig | 9 +- std/event/fs.zig | 9 +- std/event/future.zig | 3 +- std/event/group.zig | 6 +- std/event/lock.zig | 3 +- std/event/loop.zig | 5 +- std/event/net.zig | 4 +- std/event/rwlock.zig | 7 +- std/fmt/index.zig | 158 +++++++------- std/hash/adler.zig | 12 +- std/hash/crc.zig | 25 +-- std/hash/fnv.zig | 18 +- std/hash/siphash.zig | 15 +- std/hash_map.zig | 59 ++--- std/heap.zig | 141 ++++++------ std/index.zig | 15 +- std/io.zig | 17 +- std/io_test.zig | 202 +++++++++--------- std/json.zig | 17 +- std/json_test.zig | 6 +- std/lazy_init.zig | 9 +- std/linked_list.zig | 29 +-- std/math/acos.zig | 38 ++-- std/math/acosh.zig | 30 +-- std/math/asin.zig | 46 ++-- std/math/asinh.zig | 54 ++--- std/math/atan.zig | 42 ++-- std/math/atan2.zig | 110 +++++----- std/math/atanh.zig | 38 ++-- std/math/big/int.zig | 367 ++++++++++++++++---------------- std/math/cbrt.zig | 50 ++--- std/math/ceil.zig | 38 ++-- std/math/complex/abs.zig | 4 +- std/math/complex/acos.zig | 6 +- std/math/complex/acosh.zig | 6 +- std/math/complex/arg.zig | 4 +- std/math/complex/asin.zig | 6 +- std/math/complex/asinh.zig | 6 +- std/math/complex/atan.zig | 10 +- std/math/complex/atanh.zig | 6 +- std/math/complex/conj.zig | 4 +- std/math/complex/cos.zig | 6 +- std/math/complex/cosh.zig | 10 +- std/math/complex/exp.zig | 10 +- std/math/complex/index.zig | 16 +- std/math/complex/log.zig | 6 +- std/math/complex/pow.zig | 6 +- std/math/complex/proj.zig | 4 +- std/math/complex/sin.zig | 6 +- std/math/complex/sinh.zig | 10 +- std/math/complex/sqrt.zig | 10 +- std/math/complex/tan.zig | 6 +- std/math/complex/tanh.zig | 10 +- std/math/copysign.zig | 32 +-- std/math/cos.zig | 42 ++-- std/math/cosh.zig | 42 ++-- std/math/exp2.zig | 32 +-- std/math/expm1.zig | 38 ++-- std/math/fabs.zig | 38 ++-- std/math/floor.zig | 56 ++--- std/math/fma.zig | 34 +-- std/math/frexp.zig | 34 +-- std/math/hypot.zig | 58 ++--- std/math/ilogb.zig | 46 ++-- std/math/index.zig | 343 ++++++++++++++--------------- std/math/isfinite.zig | 26 +-- std/math/isinf.zig | 74 +++---- std/math/isnan.zig | 14 +- std/math/isnormal.zig | 20 +- std/math/ln.zig | 46 ++-- std/math/log.zig | 26 +-- std/math/log10.zig | 46 ++-- std/math/log1p.zig | 58 ++--- std/math/log2.zig | 42 ++-- std/math/modf.zig | 58 ++--- std/math/pow.zig | 96 ++++----- std/math/powi.zig | 138 ++++++------ std/math/round.zig | 42 ++-- std/math/scalbn.zig | 10 +- std/math/signbit.zig | 20 +- std/math/sin.zig | 52 ++--- std/math/sinh.zig | 42 ++-- std/math/sqrt.zig | 104 ++++----- std/math/tan.zig | 50 ++--- std/math/tanh.zig | 46 ++-- std/math/trunc.zig | 38 ++-- std/mem.zig | 319 +++++++++++++-------------- std/meta/index.zig | 151 ++++++------- std/meta/trait.zig | 133 ++++++------ std/mutex.zig | 6 +- std/os/child_process.zig | 1 - std/os/index.zig | 9 +- std/os/linux/test.zig | 12 +- std/os/path.zig | 115 +++++----- std/os/test.zig | 16 +- std/os/time.zig | 9 +- std/rand/index.zig | 161 +++++++------- std/rb.zig | 5 +- std/segmented_list.zig | 31 +-- std/sort.zig | 17 +- std/special/compiler_rt/divti3_test.zig | 4 +- std/special/compiler_rt/extendXfYf2_test.zig | 1 - std/special/compiler_rt/fixdfdi_test.zig | 4 +- std/special/compiler_rt/fixdfsi_test.zig | 4 +- std/special/compiler_rt/fixdfti_test.zig | 4 +- std/special/compiler_rt/fixint_test.zig | 4 +- std/special/compiler_rt/fixsfdi_test.zig | 4 +- std/special/compiler_rt/fixsfsi_test.zig | 4 +- std/special/compiler_rt/fixsfti_test.zig | 4 +- std/special/compiler_rt/fixtfdi_test.zig | 4 +- std/special/compiler_rt/fixtfsi_test.zig | 4 +- std/special/compiler_rt/fixtfti_test.zig | 4 +- std/special/compiler_rt/fixunsdfdi_test.zig | 4 +- std/special/compiler_rt/fixunsdfsi_test.zig | 4 +- std/special/compiler_rt/fixunsdfti_test.zig | 4 +- std/special/compiler_rt/fixunssfdi_test.zig | 4 +- std/special/compiler_rt/fixunssfsi_test.zig | 4 +- std/special/compiler_rt/fixunssfti_test.zig | 4 +- std/special/compiler_rt/fixunstfdi_test.zig | 4 +- std/special/compiler_rt/fixunstfsi_test.zig | 4 +- std/special/compiler_rt/fixunstfti_test.zig | 4 +- std/special/compiler_rt/floattidf_test.zig | 4 +- std/special/compiler_rt/floattisf_test.zig | 4 +- std/special/compiler_rt/floattitf_test.zig | 4 +- std/special/compiler_rt/floatunditf_test.zig | 1 - std/special/compiler_rt/floatunsitf_test.zig | 1 - std/special/compiler_rt/floatuntidf_test.zig | 4 +- std/special/compiler_rt/floatuntisf_test.zig | 4 +- std/special/compiler_rt/floatuntitf_test.zig | 4 +- std/special/compiler_rt/index.zig | 5 +- std/special/compiler_rt/muloti4_test.zig | 4 +- std/special/compiler_rt/multi3_test.zig | 4 +- std/special/compiler_rt/udivmoddi4_test.zig | 6 +- std/special/compiler_rt/udivmodti4_test.zig | 6 +- std/special/init-lib/src/main.zig | 4 +- std/statically_initialized_mutex.zig | 5 +- std/testing.zig | 152 +++++++++++++ std/unicode.zig | 119 +++++------ std/zig/ast.zig | 9 +- std/zig/parse.zig | 54 +++++ std/zig/parser_test.zig | 10 +- std/zig/render.zig | 3 + std/zig/tokenizer.zig | 4 +- test/cli.zig | 12 +- test/compile_errors.zig | 7 + test/runtime_safety.zig | 31 +++ test/stage1/behavior/align.zig | 72 +++---- test/stage1/behavior/alignof.zig | 6 +- test/stage1/behavior/array.zig | 110 +++++----- test/stage1/behavior/asm.zig | 4 +- test/stage1/behavior/atomics.zig | 32 +-- test/stage1/behavior/bit_shifting.zig | 10 +- test/stage1/behavior/bitcast.zig | 8 +- test/stage1/behavior/bitreverse.zig | 86 ++++---- test/stage1/behavior/bool.zig | 20 +- test/stage1/behavior/bswap.zig | 42 ++-- test/stage1/behavior/bugs/1076.zig | 4 +- test/stage1/behavior/bugs/1277.zig | 2 +- test/stage1/behavior/bugs/1322.zig | 4 +- test/stage1/behavior/bugs/1381.zig | 2 +- test/stage1/behavior/bugs/1421.zig | 4 +- test/stage1/behavior/bugs/1442.zig | 2 +- test/stage1/behavior/bugs/1486.zig | 6 +- test/stage1/behavior/bugs/394.zig | 4 +- test/stage1/behavior/bugs/655.zig | 4 +- test/stage1/behavior/bugs/656.zig | 4 +- test/stage1/behavior/bugs/726.zig | 6 +- test/stage1/behavior/bugs/920.zig | 2 +- test/stage1/behavior/byval_arg_var.zig | 2 +- test/stage1/behavior/cancel.zig | 14 +- test/stage1/behavior/cast.zig | 165 +++++++------- test/stage1/behavior/const_slice_child.zig | 13 +- test/stage1/behavior/coroutine_await_struct.zig | 6 +- test/stage1/behavior/coroutines.zig | 36 ++-- test/stage1/behavior/defer.zig | 24 +-- test/stage1/behavior/enum.zig | 74 +++---- test/stage1/behavior/enum_with_members.zig | 10 +- test/stage1/behavior/error.zig | 62 +++--- test/stage1/behavior/eval.zig | 238 ++++++++++----------- test/stage1/behavior/field_parent_ptr.zig | 14 +- test/stage1/behavior/fn.zig | 38 ++-- test/stage1/behavior/fn_in_struct_in_comptime.zig | 4 +- test/stage1/behavior/for.zig | 10 +- test/stage1/behavior/generics.zig | 46 ++-- test/stage1/behavior/if.zig | 4 +- test/stage1/behavior/import.zig | 6 +- test/stage1/behavior/incomplete_struct_param_tld.zig | 4 +- test/stage1/behavior/inttoptr.zig | 2 +- test/stage1/behavior/ir_block_deps.zig | 6 +- test/stage1/behavior/math.zig | 279 ++++++++++++------------ test/stage1/behavior/misc.zig | 276 ++++++++++++------------ test/stage1/behavior/namespace_depends_on_compile_var/index.zig | 6 +- test/stage1/behavior/new_stack_call.zig | 10 +- test/stage1/behavior/null.zig | 34 +-- test/stage1/behavior/optional.zig | 28 +-- test/stage1/behavior/pointers.zig | 24 +-- test/stage1/behavior/popcount.zig | 10 +- test/stage1/behavior/ptrcast.zig | 8 +- test/stage1/behavior/pub_enum/index.zig | 6 +- test/stage1/behavior/ref_var_in_if_after_if_2nd_switch_prong.zig | 10 +- test/stage1/behavior/reflection.zig | 78 +++---- test/stage1/behavior/sizeof_and_typeof.zig | 60 +++--- test/stage1/behavior/slice.zig | 16 +- test/stage1/behavior/struct.zig | 184 ++++++++-------- test/stage1/behavior/struct_contains_null_ptr_itself.zig | 4 +- test/stage1/behavior/struct_contains_slice_of_itself.zig | 26 +-- test/stage1/behavior/switch.zig | 66 +++--- test/stage1/behavior/switch_prong_err_enum.zig | 6 +- test/stage1/behavior/switch_prong_implicit_cast.zig | 4 +- test/stage1/behavior/this.zig | 8 +- test/stage1/behavior/truncate.zig | 4 +- test/stage1/behavior/try.zig | 10 +- test/stage1/behavior/type_info.zig | 182 ++++++++-------- test/stage1/behavior/undefined.zig | 28 +-- test/stage1/behavior/underscore.zig | 2 +- test/stage1/behavior/union.zig | 76 +++---- test/stage1/behavior/var_args.zig | 34 +-- test/stage1/behavior/vector.zig | 8 +- test/stage1/behavior/void.zig | 8 +- test/stage1/behavior/while.zig | 44 ++-- test/stage1/behavior/widening.zig | 8 +- test/stage1/c_abi/main.zig | 82 +++---- test/standalone/brace_expansion/main.zig | 9 +- test/standalone/issue_794/main.zig | 4 +- test/tests.zig | 16 +- 250 files changed, 4516 insertions(+), 4106 deletions(-)