-
Notifications
You must be signed in to change notification settings - Fork 5.4k
ZJIT: Support get/set on global variables #13569
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
Conversation
0d653a5
to
ab673a2
Compare
❌ Tests Failed✖️no tests failed ✔️61908 tests passed(1 flake) |
Please change PR title/commit to "ZJIT: ..." |
Great stuff. Thank you |
Adds support for code like: ```ruby $foo $foo = x ```
ab673a2
to
eea8145
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both C calls are not leaf and we'll need to do something about it later, but it's good as is for now.
Can you say more? What do you mean? |
During a non-leaf C call, it may dispatch a method that looks at the caller's Binding, for example. Because we don't spill locals onto the interpreter stack before the C call here, we need to either (1) spill them before each non-leaf call or (2) lazily move them from the C stack to the interpreter stack when you need to create a Binding. We'll start from (1) and then optimize it into (2). I'm working on (1) right now, so it's helpful to leave it as is. |
I guess this is a case where we could hit a tracepoint or warning too. 😢 |
Adds support for code like: