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

winch(x64): Add support for loop, br and br_if #6603

Merged

Commits on Jun 21, 2023

  1. winch(x64): Add support for loop, br and br_if

    This change adds support for the `loop`, `br` and `br_if` instructions
    as well as unreachable code handling. Whenever an instruction that
    affects reachability is emitted (`br` in the case of this PR), the
    compiler will enter into an unreachable code state, essentially ignoring
    most of the subsequent instructions. When handling the unreachable code
    state some instructions are still observed, in order to determine if
    reachability should be restored.
    
    This change, particulary the handling of unreachable code, adds all the
    necessary building blocks to the compiler to emit other instructions
    that affect reachability (e.g `unreachable`, `return`).
    
    Address review feedback
    
    * Rename `branch_target` to `is_branch_target`
    * Use the visitor pattern to handle unreachable code
    
    Avoid string comparison and split unreachable handling functions
    saulecabrera committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    9e00fd5 View commit details
    Browse the repository at this point in the history