cf. bug 1710755, touching idl files regenerates xptdata.cpp and
xptdata.h, and the latter currently triggers tons of things to be
rebuilt because xptdata.h is included from xptinfo.h, which is directly
or indirectly included in many other places.
But there's only one thing defined in xptdata.h: nsXPTInterface, and
there's actually only one place that actively uses it:
StaticComponents.cpp.in, via a function defined in xptinfo.h.
Using a forward declaration in xptinfo.h allows to only include
xptdata.h from StaticComponents.cpp.in.
While here, add an include guard to xptdata.h.
Differential Revision: https://phabricator.services.mozilla.com/D115329
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
ARM has a common calling standard for all operating systems running on
ARM64, and Apple platforms almost follow it, except for a few rules which
aren't relative to xptcall, plus one significant exception: arguments
spilled to the stack only occupy the space they need to. So in the common
calling standard, a `uint16_t` would occupy eight bytes when it is passed on
the stack, whereas on Apple platforms, it only occupies two bytes.
Original patch by @froydnj.
Differential Revision: https://phabricator.services.mozilla.com/D87007
Through some sleight-of-hand, we can treat argument allocation in aarch64's
xptcinvoke exactly the same for integer and floating-point arguments. This
change isn't so important now, but it centralizes the allocation of stack
slots, which is important for making this code handle Apple's calling
conventions.
Depends on D87005
Differential Revision: https://phabricator.services.mozilla.com/D87006
These files will all compile, but things will break at runtime because the
convention for stack arguments is slightly different on Darwin. We'll fix
that in the next patch or two.
Depends on D87004
Differential Revision: https://phabricator.services.mozilla.com/D87005
These have been cargo-culted all over the place and they are totally
unnecessary, not to mention potentially confusing. Let's delete them.
Differential Revision: https://phabricator.services.mozilla.com/D86978
We now use `PARAM_BUFFER_COUNT` for slightly more stuff, so update the
comment describing its two uses. Experimentation has also shown that we can
decrease the count slightly, which is a tiny tiny win.
Differential Revision: https://phabricator.services.mozilla.com/D86214
Now that we've statically ensured everything fits into the stack-allocated
array(s), we can delete the case that handled dynamic allocation.
Differential Revision: https://phabricator.services.mozilla.com/D86213
We used to not be able to do something like this, and therefore our xpidl
calling code had to be fully general. But now that we know all possible
xpidl methods at build time, we can ensure that the number of parameters
does not exceed some bound. And we choose that bound to be the maximum
number of stack-allocated parameters our calling code supports.
Differential Revision: https://phabricator.services.mozilla.com/D86212
There's no reason to have a different count depending on whether we have
floating-point registers or not; xpidl functions will have the same number
of parameters regardless. This change also synchronizes soft-float PPC with
every other architecture.
Differential Revision: https://phabricator.services.mozilla.com/D86210
This makes it much simpler for the for the static JS services cache to store
and lookup interface IDs for components.
Differential Revision: https://phabricator.services.mozilla.com/D81416
This makes it much simpler for the for the static JS services cache to store
and lookup interface IDs for components.
Differential Revision: https://phabricator.services.mozilla.com/D81416
In Python 3, iteration order over the contents of a native `dict` is always unpredictable, which results in bugs like bug 1635755 where `xptdata.cpp` has irreproducible content. To avoid this, we be sure to always write out JSON in a fixed, deterministic order.
Differential Revision: https://phabricator.services.mozilla.com/D74443
Also adds missing includes in some files, these were previously only transivitely
included through mozilla/TypeTraits.h.
Differential Revision: https://phabricator.services.mozilla.com/D68561
--HG--
extra : moz-landing-system : lando
Specifically, this renames
* nsTArray_CopyChooser to nsTArray_RelocationStrategy
* the Copy template argument of nsTArray_base to RelocationStrategy
* nsTArray_CopyWithConstructors to nsTArray_RelocateUsingMoveConstructor
* nsTArray_CopyWithMemutils to nsTArray_RelocateUsingMemutils
* DECLARE_USE_COPY_CONSTRUCTORS to MOZ_DECLARE_RELOCATE_USING_MOVE_CONSTRUCTOR
Differential Revision: https://phabricator.services.mozilla.com/D66243
--HG--
extra : moz-landing-system : lando
GENERATED_FILES now defaults to python3 unless py2=True is specified as
an argument. All existing GENERATED_FILES scripts and GeneratedFile
templates have the py2=True attribute added, so this patch should
effectively be a no-op.
Going forward, individual scripts can be converted to python3 and their
corresponding py2=True attribute can be deleted. In effect, this patch
will be backed out in pieces until all scripts run in python3, at which
point the py2 attribute itself can be removed.
Differential Revision: https://phabricator.services.mozilla.com/D60919
--HG--
extra : moz-landing-system : lando
GENERATED_FILES now defaults to python3 unless py2=True is specified as
an argument. All existing GENERATED_FILES scripts and GeneratedFile
templates have the py2=True attribute added, so this patch should
effectively be a no-op.
Going forward, individual scripts can be converted to python3 and their
corresponding py2=True attribute can be deleted. In effect, this patch
will be backed out in pieces until all scripts run in python3, at which
point the py2 attribute itself can be removed.
Differential Revision: https://phabricator.services.mozilla.com/D60919
--HG--
extra : moz-landing-system : lando
GENERATED_FILES now defaults to python3 unless py2=True is specified as
an argument. All existing GENERATED_FILES scripts and GeneratedFile
templates have the py2=True attribute added, so this patch should
effectively be a no-op.
Going forward, individual scripts can be converted to python3 and their
corresponding py2=True attribute can be deleted. In effect, this patch
will be backed out in pieces until all scripts run in python3, at which
point the py2 attribute itself can be removed.
Differential Revision: https://phabricator.services.mozilla.com/D60919
--HG--
extra : moz-landing-system : lando
This removes various unused `#include "nsAutoPtr.h"` in `xpcom/`. Additionally
adds a few includes to the media stack.
Differential Revision: https://phabricator.services.mozilla.com/D58282
--HG--
extra : moz-landing-system : lando
Fix handling of ABI arguments in xptcinvoke for PPC64 platforms. Previously, non-floating-point arguments would advance the index of which floating-point register to use. This cleans up both of the platform-specific invoke and stubs to be better aligned to the x86_64 model.
Differential Revision: https://phabricator.services.mozilla.com/D46421
--HG--
extra : moz-landing-system : lando
This contains two changes. One is to zero out the top 56 bits for a bool
conversion so we can pass bools correctly from cpp -> js. This was also
needed in Bug 821628, 1513725
The other change copies the fix in Bug 689288 where we cast a float value
as a double.
Differential Revision: https://phabricator.services.mozilla.com/D40686
--HG--
extra : moz-landing-system : lando