Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minimal compiler changes so that you can compile to nvptx #1

Closed
wants to merge 2,860 commits into from
Closed
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Oct 28, 2022

  1. Configuration menu
    Copy the full SHA
    c3b85e4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6fc7183 View commit details
    Browse the repository at this point in the history
  3. NativeTargetInfo: remove unused error

    alichraghi authored and Vexu committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    d6943f8 View commit details
    Browse the repository at this point in the history
  4. std.sign.ecdsa: add support for incremental signatures (ziglang#13332)

    Similar to what was done for EdDSA, allow incremental creation
    and verification of ECDSA signatures.
    
    Doing so for ECDSA is trivial, and can be useful for TLS as well
    as the future package manager.
    jedisct1 authored Oct 28, 2022
    Configuration menu
    Copy the full SHA
    f28e4e0 View commit details
    Browse the repository at this point in the history
  5. std.mem: Add readPackedInt, writePackedInt, etc.

    These utility functions allow reading from (stage2) packed memory at
    runtime-known offsets.
    topolarity committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    c639c22 View commit details
    Browse the repository at this point in the history
  6. stage2: Use mem.readPackedInt etc. for packed bitcasts

    Packed memory has a well-defined layout that doesn't require
    conversion from an integer to read from. Let's use it :-)
    
    This change means that for bitcasting to/from a packed value that
    is N layers deep, we no longer have to create N temporary big-ints
    and perform N copies.
    
    Other miscellaneous improvements:
      - Adds support for casting to packed enums and vectors
      - Fixes bitcasting to/from vectors outside of a packed struct
      - Adds a fast path for bitcasting <= u/i64
      - Fixes bug when bitcasting f80 which would clear following fields
    
    This also changes the bitcast memory layout of exotic integers on
    big-endian systems to match what's empirically observed on our targets.
    Technically, this layout is not guaranteed by LLVM so we should probably
    ban bitcasts that reveal these padding bits, but for now this is an
    improvement.
    topolarity committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    3295fee View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    9d0a4b6 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    03ed0a5 View commit details
    Browse the repository at this point in the history
  9. Merge pull request ziglang#13322 from Vexu/comptime-reason

    Further enhance explanation of why expression is evaluated at comptime
    Vexu authored Oct 28, 2022
    Configuration menu
    Copy the full SHA
    bd32206 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    40b7792 View commit details
    Browse the repository at this point in the history
  11. translate-c: Better support for division in macros

    Perform C-style arithmetic conversions on operands to division operator
    in macros
    
    Closes ziglang#13162
    ehaas authored and andrewrk committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    c616141 View commit details
    Browse the repository at this point in the history
  12. crypto.sha2: Use intrinsics for SHA-256 on x86-64 and AArch64

    There's probably plenty of room to optimize these further in the
    future, but for the moment this gives ~3x improvement on Intel
    x86-64 processors, ~5x on AMD, and ~10x on M1 Macs.
    
    These extensions are very new - Most processors prior to 2020 do
    not support them.
    
    AVX-512 is a slightly older alternative that we could use on Intel
    for a much bigger performance bump, but it's been fused off on
    Intel's latest hybrid architectures and it relies on computing
    independent SHA hashes in parallel. In contrast, these SHA intrinsics
    provide the usual single-threaded, single-stream interface, and should
    continue working on new processors.
    
    AArch64 also has SHA-512 intrinsics that we could take advantage
    of in the future
    topolarity committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    10edb6d View commit details
    Browse the repository at this point in the history
  13. std.crypto: SHA-256 Properly gate comptime conditional

    This feature detection must be done at comptime so that we avoid
    generating invalid ASM for the target.
    topolarity committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    ee241c4 View commit details
    Browse the repository at this point in the history
  14. std.crypto: Optimize SHA-256 intrinsics for AMD x86-64

    This gets us most of the way back to the performance I had when
    I was using the LLVM intrinsics:
      - Intel Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz:
           190.67 MB/s (w/o intrinsics) -> 1285.08 MB/s
      - AMD EPYC 7763 (VM) @ 2.45 GHz:
           240.09 MB/s (w/o intrinsics) -> 1360.78 MB/s
      - Apple M1:
           216.96 MB/s (w/o intrinsics) -> 2133.69 MB/s
    
    Minor changes to this source can swing performance from 400 MB/s to
    1400 MB/s or... 20 MB/s, depending on how it interacts with the
    optimizer. I have a sneaking suspicion that despite LLVM inheriting
    GCC's extremely strict inline assembly semantics, its passes are
    rather skittish around inline assembly (and almost certainly, its
    instruction cost models can assume nothing)
    topolarity committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    4c1f71e View commit details
    Browse the repository at this point in the history
  15. std.crypto: Add isComptime guard around intrinsics

    Comptime code can't execute assembly code, so we need some way to
    force comptime code to use the generic path. This should be replaced
    with whatever is implemented for ziglang#868, when that day comes.
    
    I am seeing that the result for the hash is incorrect in stage1 and
    crashes stage2, so presumably this never worked correctly. I will follow
    up on that soon.
    topolarity committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    f9fe548 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    84e0c14 View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2022

  1. std.crypto: Use featureSetHas to gate intrinsics

    This also fixes a bug where the feature gating was not taking
    effect at comptime due to ziglang#6768
    topolarity committed Oct 29, 2022
    Configuration menu
    Copy the full SHA
    67fa326 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c66d3f6 View commit details
    Browse the repository at this point in the history
  3. Merge pull request ziglang#13221 from topolarity/packed-mem

    Introduce `std.mem.readPackedInt` and improve bitcasting of packed memory layouts
    andrewrk authored Oct 29, 2022
    Configuration menu
    Copy the full SHA
    c36eb4e View commit details
    Browse the repository at this point in the history
  4. Merge pull request ziglang#13272 from topolarity/sha2-intrinsics

    crypto.sha2: Use intrinsics for SHA-256 on x86-64 and AArch64
    andrewrk authored Oct 29, 2022
    Configuration menu
    Copy the full SHA
    20925b2 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    48a2783 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    61f5ea4 View commit details
    Browse the repository at this point in the history
  7. Sema: fix floatToInt to zero bit ints

    Vexu committed Oct 29, 2022
    Configuration menu
    Copy the full SHA
    1ea1228 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    9607bd9 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    d731455 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    5321afc View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    278c329 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    7705a4e View commit details
    Browse the repository at this point in the history
  13. glibc: fix race condition when building stubs

    Before, the code for building glibc stubs used a special case of the
    Cache API that did not add any file inputs, and did not use
    writeManifest(). This is not really how the Cache API is designed to
    work and it shows because there was a race condition.
    
    This commit adds as an input file the abilists file that comes with
    Zig's installation, which has the added benefit of making glibc stub
    caching properly detect cache invalidation when the user decides to
    overwrite their abilists file. This harmonizes with the rest of how Zig
    works, which intentionally allows you to hack the installation files and
    have it behave properly with the cache system.
    
    Finally, because of having any file inputs, the normal API flow of the
    Cache system can be used, eliminating the one place that used the Cache
    API in a special way. In other words, it uses writeManifest() now and
    properly obeys the cache hit/miss semantics.
    
    closes ziglang#13160
    andrewrk committed Oct 29, 2022
    Configuration menu
    Copy the full SHA
    4cfeb9a View commit details
    Browse the repository at this point in the history
  14. CI: update freebsd tarball

    andrewrk committed Oct 29, 2022
    Configuration menu
    Copy the full SHA
    3e926d8 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    a70c86e View commit details
    Browse the repository at this point in the history
  16. Merge pull request ziglang#13342 from ziglang/fix-glibc-race

    glibc: fix race condition when building stubs
    andrewrk authored Oct 29, 2022
    Configuration menu
    Copy the full SHA
    e036cc4 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    4364f51 View commit details
    Browse the repository at this point in the history
  18. std.fs: Add MAX_NAME_BYTES

    Also add some NAME_MAX or equivalent definitions where necessary
    squeek502 committed Oct 29, 2022
    Configuration menu
    Copy the full SHA
    33fdc43 View commit details
    Browse the repository at this point in the history
  19. Windows: Fix iterator name buffer size not handling all possible file…

    … name components
    
    Each u16 within a file name component can be encoded as up to 3 UTF-8 bytes, so we need to use MAX_NAME_BYTES to account for all possible UTF-8 encoded names.
    
    Fixes ziglang#8268
    squeek502 committed Oct 29, 2022
    Configuration menu
    Copy the full SHA
    c6ff1a7 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    dd0962d View commit details
    Browse the repository at this point in the history
  21. Set wasi MAX_NAME_BYTES to minimum of the rest of the supported platf…

    …orms
    
    This is a slightly weird situation, because the 'real' value may depend on the host platform that the WASI is being executed on.
    squeek502 committed Oct 29, 2022
    Configuration menu
    Copy the full SHA
    c5d2316 View commit details
    Browse the repository at this point in the history
  22. Make MAX_NAME_BYTES on WASI equivalent to the max of the other platforms

    Make the test use the minimum length and set MAX_NAME_BYTES to the maximum so that:
    - the test will work on any host platform
    - *and* the MAX_NAME_BYTES will be able to hold the max file name component on any host platform
    squeek502 committed Oct 29, 2022
    Configuration menu
    Copy the full SHA
    348f735 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    db80225 View commit details
    Browse the repository at this point in the history
  24. Merge pull request ziglang#13082 from g-w1/unnamed-decls-and-relocs-p9

    Plan9: Fix The Backend
    andrewrk authored Oct 29, 2022
    Configuration menu
    Copy the full SHA
    28dc208 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    949cca9 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    09a96cd View commit details
    Browse the repository at this point in the history

Commits on Oct 30, 2022

  1. Merge pull request ziglang#13093 from jacobly0/backend-fixes

    C backend fixes
    andrewrk authored Oct 30, 2022
    Configuration menu
    Copy the full SHA
    5f5a20e View commit details
    Browse the repository at this point in the history
  2. Merge pull request ziglang#13153 from squeek502/iterator-filename-limits

    Windows: Fix Iterator name buffer size not handling all possible file name components
    andrewrk authored Oct 30, 2022
    Configuration menu
    Copy the full SHA
    209a0d2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c8f1ea4 View commit details
    Browse the repository at this point in the history
  4. CI: drone: shuffle some tests around

    We have to balance the timings to end up below the two hour mark.
    andrewrk committed Oct 30, 2022
    Configuration menu
    Copy the full SHA
    fbd1390 View commit details
    Browse the repository at this point in the history
  5. std: re-enable auto hash test

    It was temporarily disabled due to a self-hosted compiler
    miscompilation.
    
    closes ziglang#12178
    andrewrk committed Oct 30, 2022
    Configuration menu
    Copy the full SHA
    5339cac View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    27bcd4e View commit details
    Browse the repository at this point in the history
  7. macho: fix regression in dead strip for x86_64

    Correctly handle calculating encompassing atoms for local
    relocations (`r_extern == 0`).
    kubkon committed Oct 30, 2022
    Configuration menu
    Copy the full SHA
    9b0c555 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    17df350 View commit details
    Browse the repository at this point in the history
  9. Merge pull request ziglang#13356 from ziglang/macho-no-dupe

    macho: fix performance regression for x86_64 and -dead_strip
    kubkon authored Oct 30, 2022
    Configuration menu
    Copy the full SHA
    2b25d3c View commit details
    Browse the repository at this point in the history
  10. autodoc: update to new func zir body structure

    this is a hack meant to restore functionality for the upcoming release,
    a proper analysis of the new zir structure is required to make a robust
    change.
    kristoff-it committed Oct 30, 2022
    Configuration menu
    Copy the full SHA
    d4487b6 View commit details
    Browse the repository at this point in the history
  11. Merge pull request ziglang#13300 from jcalabro/master

    Better Autodoc Src File Links
    kristoff-it authored Oct 30, 2022
    Configuration menu
    Copy the full SHA
    1696434 View commit details
    Browse the repository at this point in the history
  12. change uefi packed structs to new integer backed syntax (ziglang#13173)

    * std.os.uefi: integer backed structs, add tests to catch regressions
    
    device_path_protocol now uses extern structs with align(1) fields because
    the transition to integer backed packed struct broke alignment
    
    added comptime asserts that device_path_protocol structs do not violate
    alignment and size specifications
    truemedian authored Oct 30, 2022
    Configuration menu
    Copy the full SHA
    40e84a2 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    8caed48 View commit details
    Browse the repository at this point in the history
  14. stage1: Make x and false/x or true comptime-known

    We need to be careful to respect side-effects/branching in these
    cases, but otherwise this behaves very similarly to multiplication.
    `lhs and rhs == false` if either lhs or rhs is comptime-known `false`,
    just like `lhs * rhs == 0` if either lhs or rhs is comptime-known to
    be zero.
    
    Similar reasoning applies to `lhs or rhs`.
    topolarity committed Oct 30, 2022
    Configuration menu
    Copy the full SHA
    2f732de View commit details
    Browse the repository at this point in the history
  15. AstGen: avoid accessing value from inner scope

    While continue expressions can access the capture, so ensure that it is
    unwrapped in an outer scope.
    jacobly0 committed Oct 30, 2022
    Configuration menu
    Copy the full SHA
    5c3a486 View commit details
    Browse the repository at this point in the history
  16. stage2: Make x and false/x or true comptime-known

    Same as preceding change, but for stage2.
    topolarity committed Oct 30, 2022
    Configuration menu
    Copy the full SHA
    ca332f5 View commit details
    Browse the repository at this point in the history
  17. Sema: avoid comptime null unwrap

    This avoids a crash analyzing check_comptime_control_flow.
    jacobly0 committed Oct 30, 2022
    Configuration menu
    Copy the full SHA
    01d76d4 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    a77d89a View commit details
    Browse the repository at this point in the history
  19. zig test: forward target CLI args to zig run when using -ofmt=c

    Previously, if you used `zig test -ofmt=c -target foobar` then Zig would
    try to compile the generated C code with the native target instead of
    "foobar".
    
    With this change, `--test-cmd` with e.g. QEMU still won't work, but at
    least the binary will get compiled for the correct target.
    andrewrk committed Oct 30, 2022
    Configuration menu
    Copy the full SHA
    9b54c9d View commit details
    Browse the repository at this point in the history
  20. std.heap.PageAllocator: add check for large allocation

    Instead of making the memory alignment functions more complicated, I
    added more API documentation for their existing semantics.
    
    closes ziglang#12118
    closes ziglang#12135
    andrewrk committed Oct 30, 2022
    Configuration menu
    Copy the full SHA
    3f30030 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    a5c96c4 View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2022

  1. re-apply "Fix C include files not being in whole cache (ziglang#11365

    …)"
    
    This reverts commit 06310e3, reapplying
    commit a430630.
    
    I deeply apologize to @moosichu and those affected by this bug. The
    original fix was actually fine. When I reverted it, I misremembered
    how the Cache API works. I thought the fix was going to introduce
    nondeterminism into the hash, but I forgot that the order of files in
    the manifest doesn't actually matter when checking for a cache hit.
    
    Actually, it does matter a little bit. This fix has a subtle downside
    which is that it does introduce the possibility of false negatives when
    checking for cache hits of 2+ iterations ago. For example, if the code
    goes from "foo", to "bar", and then back to "foo", it may look like a
    cache miss when it should have been a hit because 2 iterations ago the
    code was the same. However, this is an uncommon use case, and all it
    does is cause a bit of wasted time and disk space. That said, my
    suggestion from earlier still applies and would be a nice follow-up
    enhancement to this fix:
    
    The proper solution to this is to, in whole cache mode, append the hash
    inputs to some data structure, and then after the compilation is
    complete, do some kind of sorting on the hash inputs so that they will
    be the same order every time, then apply them in sequence. No lock on
    the Cache object is needed for this scheme.
    
    closes ziglang#11063
    andrewrk committed Oct 31, 2022
    Configuration menu
    Copy the full SHA
    30b8b29 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3e12610 View commit details
    Browse the repository at this point in the history
  3. Merge pull request ziglang#13361 from jacobly0/while-cont-scope

    AstGen: avoid access to capture defined in an inner scope from a continue expression
    andrewrk authored Oct 31, 2022
    Configuration menu
    Copy the full SHA
    d4f668b View commit details
    Browse the repository at this point in the history
  4. mingw-w64: add gdiplus def files

    andrewrk committed Oct 31, 2022
    Configuration menu
    Copy the full SHA
    6d999ab View commit details
    Browse the repository at this point in the history
  5. Merge pull request ziglang#13360 from topolarity/comptime-bool-binops

    Make `x and false` and `x or true` comptime-known
    andrewrk authored Oct 31, 2022
    Configuration menu
    Copy the full SHA
    ef761c2 View commit details
    Browse the repository at this point in the history
  6. std.heap: make wasm32 PageAllocator handle large allocation

    When a number of bytes to be allocated is so great that alignForward()
    is not possible, return `error.OutOfMemory`.
    
    Companion commit to 3f30030.
    andrewrk committed Oct 31, 2022
    Configuration menu
    Copy the full SHA
    d022426 View commit details
    Browse the repository at this point in the history
  7. link/MachO: Avoid depending on host PATH_MAX

    Repeat of a4eb221 for the newly-synchronized zld code.
    
    Restores ability to compile Zig for WASI.
    topolarity authored and andrewrk committed Oct 31, 2022
    Configuration menu
    Copy the full SHA
    6f2408a View commit details
    Browse the repository at this point in the history
  8. stage2: Add explicit type qualifier to workaround ziglang#13366

    Depending on how ziglang#13366 is resolved, this code should arguably have
    been rejected with a compile error in the first place.
    topolarity authored and andrewrk committed Oct 31, 2022
    Configuration menu
    Copy the full SHA
    049e602 View commit details
    Browse the repository at this point in the history
  9. Release 0.10.0

    andrewrk committed Oct 31, 2022
    Configuration menu
    Copy the full SHA
    0c17017 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    841235b View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    cbdc91e View commit details
    Browse the repository at this point in the history
  12. ci: add 0.10.0 release data

    andrewrk committed Oct 31, 2022
    Configuration menu
    Copy the full SHA
    0bbb000 View commit details
    Browse the repository at this point in the history

Commits on Nov 1, 2022

  1. cbe: improve support for non-native float types

     * Fix _start on aarch64.
     * Add fallbacks when a float type is unsupported.
    
    Fixes ziglang#13357
    jacobly0 committed Nov 1, 2022
    Configuration menu
    Copy the full SHA
    b945d3e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b35514e View commit details
    Browse the repository at this point in the history
  3. cbe: fix gcc warnings

    jacobly0 committed Nov 1, 2022
    Configuration menu
    Copy the full SHA
    ff83296 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9e44710 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ddb9eac View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2943df0 View commit details
    Browse the repository at this point in the history
  7. llvm: mangle extern Wasm functions

    When Wasm extern functions contain the same name, but have a
    different module name such as `extern "a"` vs `extern "b"` LLVM will
    currently resolve the two functions to the same symbol. By mangling
    the name of the symbol, we ensure the functions are resolved
    seperately. We mangle the name by applying <name>|<module> where
    module is also known as the library name.
    Luukdegram committed Nov 1, 2022
    Configuration menu
    Copy the full SHA
    66bcc55 View commit details
    Browse the repository at this point in the history
  8. test/link: add linker test to verify mangling

    This adds a simple linker test to ensure the built library contains
    an import entry for each extern function call that was mangled.
    Luukdegram committed Nov 1, 2022
    Configuration menu
    Copy the full SHA
    ef0df24 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    1780d7a View commit details
    Browse the repository at this point in the history
  10. std.crypto.onetimeauth.Ghash: make GHASH 2 - 2.5x faster (ziglang#13374)

    Rewrite GHASH to use 128-bit multiplication over non-reversed
    integers, and up to 8 blocks aggregated reduction.
    
    lib/std/crypto/benchmark.zig results:
    
    Xeon E5:
      Before: 1604 MiB/s
       After: 4005 MiB/s
    
    Apple M1:
      Before: 2769 MiB/s
       After: 6014 MiB/s
    
    This also makes AES-GCM faster by the way.
    jedisct1 authored Nov 1, 2022
    Configuration menu
    Copy the full SHA
    0d192ee View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    d2a5a36 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    3ecec50 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    8a022d9 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    4e07798 View commit details
    Browse the repository at this point in the history
  15. stage2 AArch64: misc fixes, enable printing in test runner

    - Fixed missing airRetPtr implementation
    - Fixed wrong pop_regs order
    - Fixed wrong source and destination register in store
    joachimschmidt557 committed Nov 1, 2022
    Configuration menu
    Copy the full SHA
    3051fab View commit details
    Browse the repository at this point in the history
  16. cli: set sysroot when --sysroot option was passed

    Fixes regression introduced in ziglang@0b47e69
    kubkon committed Nov 1, 2022
    Configuration menu
    Copy the full SHA
    ebf9ffd View commit details
    Browse the repository at this point in the history

Commits on Nov 2, 2022

  1. std: avoid vector usage with the C backend

    Vectors are not yet implemented in the C backend, so no reason to
    prevent code using the standard library from compiling in the meantime.
    jacobly0 committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    93d60d0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    757db66 View commit details
    Browse the repository at this point in the history
  3. cbe: fix threadlocal

    jacobly0 committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    91fe0b8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    fb8c08d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8e52be1 View commit details
    Browse the repository at this point in the history
  6. cbe: fix optional access

    jacobly0 committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    071404f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    0976343 View commit details
    Browse the repository at this point in the history
  8. cbe: incorrectly implement volatile memset

    This will have to be replaced with manual volatile stores.
    jacobly0 committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    4d59409 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    9b2db56 View commit details
    Browse the repository at this point in the history
  10. x86: cleanup inline asm

    Multiple outputs work now, so use that instead of deleting clobbers.
    jacobly0 committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    771dadc View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    d8635af View commit details
    Browse the repository at this point in the history
  12. Merge pull request ziglang#13404 from joachimschmidt557/stage2-aarch64

    stage2 aarch64: enable printing test results in the test runner
    joachimschmidt557 authored Nov 2, 2022
    Configuration menu
    Copy the full SHA
    81c2767 View commit details
    Browse the repository at this point in the history
  13. stage2 llvm: Respect alignment for .union_init

    Resolves ziglang#13232.
    topolarity authored and Vexu committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    c22f17e View commit details
    Browse the repository at this point in the history
  14. cbe: hack around invalid Air

    Can be changed to `!inst_ty.hisRuntimeBitsIgnoreComptime()` when the
    "result location with inferred type ends up being pointer to comptime_int"
    test stops producing Air containing a `bitcast(*comptime_int, ...)`.
    
    See ziglang#13410
    jacobly0 committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    5f31070 View commit details
    Browse the repository at this point in the history
  15. cbe: ignore comptime fields when generating tuple typedefs

    This vastly reduces the amount of deduplication state we need to deal with.
    jacobly0 committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    37c104a View commit details
    Browse the repository at this point in the history
  16. Merge pull request ziglang#13396 from Luukdegram/fix-12880

    llvm: mangle extern function names for Wasm target
    andrewrk authored Nov 2, 2022
    Configuration menu
    Copy the full SHA
    57dbeb9 View commit details
    Browse the repository at this point in the history
  17. Merge pull request ziglang#13389 from jacobly0/fix-only-c

    cbe: enough fixes for `-Donly-c` to be able to produce an executable
    andrewrk authored Nov 2, 2022
    Configuration menu
    Copy the full SHA
    e50789f View commit details
    Browse the repository at this point in the history
  18. stage2: Ensure f128 alignment matches c_longdouble alignment

    On platforms where c_longdouble is 128-bits, interop with C code
    is simplified by making f128 match the alignment of c_longdouble.
    
    I intended to make this change as part of ziglang#13257, but I missed this
    part.
    topolarity authored and andrewrk committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    98b6099 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    b40fc70 View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2022

  1. cbe: fix extern

    jacobly0 committed Nov 3, 2022
    Configuration menu
    Copy the full SHA
    fa46f9a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4537c1b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    085f6fd View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f02b8a9 View commit details
    Browse the repository at this point in the history
  5. Merge pull request ziglang#13420 from jacobly0/c-backend

    cbe: enough fixes to bootstrap a compiler with a working c backend
    Vexu authored Nov 3, 2022
    Configuration menu
    Copy the full SHA
    b2f8c1f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    e64eef3 View commit details
    Browse the repository at this point in the history
  7. std.crypto.pwhash.bcrypt: inline the Feistel network function (ziglan…

    …g#13416)
    
    std/crypto/benchmark.zig results:
    
    * Intel i5
    
    before: 3.144 s/ops
     after: 1.922 s/ops
    
    * Apple M1
    
    before: 2.067 s/ops
     after: 1.373 s/ops
    jedisct1 authored Nov 3, 2022
    Configuration menu
    Copy the full SHA
    9679353 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    480c3c4 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    3465203 View commit details
    Browse the repository at this point in the history
  10. Merge pull request ziglang#13276 from r00ster91/stem

    std.fs.path: add stem()
    Vexu authored Nov 3, 2022
    Configuration menu
    Copy the full SHA
    678f3f6 View commit details
    Browse the repository at this point in the history
  11. Add docstrings to some functions in std.meta

    Yujiri authored and Vexu committed Nov 3, 2022
    Configuration menu
    Copy the full SHA
    b19161b View commit details
    Browse the repository at this point in the history
  12. CI: windows: update tarball

    Vexu committed Nov 3, 2022
    Configuration menu
    Copy the full SHA
    577daab View commit details
    Browse the repository at this point in the history
  13. all: rename i386 to x86

    alichraghi committed Nov 3, 2022
    Configuration menu
    Copy the full SHA
    f5f1f8c View commit details
    Browse the repository at this point in the history
  14. Merge pull request ziglang#13430 from ziglang/stack-probe-msvc

    Miscellaneous arm64 windows fixes
    andrewrk authored Nov 3, 2022
    Configuration menu
    Copy the full SHA
    42755a1 View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2022

  1. Sema: make InferredErrorSet deterministic

    Empirically, this `AutoHashMapUnmanaged` -> `AutoArrayHashMapUnmanaged`
    change fixes all non-determinism in `ReleaseFast` build artifacts.
    
    Closes ziglang#12183
    jacobly0 authored and andrewrk committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    cbed6bb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ea54c9a View commit details
    Browse the repository at this point in the history
  3. Merge pull request ziglang#13338 from Vexu/stage2-compile-errors

    Improve some error messages
    Vexu authored Nov 4, 2022
    Configuration menu
    Copy the full SHA
    8c4faa5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    986b7ce View commit details
    Browse the repository at this point in the history
  5. std.os: Add IGN coverage to sigaction tests

    * Should start failing on aarch64 and other word-aligned CPUs.
    ryanschneider committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    64b3ffd View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7f1f2e6 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a68b27c View commit details
    Browse the repository at this point in the history
  8. Sema: detect division overflow

    Vexu committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    e6b3cb5 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    799a558 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    35afa3f View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    42db468 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    51b1083 View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2022

  1. CI: add stage3/stage4 determinism check

    Makes sure that ziglang#12183 will not regress.
    andrewrk committed Nov 5, 2022
    Configuration menu
    Copy the full SHA
    e9a1249 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1d68045 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    df0212b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1fe0b58 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    62ae365 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    53a9661 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d80203b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    205421c View commit details
    Browse the repository at this point in the history
  9. coff: compile and link simple exit program on arm64

    * make image base target dependent
    * fix relocs to imports
    kubkon committed Nov 5, 2022
    Configuration menu
    Copy the full SHA
    83d89a0 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    9618fdc View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    59fa049 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    165ae04 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    f92e7be View commit details
    Browse the repository at this point in the history
  14. Merge pull request ziglang#13444 from ziglang/arm64-coff

    aarch64,coff: lift-off!
    kubkon authored Nov 5, 2022
    Configuration menu
    Copy the full SHA
    28288dc View commit details
    Browse the repository at this point in the history
  15. Sema: coerce elements of array cat

    Vexu committed Nov 5, 2022
    Configuration menu
    Copy the full SHA
    f96748e View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    ea48f06 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    5d28d17 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    aea617c View commit details
    Browse the repository at this point in the history
  19. Improve doc comments for two functions (ziglang#13456)

    * std.heap: fix function name in doc comment
    
    * std.mem: document return value of `replace`
    delitako authored Nov 5, 2022
    Configuration menu
    Copy the full SHA
    c8a5ad6 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    aaaa7df View commit details
    Browse the repository at this point in the history
  21. macho: do not zero-out file if there are no nonzerofill sects

    If the `__DATA` segment comprises of only zerofill sections, do not
    accidentally zero out all of file.
    kubkon committed Nov 5, 2022
    Configuration menu
    Copy the full SHA
    76fb3e0 View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2022

  1. Merge pull request ziglang#13459 from ziglang/issue-13457

    macho: do not zero-out file if there are no nonzerofill sects
    kubkon authored Nov 6, 2022
    Configuration menu
    Copy the full SHA
    5ef33e7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1aeef29 View commit details
    Browse the repository at this point in the history
  3. Revert "x86" CPU model (not arch) back to "i386"

    PR ziglang#13101 recently renamed the "i386" architecture to "x86", and it
    seems the specific CPU model got swept up in that. "x86" is an umbrella
    term that describes a family of CPUs, and the "i386" is the oldest
    supported model under that umbrella.
    jayschwa authored and kubkon committed Nov 6, 2022
    Configuration menu
    Copy the full SHA
    694d883 View commit details
    Browse the repository at this point in the history
  4. macho: parse weak symbols in tbds

    However, we will treat them as standard imports rather than refs
    to weak imports until I investigate more how it actually works
    underneath.
    kubkon committed Nov 6, 2022
    Configuration menu
    Copy the full SHA
    351031b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    72769f6 View commit details
    Browse the repository at this point in the history
  6. std.os.linux.T: translate more MIPS values

    This fixes the broken terminal for me and thus fixes ziglang#13198.
    wooster0 authored and Vexu committed Nov 6, 2022
    Configuration menu
    Copy the full SHA
    b83e4d9 View commit details
    Browse the repository at this point in the history
  7. Merge pull request ziglang#13463 from ziglang/fix-13056

    macho: parse weak imports in tbd descriptors
    kubkon authored Nov 6, 2022
    Configuration menu
    Copy the full SHA
    4c719ad View commit details
    Browse the repository at this point in the history
  8. crypto.salsa20: make the number of rounds a comptime parameter (zigla…

    …ng#13442)
    
    ...instead of hard-coding it to 20.
    
    - This is consistent with the ChaCha implementation
    - NaCl and libsodium, that this API is designed to interop with,
    also support 8 and 12 round variants. The 12 round variant, in
    particular, provides the same security level as the 20 round variant,
    but is obviously faster.
    - scrypt currently uses its own non optimized version of Salsa, just
    because it use 8 rounds instead of 20. This will help remove code
    duplication.
    
    No behavior nor public API changes. The Salsa20 and XSalsa20 still
    represent the 20-round variant.
    jedisct1 authored Nov 6, 2022
    Configuration menu
    Copy the full SHA
    907f3ef View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2022

  1. crypto.core.aes: process 6 block in parallel instead of 8 on aarch64 (z…

    …iglang#13473)
    
    * crypto.core.aes: process 6 block in parallel instead of 8 on aarch64
    
    At least on Apple Silicon, this is slightly faster than 8 blocks.
    
    * AES: add parallel blocks for tigerlake, rocketlake, alderlake, zen3
    jedisct1 authored Nov 7, 2022
    Configuration menu
    Copy the full SHA
    32563e6 View commit details
    Browse the repository at this point in the history
  2. Merge pull request ziglang#13446 from Vexu/stage2-fixes

    Stage2 bug fixes
    Vexu authored Nov 7, 2022
    Configuration menu
    Copy the full SHA
    dc128f4 View commit details
    Browse the repository at this point in the history
  3. langref.html.in: Simplify printing types in examples

    zig stdlib fmt has a formatter for types which prints the type name.  So,
    just use @typeof(type) instead of the longer @typeinfo(@typeof(type)).
    rganesan authored and Vexu committed Nov 7, 2022
    Configuration menu
    Copy the full SHA
    88d2e4f View commit details
    Browse the repository at this point in the history
  4. std.crypto: make ghash faster, esp. for small messages (ziglang#13464)

    * std.crypto: make ghash faster, esp. for small messages
    
    Aggregated reduction requires 5 additional multiplications (to
    precompute the powers of H), in order to save 2 multiplications
    per batch.
    
    So, only use large batches when it's actually interesting to do so.
    
    For the last blocks, reuse the precomputations in order to perform
    a single reduction.
    
    Also, even in .ReleaseSmall, allow 2-block aggregation.
    The speedup is worth it, and the code increase is reasonable.
    
    And in .ReleaseFast, bump the upper batch size up to 16.
    
    Leverage comptime by the way instead of duplicating code.
    
    std/crypto/benchmark.zig on Apple M1:
    
        Zig 0.10.0: 2769 MiB/s
            Before: 6014 MiB/s
             After: 7334 MiB/s
    
    Normalize function names by the way.
    
    * Change clmul() to accept the half to be processed
    
    This avoids a bunch of truncate() calls.
    
    * Add more ghash tests to check all code paths
    jedisct1 authored Nov 7, 2022
    Configuration menu
    Copy the full SHA
    7d48cb1 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2022

  1. Configuration menu
    Copy the full SHA
    cd7cbed View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0de56d1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    35bd536 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a074494 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0d55687 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    45f65c8 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    32ad218 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    179f169 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    e83590d View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    7145064 View commit details
    Browse the repository at this point in the history
  11. crypto.ghash: compatibility with stage1

    Defining the selector enum outside the function definition is
    required for stage1.
    jedisct1 committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    36e618a View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    9db63d4 View commit details
    Browse the repository at this point in the history
  13. CI: stop using cloud.drone.io

    This service stopped working two days ago for unknown reasons. Until it
    is determined how to get it working again, or we switch to a different
    CI provider for aarch64, this CI test coverage is disabled so that
    we can continue to use the CI for other targets.
    andrewrk committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    a65ba6c View commit details
    Browse the repository at this point in the history
  14. macho: fix 32bit build

    kubkon committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    188ad31 View commit details
    Browse the repository at this point in the history

Commits on Nov 9, 2022

  1. Merge pull request ziglang#13487 from ziglang/zld-dwarf-string

    macho: misc DWARF parser fixes
    kubkon authored Nov 9, 2022
    Configuration menu
    Copy the full SHA
    a2e6717 View commit details
    Browse the repository at this point in the history
  2. Fixes to linux/bpf/btf.zig

    - the meaning of packed structs changed in zig 0.10. adjust accordingly.
      Use "extern struct" for the cases that directly map to C structs.
    
    - Add new type info kinds, like enum64 and DeclTag
    
    - change the Type enum to use the canonical names from libbpf.
      This is more predictable when comparing with external BPF
      documentation (than invented synonyms that need to be guessed)
    bfredl authored and Vexu committed Nov 9, 2022
    Configuration menu
    Copy the full SHA
    95f989a View commit details
    Browse the repository at this point in the history
  3. llvm: implement packed unions

    Vexu committed Nov 9, 2022
    Configuration menu
    Copy the full SHA
    61842da View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d1e7be0 View commit details
    Browse the repository at this point in the history
  5. Merge pull request ziglang#13418 from ryanschneider/signal-alignment-…

    …13216
    
    std.os: fix alignment of Sigaction.handler_fn
    Vexu authored Nov 9, 2022
    Configuration menu
    Copy the full SHA
    41b7e40 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7007ecd View commit details
    Browse the repository at this point in the history
  7. aarch64: emit DWARF debug info for fn params and locals

    We postpone emitting debug info until *after* we generate the function
    so that we have an idea of the consumed stack space. The stack offsets
    encoded within DWARF are with respect to the frame pointer `.fp`.
    kubkon committed Nov 9, 2022
    Configuration menu
    Copy the full SHA
    0285209 View commit details
    Browse the repository at this point in the history
  8. x86_64: add DWARF encoding for vector registers

    Clean up how we handle emitting of DWARF debug info for `x86_64`
    codegen.
    kubkon committed Nov 9, 2022
    Configuration menu
    Copy the full SHA
    df09d9c View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    31e755d View commit details
    Browse the repository at this point in the history
  10. Merge pull request ziglang#13485 from ziglang/arm64-non-null-actual

    aarch64: optionals
    kubkon authored Nov 9, 2022
    Configuration menu
    Copy the full SHA
    2d5fbbb View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2022

  1. Configuration menu
    Copy the full SHA
    0914e0a View commit details
    Browse the repository at this point in the history
  2. Windows: Explicitly pass PDB paths to lld-link

    On Windows, lld-link resolves PDB output paths using `/` and embeds the
    result in the final executable, which breaks some native tooling like
    WPR/WPA. This commit overrides the default behavior of lld-link by
    explicitly setting the output PDB filename and binary-embedded path.
    jcmoyer authored and kubkon committed Nov 10, 2022
    Configuration menu
    Copy the full SHA
    dd8df1c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1357790 View commit details
    Browse the repository at this point in the history
  4. Merge pull request ziglang#13495 from ziglang/macho-dsym

    stage2: misc DWARF debug info fixes and additions for x86_64 and aarch64
    kubkon authored Nov 10, 2022
    Configuration menu
    Copy the full SHA
    4b36378 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    04b8ce5 View commit details
    Browse the repository at this point in the history
  6. crypto.ghash: define aggregate tresholds as blocks, not bytes (ziglan…

    …g#13507)
    
    These constants were read as a block count in initForBlockCount()
    but at the same time, as a size in update().
    
    The unit could be blocks or bytes, but we should use the same one
    everywhere.
    
    So, use blocks as intended.
    
    Fixes ziglang#13506
    jedisct1 authored Nov 10, 2022
    Configuration menu
    Copy the full SHA
    59af641 View commit details
    Browse the repository at this point in the history
  7. stage2: Fix comptime array initialization

    This is a follow-up to 9dc98fb, which made comptime initialization
    patterns for union/struct more robust, especially when storing to
    comptime-known pointers (and globals).
    
    Resolves ziglang#13063.
    topolarity committed Nov 10, 2022
    Configuration menu
    Copy the full SHA
    ff69972 View commit details
    Browse the repository at this point in the history
  8. stage2: Be more strict about eliding loads

    This change makes any of the `*_val` instructions check whether it's
    safe to elide copies for by-ref types rather than performing this
    elision blindly.
    
    AIR instructions fixed:
     - .array_elem_val
     - .struct_field_val
     - .unwrap_errunion_payload
     - .try
     - .optional_payload
    
    These now all respect value semantics, as expected.
    
    P.S. Thanks to Andrew for the new way to approach this. Many of the
    lines here are from his recommended change, which comes with the
    significant advantage that loads are now as small as the intervening
    memory access allows.
    
    Co-authored by: Andrew Kelley <andrew@ziglang.org>
    topolarity committed Nov 10, 2022
    Configuration menu
    Copy the full SHA
    8f38800 View commit details
    Browse the repository at this point in the history
  9. stage2 llvm: Elide more loads

    Adds optimizations for by-ref types to:
      - .struct_field_val
      - .slice_elem_val
      - .ptr_elem_val
    
    I would have expected LLVM to be able to optimize away these
    temporaries since we don't leak pointers to them and they are fed
    straight from def to use, but empirically it does not.
    
    Resolves ziglang#12713
    Resolves ziglang#12638
    topolarity committed Nov 10, 2022
    Configuration menu
    Copy the full SHA
    a2f4de1 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    fbda156 View commit details
    Browse the repository at this point in the history
  11. Add test case for ziglang#12043

    This bug is already resolved, just want to make sure we don't lose
    the test case. Closes ziglang#12043
    topolarity committed Nov 10, 2022
    Configuration menu
    Copy the full SHA
    b135709 View commit details
    Browse the repository at this point in the history
  12. stage2: Rename Value.compare to compareAll, etc.

    These functions have a very error-prone API. They are essentially
    `all(cmp(op, ...))` but that's not reflected in the name.
    
    This renames these functions to `compareAllAgainstZero...` etc.
    for clarity and fixes >20 locations where the predicate was
    incorrect.
    
    In the future, the scalar `compare` should probably be split off
    from the vector comparison. Rank-polymorphic programming is great,
    but a proper implementation in Zig would decouple comparison and
    reduction, which then needs a way to fuse ops at comptime.
    topolarity committed Nov 10, 2022
    Configuration menu
    Copy the full SHA
    7b978bf View commit details
    Browse the repository at this point in the history
  13. Sema: avoid breaking hash contract when instantiating generic functions

     * Add tagName to Value which behaves like @TagName.
     * Add hashUncoerced to Value as an alternative to hash when we want to
       produce the same hash for value that can coerce to each other.
     * Hash owner_decl instead of module_fn in Sema.instantiateGenericCall
       since Module.Decl.Index is not affected by ASLR like *Module.Fn was,
       and also because GenericCallAdapter.eql was already doing this.
     * Use Value.hashUncoerced in Sema.instantiateGenericCall because
       GenericCallAdapter.eql uses Value.eqlAdvanced to compare args, which
       ignores coersions.
     * Add revealed missing cases to Value.eqlAdvanced.
    
    Without these changes, we were breaking the hash contract for
    monomorphed_funcs, and were generating different hashes for values that
    compared equal.  This resulted in a 0.2% chance when compiling
    self-hosted of producing a different output, which depended on
    fingerprint collisions of hashes that were affected by ASLR.  Normally,
    the different hashes would have resulted in equal checks being skipped,
    but in the case of a fingerprint collision, the truth would be revealed
    and the compiler's behavior would diverge.
    jacobly0 authored and andrewrk committed Nov 10, 2022
    Configuration menu
    Copy the full SHA
    e40c38d View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2022

  1. Merge pull request ziglang#13074 from topolarity/stage2-opt

    stage2: Miscellaneous fixes to vector arithmetic and copy elision
    andrewrk authored Nov 11, 2022
    Configuration menu
    Copy the full SHA
    892fb0f View commit details
    Browse the repository at this point in the history
  2. cmake: Mark <root>/.git/HEAD as a configure dependency

    This ensures that the Zig version will be re-computed when jumping
    through the source tree, which is especially important if bisecting
    across AstGen- or other changes that must not use the old cache.
    topolarity authored and andrewrk committed Nov 11, 2022
    Configuration menu
    Copy the full SHA
    b605cb2 View commit details
    Browse the repository at this point in the history
  3. stage2: Support modifiers in inline asm

    These are supported using %[ident:mod] syntax. This allows requesting,
    e.g., the "w" (32-bit) vs. "x" (64-bit) views of AArch64 registers.
    
    See https://llvm.org/docs/LangRef.html#asm-template-argument-modifiers
    topolarity authored and Vexu committed Nov 11, 2022
    Configuration menu
    Copy the full SHA
    2897641 View commit details
    Browse the repository at this point in the history
  4. AstGen: use condbr_inline if force_comptime is set

    The `finishThenElseBlock` would correctly use `break_inline`
    which would cause Sema to use `addRuntimeBreak` instead of
    doing the branch at comptime.
    Vexu committed Nov 11, 2022
    Configuration menu
    Copy the full SHA
    89e8bb4 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    cacfb0c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c446555 View commit details
    Browse the repository at this point in the history
  7. llvm: correct calculation of index of zero-bit field

    If the field comes before any non-zero-bit field then the index of
    the next field should be returned.
    
    Closes ziglang#13363
    Vexu committed Nov 11, 2022
    Configuration menu
    Copy the full SHA
    d2cc551 View commit details
    Browse the repository at this point in the history
  8. AstGen: make pointless discard error more strict

    The error should only happen as a result of `_ = <expr>` not
    for an operand of a break expression that is discarded.
    
    Closes ziglang#13212
    Vexu committed Nov 11, 2022
    Configuration menu
    Copy the full SHA
    0a18819 View commit details
    Browse the repository at this point in the history
  9. AstGen: emit dbg_stmt before (nearly) all operations that have a safe…

    …ty check
    
    All implicit casts can also potentially lead to a panic being emitted
    but adding a dbg_stmt before every instruction is not feasible.
    
    This adds 24k new instructions to the ZIR for Sema.zig increasing its
    size from 3.8MiB to 4.0MiB.
    
    Closes ziglang#13488
    Vexu committed Nov 11, 2022
    Configuration menu
    Copy the full SHA
    25c8506 View commit details
    Browse the repository at this point in the history
  10. Sema: make check for namespace lookup of private declarations more st…

    …rict
    
    Previously sema only checked that the private declaration was in the same
    file as the lookup but now it also checks that the namespace where
    the decl was included from was also in the same file.
    
    Closes ziglang#13077
    Vexu committed Nov 11, 2022
    Configuration menu
    Copy the full SHA
    9b832e7 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    40a2dfc View commit details
    Browse the repository at this point in the history
  12. Sema: check for error unwrap in condbr_inline

    The part of `condbr` that is supposed to be the same as `condbr_inline`
    already does this.
    Vexu committed Nov 11, 2022
    Configuration menu
    Copy the full SHA
    52b8efc View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    e01ec96 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    4f285d4 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    df7223c View commit details
    Browse the repository at this point in the history

Commits on Nov 12, 2022

  1. Configuration menu
    Copy the full SHA
    7733246 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d42f4ab View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a760ce5 View commit details
    Browse the repository at this point in the history
  4. llvm: check that tuple fields have runtime bits

    Just checking that they aren't comptime isn't enough for `@Type` constructed tuples.
    
    Closes ziglang#13531
    Vexu committed Nov 12, 2022
    Configuration menu
    Copy the full SHA
    87cf278 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    fbc4331 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    32b97df View commit details
    Browse the repository at this point in the history
  7. Make invalidFmtError public and use in place of compileErrors for bad…

    … format strings (ziglang#13526)
    
    * Export invalidFmtErr
    
    To allow consistent use of "invalid format string" compile error
    response for badly formatted format strings.
    
    See ziglang#13489 (comment).
    
    * Replace format compile errors with invalidFmtErr
    
    - Provides more consistent compile errors.
    - Gives user info about the type of the badly formated value.
    
    * Rename invalidFmtErr as invalidFmtError
    
    For consistency. Zig seems to use “Error” more often than “Err”.
    
    * std: add invalid format string checks to remaining custom formatters
    
    * pass reference-trace to comp when building build file; fix checkobjectstep
    nickcernis authored Nov 12, 2022
    Configuration menu
    Copy the full SHA
    8a58185 View commit details
    Browse the repository at this point in the history

Commits on Nov 13, 2022

  1. Merge pull request ziglang#13497 from Vexu/stage2-fixes

    Stage2 bug fixes
    Vexu authored Nov 13, 2022
    Configuration menu
    Copy the full SHA
    9961621 View commit details
    Browse the repository at this point in the history
  2. pthread_sigmask

    JonathanWoollett-Light authored and Vexu committed Nov 13, 2022
    Configuration menu
    Copy the full SHA
    81dadbc View commit details
    Browse the repository at this point in the history
  3. x/os/Reactor: implement remove function (ziglang#13330)

    * x/os/Reactor: implement remove function
    
    * x/os/Reactor: update tests
    nikneym authored Nov 13, 2022
    Configuration menu
    Copy the full SHA
    b2ffe11 View commit details
    Browse the repository at this point in the history
  4. Sema: remove block and src parameters from getBuiltin

    These parameters are only ever needed when `std.builtin` is out of sync
    with the compiler in which case panicking is the only valid operation
    anyways. Removing them causes a domino effect of functions no longer
    needing a `src` and/or a `block` parameter resulting in handling
    compilation errors where they are actually meaningful becoming simpler.
    Vexu authored and andrewrk committed Nov 13, 2022
    Configuration menu
    Copy the full SHA
    0184c8d View commit details
    Browse the repository at this point in the history
  5. C backend: improve ergonomics of zig.h a little bit

    Partially implements ziglang#13528. Enough to unblock the wasi-bootstrap
    branch.
    andrewrk committed Nov 13, 2022
    Configuration menu
    Copy the full SHA
    77e7d97 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    20e8c2d View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2022

  1. Merge pull request ziglang#13536 from ziglang/cbe-zig-h

    C backend: improve ergonomics of zig.h a little bit
    andrewrk authored Nov 14, 2022
    Configuration menu
    Copy the full SHA
    0b0292c View commit details
    Browse the repository at this point in the history
  2. std.crypto.ghash: fix uninitialized polynomial use (ziglang#13527)

    In the process of 'remaining blocks',
    the length of processed message can be from 1 to 79.
    The value of 'n-1' is ranged from 0 to 3.
    So, st.hx[i] must be initialized at least from st.hx[0] to st.hx[3]
    naoki9911 authored Nov 14, 2022
    Configuration menu
    Copy the full SHA
    b29057b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d823680 View commit details
    Browse the repository at this point in the history
  4. crypto.bcrypt: fix massive speed regression when using stage2 (ziglan…

    …g#13518)
    
    state: State -> state: *const State
    Suggested by @nektro
    
    Fixes ziglang#13510
    jedisct1 authored Nov 14, 2022
    Configuration menu
    Copy the full SHA
    7eed028 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    bbd0775 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    37402e4 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    27e63bb View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e14d135 View commit details
    Browse the repository at this point in the history
  9. CI: aarch64-linux: init

    andrewrk committed Nov 14, 2022
    Configuration menu
    Copy the full SHA
    5d7efa6 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    a50ad04 View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2022

  1. Configuration menu
    Copy the full SHA
    1498607 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ceb9fed View commit details
    Browse the repository at this point in the history
  3. Fix error reporting the wrong line for struct field inits (ziglang#13502

    )
    
    * point to init part of field delc when that's where the error occurs
    
    * update test to reflect fixed error message
    
    * only lookup source location in case of error
    mparadinha authored Nov 15, 2022
    Configuration menu
    Copy the full SHA
    c4f7663 View commit details
    Browse the repository at this point in the history
  4. std.build: fix typo

    This would only fail to compile when building *on* WASI.
    GethDW authored and Vexu committed Nov 15, 2022
    Configuration menu
    Copy the full SHA
    024bac7 View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2022

  1. zig-cache: support windows drive + fwd-slash paths

    mike authored and andrewrk committed Nov 16, 2022
    Configuration menu
    Copy the full SHA
    a93fa29 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1bea4f3 View commit details
    Browse the repository at this point in the history