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

Support alloc vars #169

Merged
merged 6 commits into from
Nov 6, 2024
Merged

Support alloc vars #169

merged 6 commits into from
Nov 6, 2024

Conversation

ejrgilbert
Copy link
Owner

@ejrgilbert ejrgilbert commented Nov 5, 2024

Parser:

  • Extend parser to support new alloc keyword
  • Test that alloc, alloc report, report alloc all work correctly

Rewriting:

  • Logic to allocate the alloc variables as globals as emitting a probe at a match site
  • Logic to handle report alloc variables (make a new lang_features/report_vars.rs to put this in one place)

Wizard:

  • Logic to create the $alloc function for alloc variables that reserves memory
  • Logic to load all alloc variables at the start of a probe's body
  • Logic to save all alloc variables at the end of a probe's body
  • Logic to handle report alloc variables

Test:

  • (wizard) variables that are only alloc
  • (wizard) variables that are only report
  • (wizard) variables that are both report AND alloc
  • (rewriting) variables that are only alloc
  • (rewriting) variables that are only report
  • (rewriting) variables that are both report AND alloc

@ejrgilbert ejrgilbert merged commit a81bff8 into master Nov 6, 2024
2 checks passed
@ejrgilbert ejrgilbert deleted the feature/alloc_vars branch November 6, 2024 00:31
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.

1 participant