Skip to content

Do not check call_arguments twice through parsing function call in statement #4346

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

Merged
merged 1 commit into from
Dec 1, 2020
Merged

Conversation

lsahn-gh
Copy link
Contributor

@lsahn-gh lsahn-gh commented Nov 25, 2020

Checking call_arguments twice happens in a special case that
only if call_arguments <= 1 and opcode variable has CBC_EXT_SUPER_CALL.

--unittests and --jerry-tests are done.

@zherczeg
Copy link
Member

What is the exact optimization here? if the previous statement ends with break/continue/return/etc. the else should have no effect

Copy link
Member

@zherczeg zherczeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lsahn-gh lsahn-gh changed the title Optimize needless 'if' arms through parsing function call in statement Do not check call_arguments twice through parsing function call in statement Nov 27, 2020
…atement

Checking call_arguments twice happens in a special case that
only if call_arguments <= 1 and opcode variable has CBC_EXT_SUPER_CALL.

JerryScript-DCO-1.0-Signed-off-by: Leesoo Ahn lsahn@ooseel.net
Copy link
Member

@rerobika rerobika left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rerobika rerobika merged commit 290e845 into jerryscript-project:master Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants