[Webkit-unassigned] [Bug 42264] Prepare YARR JIT for matching regexps with iterative parentheses

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 14 08:20:11 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=42264





--- Comment #1 from Peter Varga <pvarga at inf.u-szeged.hu>  2010-07-14 08:20:11 PST ---
Created an attachment (id=61520)
 --> (https://bugs.webkit.org/attachment.cgi?id=61520)
proposed patch

This patch prepares JSC for the further modifications which can
solve the iterative parentheses matching problem. It doesn't change the
current results and doesn't add more features to the engine.
This patch only changes the engine's logic to avoid allocating stack in
advance.

The current solution should be avoided, because in case of iterative parentheses matching
the size of the needed stack for backtrack informations isn't known in advance, it depends
on the number of matching iterations.

I suggest a solution which stores frames on the stack in each of the
cases when backtrack information is needed. These frames are marked by a special value on
the stack which indicates what kind of information is stored in the frame.
These marks allow to allocate the stack dinamically by indicating the start
of the frames, instead of using precalculated offsets.

This solution causes more memory usage but it has possibilities for further optimizations.
The goal was to get an identical behaviour to the previous implementation.

This solution passes all the regression and fast/js layout tests.
For details of the logic I have commented the code.

NOTE: This patch is just a suggestion, not the final solution.
I don't offer this for a review now, I just would like to get some feedback before finishing the
whole work on iterative parentheses matching.

Please don't hesitate to comment!

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list