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

Infer destination type of cast builtins using result type #16163

Merged
merged 7 commits into from
Jun 24, 2023

Commits on Jun 24, 2023

  1. compiler: remove destination type from cast builtins

    Resolves: ziglang#5909
    mlugg authored and andrewrk committed Jun 24, 2023
    Configuration menu
    Copy the full SHA
    be0c699 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    283d650 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    447ca4e View commit details
    Browse the repository at this point in the history
  4. all: migrate code to new cast builtin syntax

    Most of this migration was performed automatically with `zig fmt`. There
    were a few exceptions which I had to manually fix:
    
    * `@alignCast` and `@addrSpaceCast` cannot be automatically rewritten
    * `@truncate`'s fixup is incorrect for vectors
    * Test cases are not formatted, and their error locations change
    mlugg authored and andrewrk committed Jun 24, 2023
    Configuration menu
    Copy the full SHA
    f26dda2 View commit details
    Browse the repository at this point in the history
  5. langref: update to new cast builtin syntax

    mlugg authored and andrewrk committed Jun 24, 2023
    Configuration menu
    Copy the full SHA
    a84a895 View commit details
    Browse the repository at this point in the history
  6. cbe: codegen int_from_ptr of slice correctly

    CBE was translating to access the `len` field rather than `ptr`.
    Air.zig specifies that this operation is valid on a slice.
    mlugg authored and andrewrk committed Jun 24, 2023
    Configuration menu
    Copy the full SHA
    67997a6 View commit details
    Browse the repository at this point in the history
  7. update zig1.wasm

    Needed due to the breaking changes to casting builtins, which are used
    by the compiler when building itself.
    
    Note from Andrew: I re-ran update-zig1 on my PC and replaced this
    commit.
    
    Signed-off-by: Andrew Kelley <andrew@ziglang.org>
    mlugg authored and andrewrk committed Jun 24, 2023
    Configuration menu
    Copy the full SHA
    21ac0be View commit details
    Browse the repository at this point in the history