Update irregexp to new version
Categories
(Core :: JavaScript Engine, enhancement, P3)
Tracking
()
People
(Reporter: update-bot, Assigned: iain)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [3pl-filed][task_id: KpKWeAMORi6FNtZV8BolHQ])
Attachments
(9 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
This update covers 3526 commits, including 112 new upstream commits I've never filed a bug on before. (They're the top 112.). Here are the overall diff statistics.
js/src/irregexp/imported/gen-regexp-special-case.cc | 48 ---
js/src/irregexp/imported/regexp-ast.cc | 17 +-
js/src/irregexp/imported/regexp-ast.h | 23 +-
js/src/irregexp/imported/regexp-bytecode-generator.cc | 2 +-
js/src/irregexp/imported/regexp-bytecode-peephole.cc | 4 +-
js/src/irregexp/imported/regexp-compiler-tonode.cc | 86 +++--
js/src/irregexp/imported/regexp-compiler.cc | 43 ++-
js/src/irregexp/imported/regexp-compiler.h | 8 +-
js/src/irregexp/imported/regexp-dotprinter.cc | 4 +
js/src/irregexp/imported/regexp-interpreter.cc | 84 ++--
js/src/irregexp/imported/regexp-interpreter.h | 13 +-
js/src/irregexp/imported/regexp-macro-assembler.cc | 70 ++--
js/src/irregexp/imported/regexp-macro-assembler.h | 23 +-
js/src/irregexp/imported/regexp-nodes.h | 18 +-
js/src/irregexp/imported/regexp-parser.cc | 287 +++++++++++------
js/src/irregexp/imported/regexp.h | 12 +-
js/src/irregexp/imported/special-case.h | 10 -
js/src/irregexp/moz.yaml | 4 +-
18 files changed, 417 insertions(+), 339 deletions(-)
Reporter | ||
Comment 2•7 months ago
|
||
KpKWeAMORi6FNtZV8BolHQ |
I've submitted a try run for this commit: https://treeherder.mozilla.org/jobs?repo=try&revision=6521f00fc41d9d02c140c2bda198653522c5eaa4
Reporter | ||
Comment 3•7 months ago
|
||
Updated•7 months ago
|
Reporter | ||
Comment 5•7 months ago
|
||
V12zr_ShQXGIBQkK1q2tAw |
All jobs completed, we found the following issues.
Known Issues (From Taskcluster):
- spidermonkey-sm-asan-linux64/opt (PsFtIrWrTJul21qalkfUag) - new failure not classified
- spidermonkey-sm-tsan-linux64/opt (Pi9gYabgR5iM3_kw6wtHTw) - new failure not classified
- spidermonkey-sm-temporal-linux64/debug (SlgOWmnmR-mHcCMV3NDTPQ) - new failure not classified
- spidermonkey-sm-fuzzilli-linux64/debug (T_7PHwBNRCCLbFH9HilYOA) - new failure not classified
- spidermonkey-sm-nojit-linux64/opt (W8KjzTGaQ4OKWT9KiOFuXQ) - new failure not classified
- spidermonkey-sm-nonunified-linux64/debug (VTQXn59lRrqonXVql3IGPg) - new failure not classified
- spidermonkey-sm-linux64-wasi-pbl/opt (YXIePf9ESOClTLc6Tnt4Kw) - new failure not classified
- spidermonkey-sm-plain-linux64/debug (ahkNh0MfScuIuvLCQ3jo6A) - new failure not classified
- hazard-linux64-shell-haz/debug (Wrio3qsGR5uMGp2VU7qZKw) - new failure not classified
- spidermonkey-sm-plain-linux32/debug (Ze2HDv-MQ7yShpKZDUSaHQ) - new failure not classified
- spidermonkey-sm-linux64-wasi/opt (bl_Tm-FjSa2yhjOOmLPSlQ) - new failure not classified
- spidermonkey-sm-wasm-no-experimental-linux64/debug (d7ugXHtOSriBhT-lYckHlA) - new failure not classified
- spidermonkey-sm-compacting-linux64/debug (dfVBSEGOTOCP0xE_Dhpnag) - new failure not classified
- spidermonkey-sm-rt-linux64/debug (eb7pAE_YQZ6rxGyOQPhhPg) - new failure not classified
- spidermonkey-sm-rootanalysis-linux64/debug (ECIHJqqyQdKGUScx7-cGtg) - new failure not classified
- spidermonkey-sm-arm64-sim-linux64/debug (eOHrJpn0RFOmMIm5etpbqA) - new failure not classified
- spidermonkey-sm-fuzzing-linux64/opt (GCN5q7VeTX6iLbfLDwIAtw) - new failure not classified
- spidermonkey-sm-gdb-linux64/debug (GgQKqOh8QXKyZUlKakVAyA) - new failure not classified
- spidermonkey-sm-package-linux64/opt (IcjySo8MRGON1o9ApPW06A) - new failure not classified
- spidermonkey-sm-pbl-linux64/opt (Id5xl_V4SqKwFf-vxi8E-Q) - new failure not classified
- spidermonkey-sm-arm-sim-linux32/debug (JcFr-CruTPiO_8yMDnspJQ) - new failure not classified
- spidermonkey-sm-linux64-wasi-intl/opt (NhUL54VMRy6th0OREeyjmA) - new failure not classified
- spidermonkey-sm-plain-linux64/opt (KVYRnlawQmWMpr_7BHiC7g) - new failure not classified
These failures may mean that the library update succeeded; you'll need to review
them yourself and decide. If there are lint failures, you will need to fix them in
a follow-up patch. (Or ignore the patch I made, and recreate it yourself with
./mach vendor js/src/irregexp/moz.yaml
.)
In either event, I have done all I can, so you will need to take it from here.
When reviewing, please note that this is external code, which needs a full and
careful inspection - not a rubberstamp.
Assignee | ||
Comment 6•7 months ago
|
||
This flag gates the V8 implementation of this stage 3 proposal: https://github.com/tc39/proposal-regexp-modifiers
I've left it turned off for now. We can expose it in a separate bug.
Updated•7 months ago
|
Assignee | ||
Comment 7•7 months ago
|
||
V8 started doing more things using RegExpFlags as part of supporting regexp modifiers.
Assignee | ||
Comment 8•7 months ago
|
||
As part of this bug in which they move object definitions back from Torque to C++, V8 added a Tagged<T> wrapper, which stores a pointer that is low-bit tagged (V8's values are either a 0-tagged small integer or a 1-tagged pointer).
We don't have the same object representation, so we just need a transparent wrapper.
Assignee | ||
Comment 9•7 months ago
|
||
In this commit, V8 changed its IsFoo predicates from methods into free functions as part of the Tagged<T> work.
At first I was simply going to move the current implementation, but as I was writing a comment to explain why bool IsByteArray(Object obj) { return true; }
was not as dumb as it looked, I decided that we could do better.
V8's ByteArrays are managed by the GC, and the typecheck can be done by looking at the map (shape). Our implementation of ByteArray is a length-prefixed array allocated by malloc, so we can't check the type the same way, but in debug builds we can stick a magic number in the header and validate that it hasn't been messed with.
We can use a dedicated MagicValue for the exception we throw when interrupting (which maps closely to V8's approach).
Assignee | ||
Comment 10•7 months ago
|
||
This is an auto-generated file in V8 that changes very rarely (see https://bugzilla.mozilla.org/show_bug.cgi?id=1624015#c3). I copied this version over from a local build of V8.
Assignee | ||
Comment 11•7 months ago
|
||
V8 refactored ByteArray as part of this bug: https://bugs.chromium.org/p/v8/issues/detail?id=14345.
Assignee | ||
Comment 12•7 months ago
|
||
The RegExpCompiler stores the flags internally, so there isn't any need to pass them in here. Upstream V8 fixed the API.
Assignee | ||
Comment 13•7 months ago
|
||
This is necessary because of an awkward bit of code here in regexp-nodes.h that uses a struct initializer to create a RegExpFlags. C++ initializers do not do type conversions, so if we initialize RegExpFlags with an int, then the member field of RegExpFlags must also be an int. V8's RegExpFlags is backed by an int, but we use a uint8_t.
I based the clang/gcc flags on the #pragmas here.
Updated•7 months ago
|
Reporter | ||
Updated•7 months ago
|
Updated•7 months ago
|
Updated•7 months ago
|
Comment 16•7 months ago
|
||
Question about update bot: Iain, do you feel it's worthwhile to have Update bot run on the irregexp changes, or should we look into getting that turned off to reduce the noise for you?
Assignee | ||
Comment 17•7 months ago
|
||
I appreciate having updatebot around. I don't always (ever?) land non-trivial changes immediately, but updatebot cleans up after itself if I ignore it, so there's no backlog building up. I'm already watching the entire JS component, so it's not a significant increase in my bugmail.
Comment 18•6 months ago
|
||
Pushed by iireland@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1b309a9c237b Update irregexp to ec89cca93594ef6ae683d6608904cd5e30378115 r=dminor https://hg.mozilla.org/integration/autoland/rev/6a96960cbfb0 Add stub JitOption for regexp modifiers r=dminor https://hg.mozilla.org/integration/autoland/rev/9db3b5ee9eb1 Add more irregexp support to RegExpFlags r=dminor https://hg.mozilla.org/integration/autoland/rev/4e39e690f2b8 Add Tagged wrapper r=dminor https://hg.mozilla.org/integration/autoland/rev/8efe813ab556 Refactor IsFoo methods r=dminor https://hg.mozilla.org/integration/autoland/rev/a0e12e764dab Update special-case.cc r=dminor https://hg.mozilla.org/integration/autoland/rev/e06159bc2d35 Rename ByteArray::GetDataStartAddress to ByteArray::begin r=dminor https://hg.mozilla.org/integration/autoland/rev/85a16b24ff70 Remove obsolete argument r=dminor https://hg.mozilla.org/integration/autoland/rev/589758807f24 Disable narrowing warning for irregexp r=dminor
Comment 19•6 months ago
•
|
||
Backed out for bustages on regexp-nodes.h
Backout link: https://hg.mozilla.org/integration/autoland/rev/2e6f9604cc356e96fe89ec8f7670830b07f30104
Log link: https://treeherder.mozilla.org/logviewer?job_id=448828603&repo=autoland&lineNumber=32478
Please also check this SM bustage
Assignee | ||
Comment 20•6 months ago
|
||
I disabled the narrowing warning for gcc and clang, but not clang-cl, which we use on Windows. Fixing and relanding.
Comment 21•6 months ago
|
||
Pushed by iireland@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fb35e3dc4f11 Update irregexp to ec89cca93594ef6ae683d6608904cd5e30378115 r=dminor https://hg.mozilla.org/integration/autoland/rev/cc4dfb967ba7 Add stub JitOption for regexp modifiers r=dminor https://hg.mozilla.org/integration/autoland/rev/aee1020e5dab Add more irregexp support to RegExpFlags r=dminor https://hg.mozilla.org/integration/autoland/rev/2c09b27de401 Add Tagged wrapper r=dminor https://hg.mozilla.org/integration/autoland/rev/02cbfa48ac5e Refactor IsFoo methods r=dminor https://hg.mozilla.org/integration/autoland/rev/3a403f55d5b9 Update special-case.cc r=dminor https://hg.mozilla.org/integration/autoland/rev/bd893ce35a99 Rename ByteArray::GetDataStartAddress to ByteArray::begin r=dminor https://hg.mozilla.org/integration/autoland/rev/d521718e5c3e Remove obsolete argument r=dminor https://hg.mozilla.org/integration/autoland/rev/a55d20473169 Disable narrowing warning for irregexp r=dminor
Comment 22•6 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/fb35e3dc4f11
https://hg.mozilla.org/mozilla-central/rev/cc4dfb967ba7
https://hg.mozilla.org/mozilla-central/rev/aee1020e5dab
https://hg.mozilla.org/mozilla-central/rev/2c09b27de401
https://hg.mozilla.org/mozilla-central/rev/02cbfa48ac5e
https://hg.mozilla.org/mozilla-central/rev/3a403f55d5b9
https://hg.mozilla.org/mozilla-central/rev/bd893ce35a99
https://hg.mozilla.org/mozilla-central/rev/d521718e5c3e
https://hg.mozilla.org/mozilla-central/rev/a55d20473169
Updated•6 months ago
|
Description
•