CMakeLists.txt | 17 +- README.md | 4 +- ci/azure/linux_script | 6 +- ci/srht/update_download_page | 1 + cmake/Findlld.cmake | 1 + doc/docgen.zig | 77 +-- doc/langref.html.in | 4 +- lib/std/array_list.zig | 33 +- lib/std/array_list_sentineled.zig | 224 +++++++++ lib/std/atomic/queue.zig | 2 +- lib/std/atomic/stack.zig | 2 +- lib/std/buffer.zig | 225 --------- lib/std/build.zig | 61 ++- lib/std/build/emit_raw.zig | 12 +- lib/std/build/run.zig | 6 +- lib/std/build/translate_c.zig | 2 +- lib/std/build/write_file.zig | 4 +- lib/std/c.zig | 58 ++- lib/std/c/netbsd.zig | 44 +- lib/std/child_process.zig | 46 +- lib/std/coff.zig | 4 +- lib/std/crypto/gimli.zig | 2 + lib/std/debug.zig | 29 +- lib/std/dwarf.zig | 14 +- lib/std/dynamic_library.zig | 20 +- lib/std/event/loop.zig | 4 +- lib/std/fifo.zig | 75 ++- lib/std/fmt/parse_float.zig | 122 ++--- lib/std/fs.zig | 219 ++++---- lib/std/fs/file.zig | 2 +- lib/std/fs/get_app_data_dir.zig | 2 +- lib/std/fs/path.zig | 22 +- lib/std/fs/watch.zig | 2 +- lib/std/hash/adler.zig | 37 +- lib/std/heap.zig | 3 +- lib/std/http/headers.zig | 16 +- lib/std/io.zig | 27 +- lib/std/io/buffered_atomic_file.zig | 3 +- lib/std/io/c_out_stream.zig | 4 +- lib/std/io/in_stream.zig | 9 +- lib/std/io/peek_stream.zig | 8 +- lib/std/io/serialization.zig | 99 ++-- lib/std/json.zig | 423 ++++++++++++---- lib/std/json/test.zig | 8 +- lib/std/json/write_stream.zig | 86 +--- lib/std/mem.zig | 79 +-- lib/std/net.zig | 53 +- lib/std/os.zig | 188 +++---- lib/std/os/bits/linux.zig | 153 +++++- lib/std/os/bits/linux/arm-eabi.zig | 802 +++++++++++++++--------------- lib/std/os/bits/linux/arm64.zig | 587 +++++++++++----------- lib/std/os/bits/linux/errno-generic.zig | 27 + lib/std/os/bits/linux/i386.zig | 852 ++++++++++++++++---------------- lib/std/os/bits/linux/mipsel.zig | 745 ++++++++++++++-------------- lib/std/os/bits/linux/riscv64.zig | 590 +++++++++++----------- lib/std/os/bits/linux/x86_64.zig | 702 +++++++++++++------------- lib/std/os/bits/netbsd.zig | 140 +++++- lib/std/os/linux.zig | 456 ++++++++--------- lib/std/os/linux/arm-eabi.zig | 32 +- lib/std/os/linux/arm64.zig | 30 +- lib/std/os/linux/i386.zig | 34 +- lib/std/os/linux/mipsel.zig | 34 +- lib/std/os/linux/riscv64.zig | 30 +- lib/std/os/linux/tls.zig | 8 +- lib/std/os/linux/vdso.zig | 6 +- lib/std/os/linux/x86_64.zig | 30 +- lib/std/os/test.zig | 16 +- lib/std/os/windows.zig | 10 +- lib/std/pdb.zig | 2 +- lib/std/process.zig | 14 +- lib/std/rand.zig | 32 +- lib/std/sort.zig | 4 +- lib/std/special/build_runner.zig | 6 +- lib/std/special/compiler_rt.zig | 27 +- lib/std/special/compiler_rt/ashldi3_test.zig | 32 ++ lib/std/special/compiler_rt/ashlti3.zig | 41 -- lib/std/special/compiler_rt/ashlti3_test.zig | 4 +- lib/std/special/compiler_rt/ashrdi3_test.zig | 55 +++ lib/std/special/compiler_rt/ashrti3.zig | 42 -- lib/std/special/compiler_rt/ashrti3_test.zig | 6 +- lib/std/special/compiler_rt/clear_cache.zig | 90 ++-- lib/std/special/compiler_rt/lshrdi3_test.zig | 55 +++ lib/std/special/compiler_rt/lshrti3.zig | 41 -- lib/std/special/compiler_rt/lshrti3_test.zig | 4 +- lib/std/special/compiler_rt/shift.zig | 130 +++++ lib/std/std.zig | 2 +- lib/std/target.zig | 8 +- lib/std/thread.zig | 2 +- lib/std/zig/cross_target.zig | 26 +- lib/std/zig/parser_test.zig | 31 +- lib/std/zig/render.zig | 8 +- lib/std/zig/system.zig | 30 +- src-self-hosted/clang_options_data.zig | 135 +++-- src-self-hosted/codegen.zig | 28 +- src-self-hosted/compilation.zig | 22 +- src-self-hosted/dep_tokenizer.zig | 118 ++--- src-self-hosted/errmsg.zig | 4 +- src-self-hosted/ir.zig | 8 +- src-self-hosted/libc_installation.zig | 44 +- src-self-hosted/link.zig | 24 +- src-self-hosted/main.zig | 14 +- src-self-hosted/package.zig | 10 +- src-self-hosted/stage2.zig | 112 ++--- src-self-hosted/test.zig | 12 +- src-self-hosted/translate_c.zig | 56 ++- src-self-hosted/type.zig | 4 +- src-self-hosted/util.zig | 14 +- src-self-hosted/value.zig | 18 +- src/all_types.hpp | 34 +- src/analyze.cpp | 11 +- src/analyze.hpp | 8 +- src/bigint.cpp | 2 +- src/buffer.hpp | 5 +- src/cache_hash.cpp | 8 +- src/cache_hash.hpp | 1 + src/codegen.cpp | 171 +++---- src/compiler.cpp | 22 + src/compiler.hpp | 6 +- src/dump_analysis.cpp | 4 +- src/ir.cpp | 105 ++-- src/link.cpp | 125 ++++- src/main.cpp | 140 ++++-- src/os.cpp | 9 +- src/stage2.h | 11 +- src/target.cpp | 27 +- src/target.hpp | 1 - src/tokenizer.cpp | 15 +- src/util.hpp | 9 + src/util_base.hpp | 10 + src/zig_clang.h | 2 + test/cli.zig | 11 +- test/compile_errors.zig | 53 +- test/src/compare_output.zig | 8 +- test/src/run_translated_c.zig | 4 +- test/src/translate_c.zig | 6 +- test/stage1/behavior.zig | 3 + test/stage1/behavior/array.zig | 19 +- test/stage1/behavior/atomics.zig | 2 - test/stage1/behavior/bugs/4769_a.zig | 1 + test/stage1/behavior/bugs/4769_b.zig | 1 + test/stage1/behavior/bugs/4769_c.zig | 1 + test/stage1/behavior/cast.zig | 17 +- test/stage1/behavior/pointers.zig | 2 +- test/standalone/brace_expansion/main.zig | 48 +- test/standalone/guess_number/main.zig | 2 +- test/tests.zig | 65 ++- test/translate_c.zig | 39 ++ tools/merge_anal_dumps.zig | 24 +- tools/process_headers.zig | 8 +- tools/update_clang_options.zig | 50 +- tools/update_glibc.zig | 14 +- 151 files changed, 5715 insertions(+), 4377 deletions(-)