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

fix: fix symbol checking and creation for subst with a regexp #906

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

terencehonles
Copy link
Contributor

@terencehonles terencehonles commented Aug 5, 2024

This change updates the checkRegex helper to not track symbols for a regexp when it is used by the builtin subst. In this case the VM will not store these matches, and therefore these symbols will not be available to the program. The compiler will, however, compile these regexp and add them to the regexp table for use by the VM, and multiple calls to subst are already handled by the VM.

fixes: #693, fixes: #810

This change updates the ``checkRegex`` helper to not track symbols for a
regexp when it is used by the builtin ``subst``. In this case the VM
will not store these matches, and therefore these symbols will not be
available to the program. The compiler will, however, compile these
regexp and add them to the regexp table for use by the VM, and multiple
calls to ``subst`` are already handled by the VM.

fixes: google#693, google#810
@terencehonles terencehonles force-pushed the fix-multiple-subst-regexp-calls branch from bae620f to c7ba9c4 Compare August 8, 2024 09:44
@terencehonles terencehonles changed the title fix: allow multiple calls to subst with a regexp fix: fix symbol checking and creation for subst with a regexp Aug 8, 2024
@jaqx0r jaqx0r enabled auto-merge August 8, 2024 22:11
@jaqx0r jaqx0r added this pull request to the merge queue Aug 8, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 57.57%. Comparing base (06d5ac8) to head (c7ba9c4).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #906      +/-   ##
==========================================
+ Coverage   57.52%   57.57%   +0.04%     
==========================================
  Files          68       68              
  Lines        6908     6915       +7     
==========================================
+ Hits         3974     3981       +7     
  Misses       2669     2669              
  Partials      265      265              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Merged via the queue into google:main with commit 246e5ca Aug 8, 2024
23 checks passed
@terencehonles terencehonles deleted the fix-multiple-subst-regexp-calls branch August 9, 2024 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants