gecko-dev/config
Andrew McCreight 27f44d82d0 Bug 1438688, part 6 - Compile XPT information to C++ at build time. r=glandium,njn
This patch handles the actual generation of the static data structures
used to represent XPT information. XPT files are generated in the same
way as they are now, but they are used only as an intermediate
representation to speed up incremental compilation rather than
something used by Firefox itself. Instead of linking XPTs into a
single big XPT file at packaging time, they are linked into a single
big C++ file at build time, that defines the various static consts in
XPTHeader.

In xpt.py, every data structure that can get written to disk gets an
additional code_gen() method that returns a representation of that
data structure as C++ source code. CodeGenData aggregates this
information together, handling deduplication and the final source code
generation.

The ctors are needed for XPTConstValue to statically initialize the
different union cases without resorting to designated initializers,
which are part of C99, not C++. Designated initializers appear to be
supported in C++ code by Clang and GCC, but not MSVC. The ctors must
be constexpr to ensure they are actually statically initialized so
they can be shared between Firefox processes.

I also removed an unnecessary "union" in XPTConstDescriptor.

Together, these patches reduce the amount of memory reported by
xpti-working-set from about 860,000 bytes to about 200,000 bytes. The
remaining memory is used for xptiInterface and xptiTypelibGuts (which
are thin wrappers around the XPT interfaces and header) and hash
tables to speed up looking up interfaces by name or IID. That could
potentially be eliminated from dynamic allocations in follow up
work. These patches did not affect memory reporting because XPT arenas
are still used by the remaining XPTI data structures.

MozReview-Commit-ID: Jvi9ByCPa6H

--HG--
extra : rebase_source : a9e48e7026aab4ad1b7f97e50424adf4e3f4142f
2018-03-12 10:30:35 -07:00
..
Moz
external Bug 1449574: Update tzdata in ICU data files to 2018d. r=Waldo 2018-03-29 10:02:57 -07:00
faster Bug 1438688, part 3 - Remove XPT files from the packaging process. r=glandium 2018-03-05 14:27:29 -08:00
makefiles Bug 1438688, part 6 - Compile XPT information to C++ at build time. r=glandium,njn 2018-03-12 10:30:35 -07:00
mozunit Bug 1438250 - Make mozunit pip installable; r=ahal 2018-03-29 14:18:00 +01:00
tests Bug 1429875 - Remove expandlibs and instead generate list files in the mozbuild backend. r=glandium 2018-03-20 16:31:05 -07:00
AB_rCD.mk Bug 1439742 - Pre: Lift AB_rCD to ambient Make environment. r=ted.mielczarek 2018-02-20 12:28:21 -08:00
Makefile.in Bug 1407432 - Move system wrapper generation to moz.build; r=froydnj 2017-11-08 19:58:56 -05:00
MozZipFile.py
android-common.mk
autoconf-js.mk.in
autoconf.mk.in
baseconfig.mk Bug 445128 - Stop putting the version number in the target directory for make install. r=nalexander 2017-12-31 17:18:52 +09:00
check_js_msg_encoding.py Bug 1393242 - Use hglib for get_files_in_working_directory(); r=mshal 2017-08-23 15:21:16 -07:00
check_js_opcode.py
check_macroassembler_style.py Bug 1434430 - [flake8] Fix blank 'except' statements r=rwood 2018-01-31 14:32:08 -05:00
check_source_count.py
check_spidermonkey_style.py Bug 1445592 - Generate Ion LOpcodes.h and MOpcodes.h instead of updating them manually. r=nbp,froydnj 2018-03-14 18:58:52 +01:00
check_vanilla_allocations.py Bug 1432298 - Make sm-fuzzing build ready for libfuzzer. r=sfink 2018-01-22 21:23:47 +01:00
config.mk Bug 1429875 - Implement OBJ_SUFFIX overriding for the profile generation phase on linux in mozbuild. r=glandium 2018-03-20 16:44:12 -07:00
createprecomplete.py
emptyvars-js.mk.in
emptyvars.mk.in
find_OOM_errors.py
gcc-stl-wrapper.template.h Bug 1423512 - Remove infallible allocator exception for xpcom glue code. r=erahm 2017-12-06 09:56:02 +09:00
gcc_hidden.h
install.bat
make-stl-wrappers.py Backed out 6 changesets (bug 1407432) on (wild) suspicion of causing failures in browser_sanitize-timespans.js, somehow 2017-11-09 22:07:46 -08:00
make-system-wrappers.py Bug 1407432 - Move system wrapper generation to moz.build; r=froydnj 2017-11-08 19:58:56 -05:00
milestone.txt Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2018-03-12 13:20:48 +00:00
moz.build Bug 1438250 - Make mozunit pip installable; r=ahal 2018-03-29 14:18:00 +01:00
msvc-stl-wrapper.template.h Bug 1423512 - Remove infallible allocator exception for xpcom glue code. r=erahm 2017-12-06 09:56:02 +09:00
nsinstall.c
nsinstall.py
pathsub.c Bug 1422852 - remove D_INO setting from configure; r=chmanchester 2017-12-04 08:18:00 -05:00
pathsub.h
printconfigsetting.py
printprereleasesuffix.py
pythonpath.py
rebuild_check.py
recurse.mk Bug 1448378: Fix build and symbols on Windows ASan. r=froydnj 2018-03-26 17:07:30 -04:00
rules.mk Bug 1448378: Fix build and symbols on Windows ASan. r=froydnj 2018-03-26 17:07:30 -04:00
static-checking-config.mk Bug 1403346 - Implement clang-plugin cxxflags in moz.build. r=glandium 2017-10-25 15:12:10 -07:00
stl-headers.mozbuild Backed out 6 changesets (bug 1407432) on (wild) suspicion of causing failures in browser_sanitize-timespans.js, somehow 2017-11-09 22:07:46 -08:00
system-headers.mozbuild Bug 1428182 - 6b. Support unified headers in Breakpad code; r=ted 2018-01-30 14:08:23 -05:00
version.mk Bug 1427365 - Support spaces in the Windows version resource product name/description. r=gps 2018-01-04 13:50:56 -08:00
version_win.pl