Skip to content
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

machine: Val(x,s,Return(x)) -> s #241

Merged
merged 1 commit into from
Mar 8, 2023
Merged

Conversation

marzipankaiser
Copy link
Contributor

Currently, machine.Transformer generates an unnecessary PushFrame when given lifted code like

val x = s; return x

In particular, PolymorphismBoxing generates code of this form sometimes. Other phases might, too (someday).
This is analogous to the special case for Run(Return(...)), and avoids pushing the unnecessary stack frame.

In particular. PolymorphismBoxing generates code of this form sometimes
Other phases might, too (someday).

This is analogous to the special case for Run(Return(...)),
and avoids pushing the unnecessary stack frame.
@marzipankaiser
Copy link
Contributor Author

cc @phischu

@marzipankaiser marzipankaiser merged commit 9c7a376 into master Mar 8, 2023
@phischu phischu deleted the machine-val-return branch August 1, 2023 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant