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: Relax --yjit-verify-ctx after singleton class creation #10639

Merged
merged 1 commit into from Apr 25, 2024

Conversation

XrXr
Copy link
Member

@XrXr XrXr commented Apr 25, 2024

Types like Type::CString really only assert that at one point the object had
its class field equal to String. Once a singleton class is created for any
strings, the type makes no assertion about any class field anymore, and becomes
the same as Type::TString.

Previously, the --yjit-verify-ctx option wasn't allowing objects of these
kind that have have singleton classes to pass verification even though the code
generators handle it just fine.

Found through ruby/spec.


This stops short of changing the actual type propagation logic, which should be fine but seems scary (and hard to explain).

Types like `Type::CString` really only assert that at one point the object had
its class field equal to `String`. Once a singleton class is created for any
strings, the type makes no assertion about any class field anymore, and becomes
the same as `Type::TString`.

Previously, the `--yjit-verify-ctx` option wasn't allowing objects of these
kind that have have singleton classes to pass verification even though the code
generators handle it just fine.

Found through `ruby/spec`.
@matzbot matzbot requested a review from a team April 25, 2024 21:11
@XrXr XrXr enabled auto-merge (rebase) April 25, 2024 21:46
@XrXr XrXr merged commit 9b5bc8e into ruby:master Apr 25, 2024
101 checks passed
@XrXr XrXr deleted the yjit-relax-verification branch April 25, 2024 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants