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:
1. 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, because `irregexp/RegExpShim.h` will always come after `irregexp/imported/*`. Instead, we just keep scanning until we find a newline.
2. 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 stub `regexp-macro-assembler-arch.h` header in `imported` 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
Differential Revision: https://phabricator.services.mozilla.com/D77731
An explanation of the Mozilla Source Code Directory Structure and links to
project pages with documentation can be found at:
https://firefox-source-docs.mozilla.org/contributing/directory_structure.html
For information on how to build Mozilla from the source code and create the patch see:
https://firefox-source-docs.mozilla.org/contributing/how_to_contribute_firefox.html
If you have a question about developing Mozilla, and can't find the solution
on https://developer.mozilla.org, you can try asking your question on Matrix at chat.mozilla.org in `Introduction` (https://chat.mozilla.org/#/room/#introduction:mozilla.org) channel.
Nightly development builds can be downloaded from:
https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/
- or -
https://www.mozilla.org/firefox/channel/desktop/#nightly
Keep in mind that nightly builds, which are used by Mozilla developers for
testing, may be buggy.