Closed Bug 694527 Opened 13 years ago Closed 13 years ago

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

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla10

People

(Reporter: cdleary, Assigned: cdleary)

References

Details

Attachments

(1 file, 1 obsolete file)

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.
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.
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/mozilla-central/rev/2da44633e0bb
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: