Irregexp: Add JitOptions
Categories
(Core :: JavaScript Engine, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: iain, Assigned: iain)
References
Details
Attachments
(6 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
For testing purposes, we want to be able to control when/whether we tier up from interpreted to compiled regexps.
Also, irregexp relies on a bunch of global FLAG_*
variables for the equivalent of JitOptions. Many of them should just be hardcoded to a specific value, but some of them (particularly the tracing options) are worth hooking up.
Assignee | ||
Comment 1•4 years ago
|
||
To ensure that we get adequate test coverage of compiled regexps without having to add a new testing configuration, I've set it up so that --baseline-eager
and --ion-eager
imply --regexp-warmup-threshold=0
.
The threshold of 10 continues to be arbitrary. We can do performance tuning later.
Assignee | ||
Comment 2•4 years ago
|
||
If unaligned loads are allowed, then we can load multiple characters at once and speed up some comparisons.
The implementation of CanReadUnaligned is taken from the old import (NativeRegExpMacroAssembler::CanReadUnaligned).
Depends on D71634
Assignee | ||
Comment 3•4 years ago
|
||
V8 has a correctness_fuzzer_suppressions
flag that it uses for differential fuzzing. Our equivalent is JS_MORE_DETERMINISTIC.
The code being added to HasOverflowed is taken from RegExpCompiler::CheckOverRecursed in the old import. See bug 1455954.
Depends on D71635
Assignee | ||
Comment 4•4 years ago
|
||
V8's equivalent to JitOptions is a macro for defining global variables. The shim defines the subset of those variables that are used inside irregexp. We don't have any good reason to modify most of them, so this patch turns them into constants and documents the reasons we aren't exposing them.
The tracing flags will be hooked up in the next patch.
Depends on D71636
Assignee | ||
Comment 5•4 years ago
|
||
V8 comes with a number of tracing options built-in. We might as well make them available for debugging in the shell.
--regexp-trace-assembler
doesn't do anything yet. Support will be added in the next patch.
Depends on D71637
Assignee | ||
Comment 6•4 years ago
|
||
Regexp assembler tracing is done using a wrapper that logs the macroassembler API calls.
Depends on D71638
Pushed by iireland@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f2e2d758a0ed Add a jit option to control the regexp warmup threshold r=mgaudet https://hg.mozilla.org/integration/autoland/rev/0a1e9d5bef6d Implement CanReadUnaligned r=mgaudet https://hg.mozilla.org/integration/autoland/rev/1e3e2417a0a2 Improve over-recursion in more-deterministic builds r=mgaudet https://hg.mozilla.org/integration/autoland/rev/1db8625a629c Hard-code and document some flag values r=mgaudet https://hg.mozilla.org/integration/autoland/rev/9d77534b5152 Add tracing options r=mgaudet https://hg.mozilla.org/integration/autoland/rev/342710b2598d Implement trace-regexp-assembler r=mgaudet
Comment 8•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f2e2d758a0ed
https://hg.mozilla.org/mozilla-central/rev/0a1e9d5bef6d
https://hg.mozilla.org/mozilla-central/rev/1e3e2417a0a2
https://hg.mozilla.org/mozilla-central/rev/1db8625a629c
https://hg.mozilla.org/mozilla-central/rev/9d77534b5152
https://hg.mozilla.org/mozilla-central/rev/342710b2598d
Description
•