-
Notifications
You must be signed in to change notification settings - Fork 746
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
SCLang: Too many args passed to certain 'inlined' methods #6302
Open
JordanHendersonMusic
wants to merge
1
commit into
supercollider:develop
Choose a base branch
from
JordanHendersonMusic:topic/fix-too-many-args-pushed
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
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
SCLang: Too many args passed to certain 'inlined' methods #6302
JordanHendersonMusic
wants to merge
1
commit into
supercollider:develop
from
JordanHendersonMusic:topic/fix-too-many-args-pushed
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
JordanHendersonMusic
added
the
comp: sclang
sclang C++ implementation (primitives, etc.). for changes to class lib use "comp: class library"
label
May 9, 2024
JordanHendersonMusic
force-pushed
the
topic/fix-too-many-args-pushed
branch
2 times, most recently
from
May 9, 2024 18:40
ffe7f32
to
a89bea0
Compare
telephon
reviewed
May 10, 2024
JordanHendersonMusic
force-pushed
the
topic/fix-too-many-args-pushed
branch
from
May 10, 2024 09:44
a89bea0
to
067af08
Compare
JordanHendersonMusic
force-pushed
the
topic/fix-too-many-args-pushed
branch
from
May 28, 2024 10:27
067af08
to
0612176
Compare
This comment was marked as resolved.
This comment was marked as resolved.
JordanHendersonMusic
force-pushed
the
topic/fix-too-many-args-pushed
branch
2 times, most recently
from
June 3, 2024 11:54
7f69699
to
e316e9c
Compare
4 tasks
telephon
reviewed
Jun 6, 2024
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.
Perhaps you could add a test that checks that correct ellipsis argument passing (still) works, too:
TestCorrectArgCountObj {
var <a, <b, <c;
*new {|...a| ^super.newCopyArgs(a) }
}
should make a == [\a, \b, \c]
and b = c = nil
.
And
TestCorrectArgCountObj {
var <a, <b, <c;
*new {|...a| ^super.newCopyArgs(*a) }
}
should make a = \a, b = \b, c = \c
as expected.
When the compile/parser see a method with only a single call, or a call to `super.something`, it 'inlines' it. For these methods, all the users arguments were being passed through, regardless of how many were declared in the function signature. This commit checks this, and removes any excess args from the stack. Closes supercollider#1087
JordanHendersonMusic
force-pushed
the
topic/fix-too-many-args-pushed
branch
from
June 8, 2024 13:07
e316e9c
to
b76c0f0
Compare
@telephon all done. |
Bump @telephon |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
comp: sclang
sclang C++ implementation (primitives, etc.). for changes to class lib use "comp: class library"
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.
Purpose and Motivation
When the compile/parser see a method with only a single call, or a call to
super.something
, it 'inlines' it.For these methods, all the user's arguments were being passed through, regardless of how many were declared in the function signature.
This commit checks this, and removes any excess args from the stack.
Fixes #1087
Here is some code to demonstrate the error, before this commit,
b
andc
would be set.Types of changes
This should not break any code, and if it does, that code is wrong.
To-do list