Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Move the call of the checkArgsMismatch function before the call of th… #8242

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Zhdanov0
Copy link
Contributor

@Zhdanov0 Zhdanov0 commented Sep 5, 2024

…e setParamsFunc function

Why checkArgsMismatch is executed after the setParamsFunc function and not before it? I think it is more logical to make the checkArgsMismatch check at the place where I put it in the PR. This location is more advantageous because there will be no need to do extra work in the form of calling the setParamsFunc function and other things if you know in advance that the number of arguments is incorrect.

Also, thanks to this location, we don't need to add the “if (argsCount > 1)” check to the setParamsMakeDbKey function, which saves us from unnecessary branching. If you are happy with this solution, I can remove these checks in the existing setParams functions.

I doubt about removing the checkArgsMismatch function call in SysFuncCallNode::pass2.
I haven't found what it might affect and don't understand why it was there.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant