Various RegExp/Irregexp cleanups
Categories
(Core :: JavaScript Engine, task, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox82 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
Details
Attachments
(8 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 |
Umbrella issue for various small clean-ups in RegExp/Irregexp code:
- Update "make_unicode.py" to work under Python 3.7.
- Remove no longer needed code from "make_unicode.py".
- Remove effectively dead code in RegExp code.
- Avoid unnecessary rooting in RegExp named capturing code.
- ...
| Assignee | ||
Comment 1•5 years ago
|
||
next() throws StopIteration when the iterator has been exhausted. Before
PEP 479, throwing StopIteration implicitly closes a generator and is not
propagated to the caller. After PEP 479, the StopIteration error is propagated
to the caller.
| Assignee | ||
Comment 2•5 years ago
|
||
These macros were used by the local irregexp copy to implement Unicode RegExps.
They have been replaced by calls to ICU.
Depends on D88789
| Assignee | ||
Comment 3•5 years ago
|
||
The files generated by these functions were already removed.
Depends on D88790
| Assignee | ||
Comment 4•5 years ago
|
||
The skip out-param is only read when InterpretDollar returns true, so we
can remove both assignments which are followed by return false.
Drive-by change:
- Move another assignment to
skipto appear directly beforereturn true, so
it's more obvious thatskiponly needs to be set on success. - Add a blank line before a comment, per our normal style guides.
Depends on D88791
| Assignee | ||
Comment 5•5 years ago
|
||
Remove unnecessary rooting and move a rooting variable outside of a loop. Sadly
we still don't have static analysis to catch this (bug 1362038).
Drive-by change:
- Add more blank lines before comments.
Depends on D88792
| Assignee | ||
Comment 6•5 years ago
|
||
These two loops can be simplified to use ranged for-loops, reducing a bit of
boilerplate code.
Depends on D88793
| Assignee | ||
Comment 7•5 years ago
|
||
It seems nice to also assert the array length is divisible by two, given that
the array is created entirely elsewhere.
Depends on D88794
| Assignee | ||
Comment 8•5 years ago
|
||
Add a getShared accessor to RegExpObject to retrieve a previously assigned
RegExpShared object. And then replace two calls to the fallible
RegExpObject::getShared() method with the new accessor. This way we can
avoid calling a fallible method whose return value is ignored.
Depends on D88795
Updated•5 years ago
|
Comment 10•5 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/d77322fe8d1b
https://hg.mozilla.org/mozilla-central/rev/d69b33dc4238
https://hg.mozilla.org/mozilla-central/rev/9b07e4b58ce1
https://hg.mozilla.org/mozilla-central/rev/747a630e409c
https://hg.mozilla.org/mozilla-central/rev/de9376528044
https://hg.mozilla.org/mozilla-central/rev/2fc5e4134cf1
https://hg.mozilla.org/mozilla-central/rev/7d6facecd556
https://hg.mozilla.org/mozilla-central/rev/c5bdc46e971b
Description
•