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

Save/restore current subroutine locals when processing call statement #254

Merged

Conversation

richardmarshall
Copy link
Collaborator

Save local variable state / regex match at start of ProcessSubroutine and restore them when returning.

Also includes adding call count tracking of function subroutines.

Resolves #253

Copy link
Owner

@ysugimoto ysugimoto left a comment

Choose a reason for hiding this comment

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

Thanks, this is the exact behavior of subroutine.
I'm silly that I only implemented in functional subroutine https://github.com/ysugimoto/falco/pull/254/files#diff-0cea9fc2db654689e70a287bccd11b7cf7d27456e086bd803692b8678eb9780fR57-R61 😓

@ysugimoto ysugimoto merged commit ac087cb into ysugimoto:main Feb 8, 2024
1 check passed
@richardmarshall richardmarshall deleted the save_subroutine_local_vars branch February 8, 2024 15:23
ysugimoto added a commit that referenced this pull request Feb 18, 2024
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.

[BUG] local variables not saved on subroutine call
2 participants