-
Notifications
You must be signed in to change notification settings - Fork 589
Use new subsignature API in class.c #23527
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
base: blead
Are you sure you want to change the base?
Conversation
…SET integers rather than premade OP_ARGELEM ops
…aram handling for accessor methods
…d, for use after OP_MULTIPARAM
@@ -33,7 +33,7 @@ no warnings 'experimental::class'; | |||
# Read accessor does not permit arguments | |||
ok(!eval { $o->s("value") }, | |||
'Reader accessor fails with argument'); | |||
like($@, qr/^Too many arguments for subroutine \'Testcase1::s\' \(got 1; expected 0\) at /, | |||
like($@, qr/^Too many arguments for subroutine \'Testcase1::s\' \(got 2; expected 1\) at /, |
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.
Would the changes in this test not require a perldelta entry as they're a change in user-visible behaviour? I presume the extra plus one on each count is it now counts the implicit self in each count?
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.
Oooh, that is a fair point, yes. I should probably mention it. It's not likely to be very user-impacting, but it is technically visible.
msvc143 smoker failed in |
Turns out while writing the perldelta for this, I tested something I thought should work only it doesn't. Seems there's a bunch more work to do first - I'll draft this for now until it's ready. |
Towards the end of the 5.41.x development cycle I added a bunch of
subsignature_*()
API functions, for the parser to use to create subroutine signatures in an abstracted way. This will hide the inner details of how the optree is constructed, allowing future work (such as no-snails, or named parameters) to be done much easier. During that cycle I didn't quite get around to updating all the callsites; in particular,class.c
did not yet use this new API.This series of commits updates
class.c
to use this new API when creating subroutine signatures for its own generated method subs. Once this is done, it will be easier to update the way that signatures are performed internally.I don't believe this needs a perldelta entry as it is just inner details of how
class.c
constructs subroutine CVs.