When adding a pointer to WasmInstance::memCopy, it appears that we ran out of
GPRs for calling and the pointer needed to be passed via stack.
GenerateBuiltinThunk uses ABIFunctionType/ABIArgType, and converts it to
MIRType for calling StackCopy [1]. ArgType_General is treated as being equal to
MIRType::Int32, leading to only half of the pointer being passed correctly on
64bit window systems.
This means that all instance functions currently have an incorrect
ABIFunctionType but avoid this issue because they don't have enough parameters
or don't have a 64bit value that is passed by the stack.
We have to use ABIFunctionType here for compatibility with the ARM/ARM64
simulators, otherwise it would be convenient to use a different representation.
This commit:
1. Adds an ArgType_Pointer which is equivalent to MIRType::Pointer
2. Adds a helper constexpr for defining ABIFunctionType
3. Fixes the ABIFunctionType used for instance calls
4. Fixes the simulators to recognize the new ABIFunctionType's
5. Adds an assertion that the SymbolicAddressSignature and ABIFunctionType
are compatible.
Differential Revision: https://phabricator.services.mozilla.com/D51330
--HG--
extra : moz-landing-system : lando
This commit uses the previous commits to actually optimize the OOL
implementations.
This is done by:
* Passing the heap base pointer to each builtin
* Acquiring the WasmArrayRawBuffer/SharedArrayRawBuffer from this pointer
- This is trivial as they are embedded a fixed offset before the Wasm heap
* Acquiring the heap length from the raw buffer
By doing this, we avoid cache misses from accessing:
TLSData -> Instance -> WasmMemoryObject -> ArrayBufferObject -> WasmArrayRawBuffer
This is enough to get close enough to parity with V8 for small sizes. Further
improvements should be done with an inline generated code path.
Differential Revision: https://phabricator.services.mozilla.com/D50378
--HG--
extra : moz-landing-system : lando
Currently the Wasm memory length for non-shared memory is stored in a slot of
the ArrayBuffer. This commit tracks it in the WasmArrayRawBuffer as well, for
use in a future commit.
Differential Revision: https://phabricator.services.mozilla.com/D50377
--HG--
extra : moz-landing-system : lando
This commit declares WasmArrayRawBuffer in the ArrayBufferObject header. This
will allow WasmInstance to access the buffer in a future commit.
Differential Revision: https://phabricator.services.mozilla.com/D50376
--HG--
extra : moz-landing-system : lando
Whether a module uses shared memory or not is fixed throughout its lifetime. We
can use this to specialize the implementation of memCopy/memFill and remove a
branch on the memory type. This will also be useful when acquiring the memory
length in a future commit, which will require different code per shared-ness.
Differential Revision: https://phabricator.services.mozilla.com/D50375
--HG--
extra : moz-landing-system : lando
This commit drops the requirement to acquire the shared memory lock when we
are only acquiring the length. The length_ field is changed to be an
Atomic<SeqCst> in the process. We still need to acquire the lock when growing
the memory in order to atomically compute the new length and commit the new
pages.
Differential Revision: https://phabricator.services.mozilla.com/D50374
--HG--
extra : moz-landing-system : lando
Spec compliance requires us to check the element type of the
TypedArray at the same time as we check it's a shared TypedArray, not
later. This results in some tests being done twice, but only for the
slow C++ path.
Differential Revision: https://phabricator.services.mozilla.com/D50158
--HG--
extra : moz-landing-system : lando
MANUAL PUSH: Needed on central to populate the index for a non-gecko release expected today.
Differential Revision: https://phabricator.services.mozilla.com/D51309
--HG--
extra : rebase_source : 02ca5e6033c7708c2cc462f2ef76c3ec661ed20f
extra : amend_source : 4169f1357dbf29de60fcb80c2a46aee5c867a29a
The emulator's implementation of glShaderSource can crash if the source string
are not null-terminated, even though we correctly pass the lengths of the
strings. Work around this by adding a null terminator when running on the
emulator.
Depends on D51293
Differential Revision: https://phabricator.services.mozilla.com/D51294
--HG--
extra : moz-landing-system : lando
A bug in the android emulator means that glTexImage3D thinks the maximum texture
size is the value of GL_MAX_TEXTURE_SIZE, rather than the value returned by
glGetIntegerv(GL_MAX_TEXTURE_SIZE). This means that calls to glTexImage3D fail
when width, height, or depth > 3379.
This forces us to use glTexStorage3D instead of glTexImage3D, avoiding
this bug. This relies upon swizzling, which is indeed supported on the
android emulator.
Differential Revision: https://phabricator.services.mozilla.com/D51293
--HG--
extra : moz-landing-system : lando
The new state is entered when the task starts executing on a helper thread. This is so we can tell the difference between tasks we have dispatched and those that have actually started running.
Differential Revision: https://phabricator.services.mozilla.com/D51103
--HG--
extra : moz-landing-system : lando
The current coreaudio-sys in gecko is a custom 0.2.2 version that used
to avoid the cross-compiling issue mentioned in bug 1569003. The issue
has been fixed in the coreaudio-sys 0.2.3, so we should follow the
upstream instead of using a custom version. As a result, the
coreaudio-sys would generate API bindings based on the MacOS SDK defined
in the build settings.
Differential Revision: https://phabricator.services.mozilla.com/D50531
--HG--
extra : moz-landing-system : lando
This is not an error in the same way as a download failure, and should not be reported as one.
An Info message is sufficient.
Also suppress "unknown" location in messages about @font-face rules, as it is not useful,
pending a proper fix (bug 1450903).
Differential Revision: https://phabricator.services.mozilla.com/D50346
--HG--
extra : moz-landing-system : lando
Lots of these callbacks have a non-`void*` final parameter, which UBSAN
complains about. This commit changes them to have a `void*` parameter.
This requires undoing the machinery added in the first two commits of bug
1473631: `TypePrefChangeFunc` and `PREF_CHANGE_METHOD`. The resulting code is
simpler (which is good) and more boilerplate-y (which is bad) but avoids the
undefined behaviour (which is good).
Differential Revision: https://phabricator.services.mozilla.com/D50901
--HG--
extra : moz-landing-system : lando
- When partial present is not valid, ensure that a single dirty
rect the entire size of the framebuffer is returned.
- Ensure that we never return an empty dirty rect. If nothing is
dirty, the returned dirty rects array is empty, which can be
used by the client to completely skip calling Present.
- Remove partial present Multi mode (for now). This mode has
some issues with overlapping tiles which can be resolved as
a follow up.
This should allow enabling partial present for a single dirty rect,
which covers most common cases. We can re-implement the more
complicated Multi partial present mode if / when we find pages
where supporting multiple partial present rects is a good win.
Differential Revision: https://phabricator.services.mozilla.com/D51332
--HG--
extra : moz-landing-system : lando