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
Rework framing for super and __callee__ #7098
Open
headius
wants to merge
7
commits into
jruby:jruby-9.3
Choose a base branch
from
headius:frame_callee_experiment
base: jruby-9.3
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Module methods have a dynamic hierarchy, but do not have a dynamic super target name. This eliminates part of the frame requirement for super within a module method, on the way to getting __callee__ working.
headius
force-pushed
the
frame_callee_experiment
branch
from
February 16, 2022 17:49
a760016
to
3e18abe
Compare
The changes here attempt to get more super calls using a static name, so we can eliminate dependency on a call frame to get that name. * super in a block in any method will start out as a ModuleSuper using the name from the method. * define_method clones and rewrites the block to retarget any super calls to the newly defined name. * all super instructions get rewritten to the appropriate type for the target class, instance/class/module Remaining cases that use UnresolvedSuper may only be the ones where super is invalid, such as a block at top-level or within a class or module body.
headius
force-pushed
the
frame_callee_experiment
branch
from
February 16, 2022 23:40
3e18abe
to
cb27869
Compare
startup is simpler time to do this and also the define_method opto will not work if the AST is consumed which is what happens if you full compile.
* Alter scope class to be the target class, so it will be used as the base class when doing InstanceSuper. This fixes the last remaining failure in specs. * Also consider and rewrite super in nested closures. This fixes the last remaining failure in CRuby tests.
I think fixing
|
Yeah we've been kicking around a shorter-term option that would allow us to fix |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a series of commits to make super less dynamic (or exactly as dynamic as it needs to be) in order for us to support the
__callee__
method which does need to be dynamic.