JM+TI: Add better fast path for jsop_regex now that RegExpPrivate is lazy

RESOLVED FIXED in mozilla10



8 years ago
8 years ago


(Reporter: cdleary, Assigned: cdleary)



Firefox Tracking Flags

(Not tracked)



(1 attachment, 1 obsolete attachment)

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.
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.
Attachment #567120 - Flags: review?(bhackett1024)
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.
Created attachment 567133 [details] [diff] [review]
Force private creation for clone source.

Forgotten refcount bump for mjit code.
Attachment #567120 - Attachment is obsolete: true
Attachment #567120 - Flags: review?(bhackett1024)
Attachment #567133 - Flags: review?(bhackett1024)
Attachment #567133 - Flags: review?(bhackett1024) → review+
Last Resolved: 8 years ago
Resolution: --- → FIXED


8 years ago
Duplicate of this bug: 694762
You need to log in before you can comment on or make changes to this bug.