Closed Bug 1378740 Opened 7 years ago Closed 7 years ago

Consider sharing RegExpShared across compartments

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(1 file)

It's now a per-compartment table but it seems we could make it per-Zone. Then compartments within a zone can share RegExpShareds and regexp JIT code.
Attached patch PatchSplinter Review
This patch splits RegExpCompartment into RegExpZone (containing the RegExpShared table) and RegExpCompartment (just some template objects).

Still waiting for Try results but things work fine in the shell.
Attachment #8883930 - Flags: review?(jcoppeard)
Comment on attachment 8883930 [details] [diff] [review]
Patch

Review of attachment 8883930 [details] [diff] [review]:
-----------------------------------------------------------------

Looks great, r=me assuming try is green.

::: js/src/vm/RegExpShared.h
@@ +266,5 @@
> +    }
> +
> +    bool init();
> +
> +    bool empty() { return set_.empty(); }

nit: could make this const.
Attachment #8883930 - Flags: review?(jcoppeard) → review+
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a47b92874b2b
Share RegExpShareds across compartments within a zone. r=jonco
https://hg.mozilla.org/mozilla-central/rev/a47b92874b2b
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: