XPCNativeSetKey has a huge comment about this weird hack it does,
where it tags the first 16 bytes with a magic value. The purpose of
this seem to be that PLDHashtable used to require that the Match()
operation handle both the desired "key" type and the actual entry type
(NativeSetMap::Entry in this case), with the latter needed for
resizing. However, that duality in the match operation has not been
needed since bug 374906, which landed in 2007, so this class can be
greatly simplified.
IsAKey() can be replaced with true, which simplifies some hash
operations.
Configure uses the value of the MT environment variable before falling back
to mt(.exe), but the build system was completely ignoring the MT
environment variable.
--HG--
extra : rebase_source : 8c9b43aeb08493ae5bd6d6361f4f18f097ea0553
Allocate an additional slot in localInfo_ and use it to save the incoming TLS
pointer. When setting up arguments for a function call, get the TLS pointer from
that local slot. Also preserve the TLS pointer register by reloading it before
returning.
This makes the Baseline ABI compatible with the Ion ABI.
- Add a virtual isCallPreserved() method to LNode which allows a call
instruction to indicate that it preserves the values of some registers. Use
this hook in BacktrackingAllocator when processing a call instruction.
- Add a preservesTlsReg() property to MAsmJSCall and use this to implement the
LAsmJSCall::isCallPreserved() method.
- Mark intra-module WebAssembly calls as preserving the TLS pointer register.
This change allows the backtracking register allocator to leave the TLS pointer
register alone in small functions that don't need it for something else. There
are probably more improvements to be done if we need to split the live range of
the TLS pointer register. For example, BacktrackingAllocator::splitAcrossCalls()
will still split that live range at all calls.
WebAssembly functions take a TLS pointer argument and now ensure that the
WasmTlsReg register has the same value when they return.
This is not yet exploited by the register allocator which still thinks that all
registers are clobbered by function calls.
Get the stack limit from TlsData::stackLimit instead of
SymbolicAddress::StackLimit. Since the TLS pointer register is available at
every function prologue, the over-recursion check is the same cost as using the
statically linked address.
WebAssembly functions now expect to be passed a hidden argument in WasmTlsReg
which is a pointer to a TlsData struct.
Temporarily allocate a TlsData instance in the wasm::Instance itself. When wasm
supports multithreading, we will need to allocate a TlsData instance per thread
per module instance.
This patch generates code to pass the TLS pointer to WebAssembly functions,
preserving it through intra-module calls. The pointer is not used for anything
yet, and the the TLS pointer register is not currently preserved across function
calls.