...
To resolve this issue, instead of the PState
containing a stack of Boolean's representing the discriminators, it will be modified to instead maintain a stack of Marks
. When a point of uncertainty is found, we push the associated Mark
onto this stack. When a discrimiantor evaluates to true, we discard this Mark. clear this Mark. Note that clearing the Mark
is distinct from discarding the Mark
. This clear frees up associated data associated with the Mark
(e.g. decreases the refcounter so the InfosetWalker
could continue, clear's DataInputStream marks so buckets may be freed), but does not actually discard the Mark
. Upon unwinding, the parser determines that create the Mark
determines if the point of uncertainty was resolved by determining checking if the associated Mark
was discardedcleared, and then it can discard the Mark
are return it to the MarkPool
.
With this change, we can discard Marks
as clear Mark
state as soon as points of uncertainty are resolved and allow for the InfosetWalker to make progress in creating events.
...