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: foreach should not break init backtracking with DUPN #3266

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kanwren
Copy link

@kanwren kanwren commented Feb 17, 2025

Simplifies the compilation of foreach to avoid the problem in #3227 by removing unnecessary FORK ... BACKTRACK. Adds a simple regression test to check that the init clause is allowed to backtrack.

Does not address reduce, which is less trivial, and may require changes to the instruction set or other tradeoffs.

@kanwren kanwren force-pushed the kanwren/foreach-dupn branch from e88fb0c to 9e11573 Compare February 17, 2025 21:55
Simplifies the compilation of `foreach` to avoid the problem in jqlang#3227 by
removing unnecessary `FORK ... BACKTRACK`.

Does not address `reduce`, which is less trivial.
@kanwren kanwren force-pushed the kanwren/foreach-dupn branch from 9e11573 to def2639 Compare February 17, 2025 22:03
@itchyny itchyny added the bug label Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants