This was done by:
This was done by applying:
```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
from subprocess import Popen, PIPE, check_output, CalledProcessError
diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
- args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+ args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']
if not output_file:
args.append("-i")
```
Then running `./mach clang-format -c <commit-hash>`
Then undoing that patch.
Then running check_spidermonkey_style.py --fixup
Then running `./mach clang-format`
I had to fix four things:
* I needed to move <utility> back down in GuardObjects.h because I was hitting
obscure problems with our system include wrappers like this:
0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94 MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94 ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)
Which I really didn't feel like digging into.
* I had to restore the order of TrustOverrideUtils.h and related files in nss
because the .inc files depend on TrustOverrideUtils.h being included earlier.
* I had to add a missing include to RollingNumber.h
* Also had to partially restore include order in JsepSessionImpl.cpp to avoid
some -WError issues due to some static inline functions being defined in a
header but not used in the rest of the compilation unit.
Differential Revision: https://phabricator.services.mozilla.com/D60327
--HG--
extra : moz-landing-system : lando
rg -l 'mozilla/Move.h' | xargs sed -i 's/#include "mozilla\/Move.h"/#include <utility>/g'
Further manual fixups and cleanups to the include order incoming.
Differential Revision: https://phabricator.services.mozilla.com/D60323
--HG--
extra : moz-landing-system : lando
Now mfbt/Move.h is empty except for that excellent comment about move
semantics... Should we put it somewhere else and delete the header as a
follow-up? Or just delete the header and carry on?
Differential Revision: https://phabricator.services.mozilla.com/D60297
--HG--
extra : moz-landing-system : lando
By cleaning up the register set APIs very slightly we can simplify the wrappers and
make space for meaningful assertions.
Differential Revision: https://phabricator.services.mozilla.com/D59673
--HG--
extra : moz-landing-system : lando
Create a clearer distinction between the register's Encoding, which is
its hardware name, and its Code, which is a dense encoding of
bitwidth+Encoding along with a distinguished Invalid value. These
concepts exist already but it gets out of hand when the FloatRegister
uses a Code to encode the Encoding.
Make FloatRegister contain separate fields for bitwidth, encoding, and
validity, as it does on other platforms.
Add assertions on validity of inputs and on the validity of the
FloatRegister for some operations. And tidy up some, and rearrange
the file to mirror the x86 file as much as possible.
Expand the register name table so that it covers the possible range of
Code and so that we won't reference the table OOB.
Differential Revision: https://phabricator.services.mozilla.com/D59912
--HG--
extra : moz-landing-system : lando
By cleaning up the register set APIs very slightly we can simplify the wrappers and
make space for meaningful assertions.
Differential Revision: https://phabricator.services.mozilla.com/D59673
--HG--
extra : moz-landing-system : lando
Create a clearer distinction between the register's Encoding, which is
its hardware name, and its Code, which is a dense encoding of
bitwidth+Encoding along with a distinguished Invalid value. These
concepts exist already but it gets out of hand when the FloatRegister
uses a Code to encode the Encoding.
Make FloatRegister contain separate fields for bitwidth, encoding, and
validity, as it does on other platforms.
Add assertions on validity of inputs and on the validity of the
FloatRegister for some operations. And tidy up some, and rearrange
the file to mirror the x86 file as much as possible.
Expand the register name table so that it covers the possible range of
Code and so that we won't reference the table OOB.
Differential Revision: https://phabricator.services.mozilla.com/D59912
--HG--
extra : moz-landing-system : lando
If a script is trying to disable a compiler and that is the last compiler enabled, then throw.
Differential Revision: https://phabricator.services.mozilla.com/D60165
--HG--
extra : moz-landing-system : lando
Done with:
./mach static-analysis check --checks="-*, modernize-concat-nested-namespaces" --fix .
and then clang-format on the files
Differential Revision: https://phabricator.services.mozilla.com/D58217
--HG--
extra : moz-landing-system : lando
Done with:
./mach static-analysis check --checks="-*, modernize-concat-nested-namespaces" --fix .
and then clang-format on the files
Differential Revision: https://phabricator.services.mozilla.com/D58217
--HG--
extra : moz-landing-system : lando
This used to be required in case we released arenas here but since bug 1552118 we don't need this.
Differential Revision: https://phabricator.services.mozilla.com/D60033
--HG--
extra : moz-landing-system : lando
When we compile WebAssembly with Ion, we might get multiple return values from function calls. However the way that Wasm calls are modelled in Ion right now makes it impossible to have multiple register results.
This patch separates the SSA definition of result values from the calls. In WasmIonCompile.cpp, this allows us to collect results into a vector, making them available as inputs to further WebAssembly instructions.
Differential Revision: https://phabricator.services.mozilla.com/D59340
--HG--
extra : moz-landing-system : lando
Since bug 1603373 we no longer store magic types in HeapTypeSets. This broke an
Ion optimization because it uses constraints to guard a property does not exist
on the global lexical environment. This patch explicitly fires the constraint
when defining an uninitialized global lexical.
I was unable to write a test for this that doesn't require --ion-eager.
Differential Revision: https://phabricator.services.mozilla.com/D58910
--HG--
extra : moz-landing-system : lando
These are mochitests because there's currently no way to trigger a GC from WPT. I tried to do this with xpcshell tests but I couldn't get the pref to enable weak refs to work.
Differential Revision: https://phabricator.services.mozilla.com/D59375
--HG--
extra : moz-landing-system : lando
It doesn't make sense to queue callbacks at this point because they will never run, and without this we get leaks at shutdown. I also refactored GCRuntime::sweepFinalizationGroups a little.
Differential Revision: https://phabricator.services.mozilla.com/D59897
--HG--
extra : moz-landing-system : lando
This also removes the `name` field from FOR_EACH_OPCODE. Disassembly now uses
the UpperCamelCase opcode name.
A few tests look at disassembler output.
Differential Revision: https://phabricator.services.mozilla.com/D59809
--HG--
extra : moz-landing-system : lando