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

RESOLVED FIXED in mozilla10

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: cdleary, Assigned: cdleary)

Tracking

unspecified
mozilla10
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(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+
https://hg.mozilla.org/integration/mozilla-inbound/rev/2da44633e0bb
Target Milestone: --- → mozilla10
https://hg.mozilla.org/mozilla-central/rev/2da44633e0bb
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED

Updated

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