-
Notifications
You must be signed in to change notification settings - Fork 140
[Compiler] Test optional arguments #3997
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
Cadence Benchstat comparisonThis branch with compared with the base branch onflow:feature/compiler commit 39e93d7 Collapsed results for better readability
|
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.
Nice!
So I guess because we already provide the argument-count in the invoke instructions, we don't have to do anything specific?
Co-authored-by: Supun Setunga <[email protected]>
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.
Nice! Great to see this already works for function invocations.
We also have built-in methods that have optional/variable arguments, like e.g. the Account.Contract.add
method (
Line 64 in 163d49a
Account_ContractsTypeAddFunctionType.Arity = &Arity{Min: 2} |
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.
Great work! 👏
Co-authored-by: Bastian Müller <[email protected]>
Closes #3996
Description
Renames
Transfer
instruction toTransferAndConvert
and introduces a newTransfer
instruction which only callsTransfer
on the value. This is necessary for optional arguments in method invocation where the parameter type is unknown.master
branchFiles changed
in the Github PR explorer