Consider sharing RegExpShared across compartments

RESOLVED FIXED in Firefox 56

Status

()

RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: jandem, Assigned: jandem)

Tracking

unspecified
mozilla56
Points:
---

Firefox Tracking Flags

(firefox56 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
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.
(Assignee)

Comment 1

2 years ago
Posted 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+

Comment 3

2 years ago
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a47b92874b2b
Share RegExpShareds across compartments within a zone. r=jonco

Comment 4

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/a47b92874b2b
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox56: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.