.github/FUNDING.yml | 2 +- CMakeLists.txt | 12 + CONTRIBUTING.md | 5 + README.md | 8 +- build.zig | 70 +- ci/azure/linux_script | 6 +- ci/azure/pipelines.yml | 18 +- ci/azure/windows_msvc_install | 2 +- doc/docgen.zig | 13 +- doc/langref.html.in | 449 ++++-- lib/std/array_list.zig | 123 +- lib/std/array_list_sentineled.zig | 4 +- lib/std/atomic/queue.zig | 4 +- lib/std/buf_map.zig | 17 +- lib/std/buf_set.zig | 8 +- lib/std/build.zig | 40 +- lib/std/build/emit_raw.zig | 6 +- lib/std/builtin.zig | 45 +- lib/std/c.zig | 17 +- lib/std/c/ast.zig | 14 +- lib/std/c/darwin.zig | 1 + lib/std/c/tokenizer.zig | 100 +- lib/std/cache_hash.zig | 4 +- lib/std/comptime_string_map.zig | 6 +- lib/std/crypto/benchmark.zig | 24 +- lib/std/crypto/test.zig | 2 +- lib/std/debug.zig | 70 +- lib/std/debug/leb128.zig | 352 +++-- lib/std/dwarf.zig | 20 +- lib/std/elf.zig | 5 +- lib/std/event/group.zig | 2 +- lib/std/fmt.zig | 485 ++++--- lib/std/fs.zig | 91 +- lib/std/fs/file.zig | 66 +- lib/std/fs/path.zig | 4 +- lib/std/fs/test.zig | 313 +++- lib/std/fs/wasi.zig | 88 +- lib/std/fs/watch.zig | 2 +- lib/std/hash/auto_hash.zig | 16 +- lib/std/hash/benchmark.zig | 10 +- lib/std/hash/cityhash.zig | 2 +- lib/std/hash/murmur.zig | 2 +- lib/std/hash_map.zig | 1101 +++++++++++---- lib/std/heap.zig | 612 ++++---- lib/std/heap/arena_allocator.zig | 32 +- lib/std/heap/logging_allocator.zig | 63 +- lib/std/http/headers.zig | 170 ++- lib/std/io/bit_reader.zig | 2 +- lib/std/io/bit_writer.zig | 4 +- lib/std/io/buffered_out_stream.zig | 2 +- lib/std/io/buffered_reader.zig | 2 +- lib/std/io/buffered_writer.zig | 2 +- lib/std/io/counting_writer.zig | 2 +- lib/std/io/fixed_buffer_stream.zig | 2 +- lib/std/io/multi_writer.zig | 2 +- lib/std/io/peek_stream.zig | 2 +- lib/std/io/reader.zig | 3 +- lib/std/io/serialization.zig | 62 +- lib/std/io/writer.zig | 2 +- lib/std/json.zig | 87 +- lib/std/json/write_stream.zig | 6 +- lib/std/log.zig | 202 +++ lib/std/math.zig | 46 +- lib/std/math/acos.zig | 2 +- lib/std/math/acosh.zig | 2 +- lib/std/math/asin.zig | 2 +- lib/std/math/asinh.zig | 2 +- lib/std/math/atan.zig | 2 +- lib/std/math/atanh.zig | 2 +- lib/std/math/big/int.zig | 22 +- lib/std/math/big/rational.zig | 4 +- lib/std/math/cbrt.zig | 2 +- lib/std/math/ceil.zig | 45 +- lib/std/math/complex/abs.zig | 2 +- lib/std/math/complex/acos.zig | 2 +- lib/std/math/complex/acosh.zig | 2 +- lib/std/math/complex/arg.zig | 2 +- lib/std/math/complex/asin.zig | 2 +- lib/std/math/complex/asinh.zig | 2 +- lib/std/math/complex/atan.zig | 2 +- lib/std/math/complex/atanh.zig | 2 +- lib/std/math/complex/conj.zig | 2 +- lib/std/math/complex/cos.zig | 2 +- lib/std/math/complex/cosh.zig | 2 +- lib/std/math/complex/exp.zig | 2 +- lib/std/math/complex/ldexp.zig | 2 +- lib/std/math/complex/log.zig | 2 +- lib/std/math/complex/proj.zig | 2 +- lib/std/math/complex/sin.zig | 2 +- lib/std/math/complex/sinh.zig | 2 +- lib/std/math/complex/sqrt.zig | 2 +- lib/std/math/complex/tan.zig | 2 +- lib/std/math/complex/tanh.zig | 2 +- lib/std/math/cos.zig | 2 +- lib/std/math/cosh.zig | 2 +- lib/std/math/exp.zig | 2 +- lib/std/math/exp2.zig | 2 +- lib/std/math/expm1.zig | 2 +- lib/std/math/expo2.zig | 2 +- lib/std/math/fabs.zig | 2 +- lib/std/math/floor.zig | 45 +- lib/std/math/frexp.zig | 2 +- lib/std/math/ilogb.zig | 2 +- lib/std/math/isfinite.zig | 2 +- lib/std/math/isinf.zig | 6 +- lib/std/math/isnan.zig | 4 +- lib/std/math/isnormal.zig | 2 +- lib/std/math/ln.zig | 2 +- lib/std/math/log10.zig | 2 +- lib/std/math/log1p.zig | 2 +- lib/std/math/log2.zig | 2 +- lib/std/math/modf.zig | 2 +- lib/std/math/round.zig | 52 +- lib/std/math/scalbn.zig | 2 +- lib/std/math/signbit.zig | 2 +- lib/std/math/sin.zig | 2 +- lib/std/math/sinh.zig | 2 +- lib/std/math/sqrt.zig | 2 +- lib/std/math/tan.zig | 2 +- lib/std/math/tanh.zig | 2 +- lib/std/math/trunc.zig | 39 +- lib/std/mem.zig | 436 ++++-- lib/std/meta.zig | 103 +- lib/std/meta/trailer_flags.zig | 145 ++ lib/std/meta/trait.zig | 21 +- lib/std/net.zig | 8 +- lib/std/os.zig | 281 +++- lib/std/os/test.zig | 170 +-- lib/std/os/uefi.zig | 2 +- lib/std/os/windows.zig | 11 +- lib/std/os/windows/bits.zig | 1 + lib/std/os/windows/ws2_32.zig | 18 +- lib/std/pdb.zig | 2 +- lib/std/priority_queue.zig | 2 +- lib/std/process.zig | 51 +- lib/std/progress.zig | 4 +- lib/std/segmented_list.zig | 4 +- lib/std/sort.zig | 38 +- lib/std/special/build_runner.zig | 4 +- lib/std/special/compiler_rt/clzsi2_test.zig | 2 +- lib/std/special/compiler_rt/int.zig | 2 +- lib/std/special/compiler_rt/udivmod.zig | 2 +- lib/std/special/test_runner.zig | 14 +- lib/std/start.zig | 2 +- lib/std/std.zig | 10 +- lib/std/target.zig | 67 +- lib/std/target/aarch64.zig | 45 - lib/std/target/amdgpu.zig | 45 - lib/std/target/arm.zig | 89 -- lib/std/target/avr.zig | 263 ---- lib/std/target/bpf.zig | 11 - lib/std/target/hexagon.zig | 13 - lib/std/target/mips.zig | 25 - lib/std/target/msp430.zig | 9 - lib/std/target/nvptx.zig | 21 - lib/std/target/powerpc.zig | 44 - lib/std/target/riscv.zig | 10 - lib/std/target/sparc.zig | 46 - lib/std/target/systemz.zig | 19 - lib/std/target/wasm.zig | 9 - lib/std/target/x86.zig | 85 -- lib/std/testing.zig | 11 +- lib/std/testing/failing_allocator.zig | 41 +- lib/std/testing/leak_count_allocator.zig | 21 +- lib/std/thread.zig | 2 +- lib/std/unicode.zig | 41 + lib/std/zig.zig | 38 + lib/std/zig/ast.zig | 981 ++++++++----- lib/std/zig/cross_target.zig | 6 +- lib/std/zig/parse.zig | 670 +++++---- lib/std/zig/parser_test.zig | 61 +- lib/std/zig/render.zig | 630 ++++++--- lib/std/zig/string_literal.zig | 2 +- lib/std/zig/system.zig | 11 +- lib/std/zig/tokenizer.zig | 5 +- src-self-hosted/Module.zig | 2350 +++++++++++++++++++++--------- src-self-hosted/TypedValue.zig | 8 + src-self-hosted/astgen.zig | 643 +++++++++ src-self-hosted/cbe.h | 8 + src-self-hosted/codegen.zig | 998 ++++++++++--- src-self-hosted/codegen/c.zig | 206 +++ src-self-hosted/codegen/x86_64.zig | 11 +- src-self-hosted/dep_tokenizer.zig | 26 +- src-self-hosted/ir.zig | 123 +- src-self-hosted/libc_installation.zig | 4 +- src-self-hosted/link.zig | 2429 +++++++++++++++++--------------- src-self-hosted/liveness.zig | 158 +++ src-self-hosted/main.zig | 275 ++-- src-self-hosted/print_targets.zig | 2 +- src-self-hosted/stage2.zig | 25 +- src-self-hosted/test.zig | 732 +++++++--- src-self-hosted/tracy.zig | 45 + src-self-hosted/translate_c.zig | 1091 +++++++------- src-self-hosted/type.zig | 594 +++++++- src-self-hosted/value.zig | 260 +++- src-self-hosted/zir.zig | 896 +++++++++--- src/all_types.hpp | 29 +- src/analyze.cpp | 54 +- src/analyze.hpp | 5 +- src/ast_render.cpp | 16 +- src/codegen.cpp | 47 +- src/compiler.cpp | 8 + src/hash_map.hpp | 432 ++++-- src/ir.cpp | 728 ++++++++-- src/ir_print.cpp | 118 +- src/list.hpp | 3 + src/os.cpp | 242 +++- src/os.hpp | 8 + src/parser.cpp | 28 +- src/softfloat_ext.cpp | 25 + src/softfloat_ext.hpp | 9 + src/tokenizer.cpp | 2 + src/tokenizer.hpp | 1 + src/util.hpp | 2 +- test/cli.zig | 27 + test/compile_errors.zig | 171 ++- test/run_translated_c.zig | 74 +- test/runtime_safety.zig | 12 +- test/stage1/behavior.zig | 3 + test/stage1/behavior/async_fn.zig | 36 +- test/stage1/behavior/bitcast.zig | 4 +- test/stage1/behavior/bugs/2114.zig | 2 +- test/stage1/behavior/bugs/3742.zig | 2 +- test/stage1/behavior/bugs/4328.zig | 8 +- test/stage1/behavior/bugs/5413.zig | 6 + test/stage1/behavior/byval_arg_var.zig | 4 +- test/stage1/behavior/call.zig | 2 +- test/stage1/behavior/cast.zig | 13 + test/stage1/behavior/enum.zig | 26 +- test/stage1/behavior/error.zig | 2 +- test/stage1/behavior/eval.zig | 11 +- test/stage1/behavior/fn.zig | 6 +- test/stage1/behavior/generics.zig | 8 +- test/stage1/behavior/math.zig | 122 ++ test/stage1/behavior/misc.zig | 7 + test/stage1/behavior/optional.zig | 16 +- test/stage1/behavior/slice.zig | 5 + test/stage1/behavior/src.zig | 17 + test/stage1/behavior/struct.zig | 43 +- test/stage1/behavior/translate_c_macros.h | 9 + test/stage1/behavior/translate_c_macros.zig | 12 + test/stage1/behavior/tuple.zig | 4 +- test/stage1/behavior/type.zig | 23 + test/stage1/behavior/type_info.zig | 51 +- test/stage1/behavior/union.zig | 23 +- test/stage1/behavior/var_args.zig | 16 +- test/stage1/behavior/vector.zig | 8 +- test/stage2/cbe.zig | 91 ++ test/stage2/compare_output.zig | 244 +++- test/stage2/compile_errors.zig | 106 +- test/stage2/test.zig | 3 +- test/stage2/zir.zig | 495 +++---- test/standalone/guess_number/main.zig | 2 +- test/tests.zig | 1 + test/translate_c.zig | 59 +- 255 files changed, 16493 insertions(+), 7827 deletions(-)