Граф коммитов

714 Коммитов

Автор SHA1 Сообщение Дата
Andrew Halberstadt 6adcf5b456 Bug 1317970 - Use manifestparser manifests for python unit tests, r=chmanchester
This deprecates PYTHON_UNIT_TESTS and replaces it with PYTHON_UNITTEST_MANIFESTS.
In the build system, this means python unittests will be treated the same as all
other test suites that use manifestparser. New manifests called 'python.ini' have
been created for all test directories containing python unittests.

MozReview-Commit-ID: IBHG7Thif2D

--HG--
extra : rebase_source : 11a92a2bc544d067946bbd774975140147458caa
2016-11-16 09:59:22 -05:00
Nathan Froyd a9c993ccd1 Bug 1298855 - part 2 - remove prcpucfg.h #include from xpt_arena.h; r=erahm
Nothing else in this code requires prcpucfg.h at this point, and we
might as well remove nspr.h from xpt_xdr.cpp while we're at it.
2016-09-21 18:16:10 -04:00
Nathan Froyd c0268e7859 Bug 1298855 - part 1 - use EndianUtils.h in xpt_xdr.cpp; r=erahm
More obvious, slightly more efficient, and dispensing with NSPR macro
goo is always a good thing.
2016-09-21 18:16:10 -04:00
Nicholas Nethercote f1b7b1188d Bug 1297402 - Change public xpt functions to return bool instead of PRBool. r=froydnj.
--HG--
extra : rebase_source : 7517f1d9c8831e7bdf0bf0122b70496ce3348592
2016-08-25 15:59:25 +10:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Nicholas Nethercote aef07a5172 Bug 1287361 - Remove XPT_NEW. r=khuey.
--HG--
extra : rebase_source : 8e7b86713136b3872aa33ca4a9a69df441df3c38
2016-07-18 14:17:20 +10:00
Nicholas Nethercote 34313286ee Bug 1272203 (part 4) - Use NotNull for XPTCursor. r=froydnj.
This is a nice example of using NotNull for a single non-null pointer that gets
passed around lots of different functions.
2016-05-27 09:49:26 +10:00
Chris Peterson 8a9e2d2bd4 Bug 1272513 - Part 2: Remove redundant -Wshadow CXXFLAGS from moz.build files. r=glandium 2016-05-14 00:54:55 -07:00
Mike Shal 99a6e03fb1 Bug 1253431 part 2 - Use SDK_FILES instead of INSTALL_TARGETS; r=gps
MozReview-Commit-ID: K2Va7og0xw9

--HG--
extra : rebase_source : f8ae661e14c350aed7b8f66453cd6affe7498e78
2016-01-21 16:31:02 -05:00
Nicholas Nethercote d7801d8f98 Bug 1249174 (part 8) - Shrink XPTInterfaceDescriptor. r=khuey.
XPTInterfaceDescriptor::num_additional_types can easily fit in 8 bits -- in
practice it doesn't exceed 20, and there's already a check in DoTypeDescriptor
that it doesn't exceed 255. This patch shrinks it and moves that check into
XPT_InterfaceDescriptorAddTypes() so that any overflow would be detected more
reliably.

On 64-bit platforms this reduces sizeof(XPTInterfaceDescriptor) from 40 to 32
and correspondingly reduces "xpti-working-set" by 16 KiB.

The patch also changes XPT_InterfaceDescriptorAddTypes() into a local function,
because it's defined and only used in xpt_struct.cpp.

--HG--
extra : rebase_source : 754a343bd52c3db35b21a4055a94c7235a70a7a2
2016-02-23 16:17:59 +11:00
Nicholas Nethercote 2ddfe18454 Bug 1249174 (part 7.5) - Avoid wasted space around XPT strings. r=khuey.
This patch:

- Removes XPTArena's ability to support arbitrary alignments.

- Hardwires two sub-arenas into XPTArena, one with alignment of 8 and one with
  alignment of 1.

- Uses the first sub-arena for most allocations and the second sub-arena for C
  string allocations.

These changes reduce "xpti-working-set" by 56 KiB.

The patch also renames all the used of "malloc" in XPT identifiers with
"calloc", to make clearer that the result is always zeroed.

--HG--
extra : rebase_source : 8e6cc42644621a7f3c80593006734e25420c7229
2016-02-23 16:17:58 +11:00
Nicholas Nethercote 941e0d3432 Bug 1249174 (part 6) - Shrink XPTTypeDescriptor. r=khuey.
With careful layout we can reduce sizeof(XPTTypeDescriptor) from 4 to 3, which
also reduces sizeof(XPTParamDescriptor) from 6 to 4. This reduces
"xpti-working-set" by 16 KiB.

The union-of-structs also improves readability by making it clearer exactly
which fields are used for which types.

--HG--
extra : rebase_source : 08060096f93c756fda847b90b45df1b1b207e2b5
2016-02-23 16:17:44 +11:00
Nicholas Nethercote b2641c8261 Bug 1249174 (part 5) - Remove the useless BLK_HDR::size field. r=khuey.
--HG--
extra : rebase_source : 46e2dcde337f1cc25905fed5a52103c0e18403b1
2016-02-23 05:34:33 +11:00
Nicholas Nethercote 52f54b61b3 Bug 1249174 (part 4) - Don't store unused XPTHeader fields in memory. r=khuey.
This requires merging XPT_DoHeaderPrologue() and XPT_DoHeader(), which is
straightforward.

This reduces "xpti-working-set" by 16 KiB on 64-bit platforms.

--HG--
extra : rebase_source : 74510d6aefe8adc20064bee2c729d7a55fe4b58a
2016-02-23 05:33:35 +11:00
Nicholas Nethercote e9cbb90ad3 Bug 1249174 (part 3) - Don't store the unused XPTInterfaceDirectoryEntry::name_space field in memory. r=khuey.
Removing it reduces the "xpti-working-set" measurement by 16 KiB (measured on
64-bit).

--HG--
extra : rebase_source : e6d3911f96ee498a8990b702bb8fa499e55ececb
2016-02-23 05:33:35 +11:00
Nicholas Nethercote c8af98b904 Bug 1249174 (part 1) - Don't store the unused XPTTypeDescriptorTags::argnum2 field in memory. r=khuey.
XPTTypeDescriptor::argnum2 is unused. Removing it reduces
sizeof(XPTTypeDescriptor) from 6 bytes to 4 bytes, which reduces the
"xpti-working-set" measurement by 80 KiB (measured on 64-bit).

--HG--
extra : rebase_source : e89f83df810d0466b724d8307fb567e2a93a3809
2016-02-17 15:23:42 +11:00
Nicholas Nethercote e851edf114 Bug 1251458 - Reinstate annotation handling in .xpt files. r=khuey.
Even though the .xpt files we produce never have annotations, .xpt files in the
wild might have them. This partly undoes part 3 of bug 1248534.

--HG--
extra : rebase_source : c0ff4e5ea7afc66f83b1314ee1d7fe0594f9b644
2016-02-26 10:47:36 +11:00
Nicholas Nethercote 8c2c0c73a7 Bug 1251298 - Null out |*idp| when necessary in DoInterfaceDescriptor. r=khuey.
--HG--
extra : rebase_source : 6fda52a9d5fb2a72f0f5f66d096a1017f02ec7f7
2016-02-26 10:15:16 +11:00
Nicholas Nethercote 13ac3274cc Bug 1248534 (part 9) - Remove XPT arena logging code. r=khuey.
It's not useful.

--HG--
extra : rebase_source : 90cdfa37fff023adffd12327ce5c7595e0d8d285
2016-02-23 05:33:35 +11:00
Nicholas Nethercote a6ecbe4768 Bug 1248534 (part 8) - Remove useless XPT freeing code. r=khuey.
XPT has some functions and macros for freeing memory. However, they (a) are
only used on error paths, and (b) don't actually free memory -- they just
optionally log the "freeing" -- because piecewise freeing doesn't make sense
with arena allocation.

This patch removes all that unnecessary machinery.

--HG--
extra : rebase_source : 40fb8dfd3851a89aaf0501ae290b3a6ca8ac90bc
2016-02-23 05:33:35 +11:00
Nicholas Nethercote 74cc2d7704 Bug 1249174 (part 7) - Only define XPTArena::name if XPT_ARENA_LOGGING is defined. r=khuey.
--HG--
extra : rebase_source : 094100088aecba9f3198eee9550f6c41be0f1628
2016-02-23 05:33:35 +11:00
Nicholas Nethercote b1487760df Bug 1248534 (part 6) - Stack-allocate XPTState. r=khuey.
RegisterBuffer() is the only place that creates an XPTState, and it also
destroys it. So the XPTState can be allocated on the stack, which voids the
need for the creation of an XPTArena.

--HG--
extra : rebase_source : b25f0e798d72b8742efc96793a927f8a060101cf
2016-02-23 05:33:35 +11:00
Nicholas Nethercote 772b0ceb7f Bug 1248534 (part 5) - Remove XPTDatapool. r=khuey.
It can just be inlined into XPTState, which simplifies things.

--HG--
extra : rebase_source : ca8223c90dbd61521b0f24afeb13d7d3ee2a434d
2016-02-23 05:33:35 +11:00
Nicholas Nethercote 7bbc5367a4 Bug 1248534 (part 4) - Remove unused fields from XPTConstValue. r=khuey.
--HG--
extra : rebase_source : 10b5ebb8c9b80140e6abae6c55ee32424136353e
2016-02-23 05:28:13 +11:00
Nicholas Nethercote 3ae60b8b3e Bug 1248534 (part 3) - Remove almost all support for XPT annotations. r=khuey.
XPT supports annotations but xpt.py doesn't generate them except for a single
empty annotation (to indicate there are no real annotations). So we can remove
almost all support for them. This also allows XPTString to be removed.

--HG--
extra : rebase_source : 889e635e9167f31c38c015bafe943f2c577f1daf
2016-02-22 09:52:39 +11:00
Nicholas Nethercote 2735b61ff4 Bug 1248534 (part 2) - Remove unused XPT flags. r=khuey.
--HG--
extra : rebase_source : 9423560ffca6b7e50e746ab86861888695d66df2
2016-02-16 19:04:18 +11:00
Nicholas Nethercote 0e4dc7f598 Bug 1248534 (part 1) - Remove XPT encoding support. r=khuey.
Currently XPT can both encode and decode, but encoding has been handled by
Python code since bug 643817, so the encoding support can be removed. This
results in many simplifications. Some notable changes:

- All the XPTHashTable code (including XPTDatapool::offset_map) is no longer
  necessary.

- PrimitiveTest.cpp and SimpleTypeLib.cpp both don't make much sense without
  encoding support, so I removed them.

- A lot of the version code was already unused, e.g. XPT_VERSION_*,
  XPT_TYPELIB_VERSIONS_STRUCT, XPT_TYPELIB_VERSIONS.
  XPT_MAJOR_INCOMPATIBLE_VERSION is the only thing actually used in version
  checks.

- The patch also removes some code that was dead even before encoding removal,
  such as XPT_ParseVersionString().

--HG--
extra : rebase_source : 11cfe0b01efde4e2ff0c74b02b408baebedd3dd8
2016-02-16 19:02:51 +11:00
Ehsan Akhgari dd54eef6fa Bug 1240053 - Consider the order of methods, their params, and constant important when comparing XPT interfaces to decide whether to relink XPT files; r=khuey 2016-01-15 14:58:52 -05:00
Ehsan Akhgari 4f66b1c12b Bug 977464 follow-up: Fix the indentation to use 4 spaces 2016-01-15 10:40:13 -05:00
Ehsan Akhgari a859788b87 Bug 977464 - Always relink XPT files for all changed XPIDL interfaces without requiring the IID to be revved; r=khuey
Since we no longer support binary extensions, revving an interface's IID
is not necessary for binary compatibility.  However, we currently skip
relinking XPT files if a change to an interface doesn't update its IID.

This patch fixes that requirement by comparing full interfaces against
each other, so that updating an XPIDL interface without rvving its IID
works well with incremental builds.

This paves the way to remove the requirement on revving interface IIDs
when making a change to an XPIDL interface.
2016-01-14 14:40:29 -05:00
Mike Hommey 762aba02cd Bug 1221453 - Use ObjDirPaths for GENERATED_INCLUDES and merge with LOCAL_INCLUDES. r=gps 2015-11-06 09:59:21 +09:00
Chris Peterson 0dbaae1ce2 Bug 1204403 - Fix -Wshadow warnings in xpcom. r=mccr8 2015-09-07 23:56:16 -07:00
Ms2ger ce50a0bf86 Bug 1194603 - Remove INTERNAL_TOOLS; r=mshal
Its only purpose is to disable PGO. Where that was not already explicitly done,
or irrelevant (because the directory only contains python), I disabled it in
moz.build.
2015-09-10 13:49:19 +02:00
Nicholas Nethercote f44287005f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.

--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
2015-08-27 20:44:53 -07:00
doofgod aab62c0b30 Bug 1155969 - Make xpt.py flake8 compliant. r=ted 2015-05-25 19:58:00 -04:00
doofgod 95d60a3162 Bug 1155969 - Make runtests.py flake8 compliant. r=ted 2015-05-25 19:57:00 -04:00
Mike Hommey c917606f95 Bug 1043692 - Move DIST_INSTALL to moz.build. r=gps 2015-05-12 07:55:22 +09:00
Ehsan Akhgari ed554e64e3 Bug 1157212 - Teach clang-analyzer about XPT_ASSERT; r=froydnj 2015-04-22 11:40:17 -04:00
Mike Hommey c39e359c7d Bug 1138293 - Use malloc/free/realloc/calloc instead of moz_malloc/moz_free/moz_realloc/moz_calloc. r=njn
The distinction between moz_malloc/moz_free and malloc/free is not
interesting. We are inconsistent in our use of one or the other, and
I wouldn't be surprised if we are mixing them anyways.
2015-03-31 12:32:49 +09:00
Bill McCloskey a9569d4725 Bug 997325 - Implement main process scriptable only flag in XPIDL (r=mrbkap) 2015-03-26 14:39:48 -07:00
Mike Hommey 47c853314f Bug 1077148 part 4 - Add and use new moz.build templates for Gecko programs and libraries. r=gps
There are, sadly, many combinations of linkage in use throughout the tree.
The main differentiator, though, is between program/libraries related to
Gecko or not. Kind of. Some need mozglue, some don't. Some need dependent
linkage, some standalone.

Anyways, these new templates remove the need to manually define the
right dependencies against xpcomglue, nspr, mozalloc and mozglue
in most cases.

Places that build programs and were resetting MOZ_GLUE_PROGRAM_LDFLAGS
or that build libraries and were resetting MOZ_GLUE_LDFLAGS can now
just not use those Gecko-specific templates.
2014-10-30 13:06:12 +09:00
Mike Hommey 0cd72b4901 Bug 1077148 part 3 - Do not link PrimitiveTest, SimpleTypeLib, TestAUSHelper, TestAUSReadStrings and screentopng against mozglue on Linux. r=gps
There is no reason these should be linked to mozglue on Linux only. This
makes the intent clearer for the related changes in part 4.
2014-10-30 13:06:04 +09:00
Mike Hommey abd71db07c Bug 1081000 - Build xpt tests without a dependency on xul, mozalloc and mozglue. r=bsmedberg 2014-10-14 07:14:13 +09:00
Mike Hommey 0060683747 Bug 1059090 - Don't require SOURCES to be set for CPP_UNIT_TESTS and SIMPLE_PROGRAMS. r=mshal 2014-09-03 14:16:37 +09:00
Mike Hommey ed70c5f377 Bug 1041941 - Use templates for programs, simple programs, libraries and C++ unit tests. r=gps 2014-09-03 14:10:54 +09:00
Ms2ger 33f3b92033 Bug 1044657 - Move PYTHON_UNIT_TESTS to moz.build; r=mshal
As a first step, this moves PYTHON_UNIT_TESTS to moz.build as a passthru
variable. In the future, we could hook it up to |mach test|.

The __init__.py files may not need to be in the list, but I don't want to
change the list here.
2014-07-28 17:51:12 +02:00
Mike Hommey 7cab62150a Bug 1041936 part 2 - Directly use the static library "xul" to link into "xul-gtest" instead of having an intermediate library "xul" used by "xul-shared" and "xul-gtest". r=gps 2014-07-23 13:33:09 +09:00
Mike Hommey 5fab42fcaf Bug 1036894 part 8 - Move most in-tree library linkage information to moz.build, as USE_LIBS. r=gps 2014-07-23 13:30:52 +09:00
Mike Hommey bc5d6801bb Bug 1041860 - Avoid setting FINAL_LIBRARY to libraries that further use a FINAL_LIBRARY. r=mshal 2014-07-23 08:37:51 +09:00
Nathan Froyd c599444402 Bug 1031352 - move most of the _MSC_VER references in Makefile.in to moz.build; r=glandium 2014-06-27 10:32:05 -04:00