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

YJIT: Fix autosplat miscomp for blocks with optionals #8006

Merged
merged 2 commits into from
Jul 4, 2023

Commits on Jun 30, 2023

  1. YJIT: Fix autosplat miscomp for blocks with optionals

    When passing an array as the sole argument to `yield`, and the yieldee
    takes more than 1 optional parameter, the array is expanded similar
    to `*array` splat calls. This is called "autosplat" in
    `setup_parameters_complex()`.
    
    Previously, YJIT did not detect this autosplat condition. It passed the
    array without expanding it, deviating from interpreter behavior.
    Detect this conditon and refuse to compile it.
    
    Fixes: Shopify/yjit#313
    XrXr committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    7b381d8 View commit details
    Browse the repository at this point in the history
  2. RJIT: Fix autosplat miscomp for blocks with optionals

    This is mirrors the same issue as YJIT. See previous commit.
    XrXr committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    957ea0f View commit details
    Browse the repository at this point in the history