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

Parser: support 'alloc' vars #168

Merged
merged 4 commits into from
Nov 5, 2024
Merged

Parser: support 'alloc' vars #168

merged 4 commits into from
Nov 5, 2024

Conversation

ejrgilbert
Copy link
Owner

@ejrgilbert ejrgilbert commented Nov 5, 2024

Fixes: #135

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 added the enhancement New feature or request label Nov 5, 2024
@ejrgilbert ejrgilbert changed the title Create skeleton to plan for 'alloc' var logic Support 'alloc' vars Nov 5, 2024
@ejrgilbert ejrgilbert changed the title Support 'alloc' vars Parser: support 'alloc' vars Nov 5, 2024
@ejrgilbert ejrgilbert merged commit 0e5a32c into master Nov 5, 2024
2 checks passed
@ejrgilbert ejrgilbert deleted the feature/alloc_vars branch November 5, 2024 22:04
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

Successfully merging this pull request may close these issues.

Support unshared vars
1 participant