Last Comment Bug 694527 - JM+TI: Add better fast path for jsop_regex now that RegExpPrivate is lazy
: JM+TI: Add better fast path for jsop_regex now that RegExpPrivate is lazy
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla10
Assigned To: Chris Leary [:cdleary] (not checking bugmail)
:
Mentors:
: 694762 (view as bug list)
Depends on: 673188
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-14 03:40 PDT by Chris Leary [:cdleary] (not checking bugmail)
Modified: 2011-10-15 09:55 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Force private creation for clone source. (6.20 KB, patch)
2011-10-14 09:48 PDT, Chris Leary [:cdleary] (not checking bugmail)
no flags Details | Diff | Splinter Review
Force private creation for clone source. (6.36 KB, patch)
2011-10-14 10:32 PDT, Chris Leary [:cdleary] (not checking bugmail)
bhackett1024: review+
Details | Diff | Splinter Review

Description Chris Leary [:cdleary] (not checking bugmail) 2011-10-14 03:40:30 PDT
Since RegExpPrivates are lazy and purged on every GC, I removed the eager propagation of the RegExpPrivate from the script's RegExpObject in methodjitted jsop_regexp in bug 673188. What we probably want now is to:

- Eagerly initialize the |RegExpPrivate| for the script's RegExpObject at methodjit compile time
- Test whether the RegExpPrivate slot is null
- If so, exit to stub, which will create it on the script's RegExpObject (for reuse later) and then clone it as normal
- Otherwise, incref as we were doing before

Should be a tiny patch, but I didn't want to try to fix it for the former commit so that we'd have a patch per bug.
Comment 1 Chris Leary [:cdleary] (not checking bugmail) 2011-10-14 09:48:27 PDT
Created attachment 567120 [details] [diff] [review]
Force private creation for clone source.

We need the JSOP_REGEXP op to create sharing of the RegExpPrivate. If the script's RegExpObject has a NULL RegExpPrivate no such sharing will occur.
Comment 2 Chris Leary [:cdleary] (not checking bugmail) 2011-10-14 09:51:42 PDT
Also, like I was indicating in the bug description, with the purging added in bug 634654 we'll want to branch to the stub if the original has a null RegExpPrivate so that we can recreate and subsequently share it.
Comment 3 Chris Leary [:cdleary] (not checking bugmail) 2011-10-14 10:32:31 PDT
Created attachment 567133 [details] [diff] [review]
Force private creation for clone source.

Forgotten refcount bump for mjit code.
Comment 4 Chris Leary [:cdleary] (not checking bugmail) 2011-10-14 10:59:39 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/2da44633e0bb
Comment 5 Ed Morley [:emorley] 2011-10-15 05:33:22 PDT
https://hg.mozilla.org/mozilla-central/rev/2da44633e0bb
Comment 6 Alice0775 White 2011-10-15 07:47:27 PDT
*** Bug 694762 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.