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

Feature: Function parameters init as variables #18

Closed
Tracked by #20
mrLSD opened this issue Nov 18, 2023 · 0 comments
Closed
Tracked by #20

Feature: Function parameters init as variables #18

mrLSD opened this issue Nov 18, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@mrLSD
Copy link
Owner

mrLSD commented Nov 18, 2023

Description

⏲️ Currently, function parameters are not interpreted as variables, and it means that Codegen should operate with that to the own choice.

mrLSD/toy-codegen explicitly shows, that it's a bit complicated, to operate with no pre-init variables, and has inner pitfalls with implementation for Codegen.

🕺 Proposal

Add function parameters as variables to BlockState, and add instructions to allocate and bind explicitly. As the solution: just use SemanticStackContext::LetBinding to fulfill SemanticStack result.

@mrLSD mrLSD self-assigned this Nov 18, 2023
@mrLSD mrLSD added the enhancement New feature or request label Nov 18, 2023
@mrLSD mrLSD added this to the v0.3.2 milestone Nov 18, 2023
@mrLSD mrLSD changed the title [Feature] Function parameters init as variables Feature: Function parameters init as variables Nov 18, 2023
@mrLSD mrLSD closed this as completed Nov 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant