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

Remove duplicate hard coding of source and destination #1564

Closed
theunrepentantgeek opened this issue Jun 14, 2021 · 0 comments · Fixed by #1589
Closed

Remove duplicate hard coding of source and destination #1564

theunrepentantgeek opened this issue Jun 14, 2021 · 0 comments · Fixed by #1589
Assignees

Comments

@theunrepentantgeek
Copy link
Member

Describe the current behavior

At the moment, the two construction methods for PropertyAssignmentFunction are explicitly adding source and destination into KnownLocals so that those identifiers aren't reused when generating local variables inside the function bodies.

Describe the improvement

Having those variables hard coded where they are duplicates the parameter naming already present, and makes the code brittle as a change in one place would need to be replicated in the other place in order to avoid problems.

To fix this, we need to modify the function generation so that parameter names are assigned (and reserved) in the same place.

@theunrepentantgeek theunrepentantgeek added this to the codegen-alpha-0 milestone Jun 14, 2021
@theunrepentantgeek theunrepentantgeek self-assigned this Jun 14, 2021
@theunrepentantgeek theunrepentantgeek changed the title Remove hard coding of source and destination Remove duplicate hard coding of source and destination Jun 22, 2021
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 a pull request may close this issue.

1 participant