mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
154fd9c9ad
In bug 1423803, mozilla::fallible was made an "alias" of std::nothrow. Except C++ doesn't allow compilers to be too smart, and in many cases, they would actually create data fields to hold a copy of std::nothrow, even creating a static initializer on non-optimized builds to do so. By turning it into a reference, we allow compilers to just use std::nothrow directly, as if it were passed directly, but they can still create unused data fields. Turning it into a static allows compilers to skip the data fields altogether. On a local linux64 build, this saves 242 bytes of .bss. Note this does change a `lea` (address calculation) into a `mov` (read), but it shouldn't matter too much. --HG-- extra : rebase_source : 9c08e8263aef267b8ad5962b0248c7effcb67796 |
||
---|---|---|
.. | ||
fallible.cpp | ||
fallible.h | ||
moz.build |