Irregexp: Tidy up loose ends
Categories
(Core :: JavaScript Engine, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox79 | --- | fixed |
People
(Reporter: iain, Assigned: iain)
References
Details
Attachments
(9 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 | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
Now that the new engine has landed and made it into 78, we don't need the old engine any more, and we can clean up a variety of small things.
Assignee | ||
Comment 1•4 years ago
|
||
I wrote this testcase while fixing an issue with upstream V8's handling of non-unicode ignoreCase RegExps. (See here: https://github.com/v8/v8/commit/3fab9d05cf34a7f0bc0e9405729ab8b78c0671ac)
I'm finally getting around to landing it.
(There will be another patch in the future to fix an equivalent issue with back-references, but it's waiting on upstream review.)
Assignee | ||
Comment 2•4 years ago
|
||
I wrote this testcase while trying to figure out the spec for named captures, and discovered that V8 was not handling it properly. Our implementation does the right thing here, so I'm landing this testcase to make sure it stays that way.
Depends on D77725
Assignee | ||
Comment 3•4 years ago
|
||
This code no longer sparks joy.
Depends on D77726
Assignee | ||
Comment 4•4 years ago
|
||
I kept a running list of code that would be dead once we removed the old engine. This is what was on that list.
Note: The regexp_parse tests used a testing function that parsed a regexp and returned an AST to compare against the expected AST. They are being deleted because the tests are fragile in the face of upstream changes, not particularly useful, and a lot of work to convert.
Depends on D77727
Assignee | ||
Comment 5•4 years ago
|
||
It's not new-
any more.
This patch moves the files, replaces new-regexp
with irregexp
throughout the code, re-alphabetizes #include
s, and adds a few missing #include
s to RegExpTypes.h
and util/vector.h
that were exposed by the reordering.
Depends on D77728
Assignee | ||
Comment 6•4 years ago
|
||
This is the only place where any code outside the irregexp
directory directly includes a V8 header. Tidying it up makes the next patch easier.
Depends on D77729
Assignee | ||
Comment 7•4 years ago
|
||
I've been thinking about doing this for a while, and finally got around to doing it.
This patch moves the files that are directly imported from V8 into their own subdirectory of irregexp
, to make it more obvious which code is part of V8 and which code is part of the shim. I also took the opportunity to rename the shim files to follow our naming conventions (FileName.cpp) instead of V8's (file-name.cc).
Most of this code is mechanical. The mildly interesting parts are:
-
In
import-irregexp.py
, when figuring out where the regexp shim include should go, we no longer have to work quite as hard to alphabetize it, becauseirregexp/RegExpShim.h
will always come afterirregexp/imported/*
. Instead, we just keep scanning until we find a newline. -
Some of the V8 code #includes "regexp-macro-assembler-arch.h". Up until now, that's the name we used for the header file for our RegExpMacroAssembler implementation. Now that the implementation lives in a separate directory from the V8 code, I've renamed the header to
RegExpNativeMacroAssembler.h
(to match the .cpp file), and added a stubregexp-macro-assembler-arch.h
header inimported
that #includes the real thing.
In the next patch, we take advantage of the new directory structure to get more precise with clang-format-ignore.
Depends on D77730
Assignee | ||
Comment 8•4 years ago
|
||
Now this code is less of a weird outlier.
Depends on D77731
Assignee | ||
Comment 9•4 years ago
|
||
The code that was previously in new-regexp
has been moved into irregexp
, and the code in irregexp
has been deleted. Update the license file accordingly.
Depends on D77732
Updated•4 years ago
|
Comment 10•4 years ago
|
||
Comment 11•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/792796a61455
https://hg.mozilla.org/mozilla-central/rev/3e8cda5dd726
https://hg.mozilla.org/mozilla-central/rev/4436d60dd86a
https://hg.mozilla.org/mozilla-central/rev/5bdd0c3c33ef
https://hg.mozilla.org/mozilla-central/rev/737f8abf8315
https://hg.mozilla.org/mozilla-central/rev/3626007f27aa
https://hg.mozilla.org/mozilla-central/rev/7aa7ba13b1bd
https://hg.mozilla.org/mozilla-central/rev/8134bf0eafd7
Comment 12•4 years ago
|
||
Comment 13•4 years ago
|
||
bugherder |
Description
•