Closed Bug 1629670 Opened 4 years ago Closed 4 years ago

Irregexp: Compile regexps

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: iain, Assigned: iain)

References

Details

Attachments

(2 files)

Bug 1628835 added support for interpreting regexps. This bug adds support for compiling them to native code.

The current ForceByteCodeEnum is a glorified boolean. This patch replaces it with a three-value bytecode/jitcode/either enum, which will make our tiering-up logic slightly nicer in the next patch.

The interpreter calls TierUpTick whenever we interpret a regexp. Once we hit the tick threshold, compileIfNecessary will compile native code for the regexp.

Currently the tick threshold is hard-coded to 10. V8's tick threshold is 1, which seems unreasonably low. We can tune this later.

Depends on D70951

Pushed by iireland@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6de75c45c46c
Change ForceByteCode to CodeKind r=mgaudet
https://hg.mozilla.org/integration/autoland/rev/e3c3f27d586a
Tier up to compiled regexps r=mgaudet

Backed out for crashes at [@ js::RegExpRunStatus js::irregexp::InterpretCode<unsigned char>(JSContext*, unsigned char const*, unsigned char const*, unsigned long, unsigned long, js::MatchPairs*, unsigned long*)]

backout: https://hg.mozilla.org/integration/autoland/rev/0be816646b65bef89a1fa981be7d18d51a24a396

See https://bugzilla.mozilla.org/show_bug.cgi?id=1628835#c6

Pushed by iireland@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a05f70d2f0cb
Change ForceByteCode to CodeKind r=mgaudet
https://hg.mozilla.org/integration/autoland/rev/65eade01c8c9
Tier up to compiled regexps r=mgaudet
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: