Skip to content

fix: re-claim more WorkSpace in Generator - #934

Open
jodavies wants to merge 1 commit into
form-dev:masterfrom
jodavies:issue-873
Open

jodavies wants to merge 1 commit into
form-dev:masterfrom
jodavies:issue-873

Conversation

@jodavies

Copy link
Copy Markdown
Collaborator

Before calling TestSub, historically we have re-placed the WorkPointer after the active term, but only if it sits before the term's end. If it points beyond the end of the active term, that additional space is lost, leading to rapid consumption of the WorkSpace, particularly with Repeat constructions.

It seems rather sure that no active data lies beyond the term here; we are about to call TestSub, which is free to expand the size of the term if certain substitutions are made, for example. But if it turns out that a bisection leads back here, we need to investigate very carefully.

Note that following the call to TestSub, there may indeed be active data in the WorkSpace following the term: it sets AT.TMaddr and AN.Frozen. Resetting WorkPointer after the TestSub call just after this edit does actually appear to be safe, but resetting it after the TestSub call on entry to Generator is certainly wrong.

Fixes #873

Before calling TestSub, historically we have re-placed the WorkPointer after
the active term, but only if it sits before the term's end. If it points
beyond the end of the active term, that additional space is lost, leading to
rapid consumption of the WorkSpace, particularly with Repeat constructions.

It seems rather sure that no active data lies beyond the term here; we are
about to call TestSub, which is free to expand the size of the term if
certain substitutions are made, for example. But if it turns out that a
bisection leads back here, we need to investigate very carefully.

Note that following the call to TestSub, there may indeed be active data in
the WorkSpace following the term: it sets AT.TMaddr and AN.Frozen. Resetting
WorkPointer after the TestSub call just after this edit does actually appear
to be safe, but resetting it after the TestSub call on entry to Generator is
certainly wrong.

Fixes form-dev#873
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.

Single term repeat using up all Workspace

1 participant