If `isFieldInit()` returns `true`, the first `if`-statement is taken, so it must
be `false` in the `else` block.
Depends on D121746
Differential Revision: https://phabricator.services.mozilla.com/D121747
While removing unnecessary `mozilla::Maybe` in the last part, I've noticed that
this header has many unused or unnecessary includes.
Depends on D121743
Differential Revision: https://phabricator.services.mozilla.com/D121745
Source positions used `mozilla::Maybe<uint32_t>` for BinAST, but with BinAST
removed, we can now change this back to use `uint32_t`.
Depends on D121742
Differential Revision: https://phabricator.services.mozilla.com/D121743
We could optimise this case by not popping `CTOR` from the stack in
`emitPrivateStaticMethod`, but that requires more changes in `PropertyEmitter`.
Depends on D121739
Differential Revision: https://phabricator.services.mozilla.com/D121740
Inline the complete hash operation even for value types when the code is hot
enough to be Warp-compiled. (Except on 32-bit platforms, because we can't
compute the hash of objects inline, cf. the previous part.)
Differential Revision: https://phabricator.services.mozilla.com/D118983
Similar to part 11, optimise the hash lookup for objects.
`MHashObject` can't be moved, because the hash value depends on the object's
address, which can change when the object is moved by the GC.
Differential Revision: https://phabricator.services.mozilla.com/D118982
Inline `Set.prototype.has` in CacheIR when called with objects.
Implementing `MacroAssembler::hashObject()` on 32-bit platforms is difficult,
because it uses 64-bit operations, so we either have to allocate twice as much
registers for `Register64` or alternatively spill the values on the stack. For
now just punt and only support this optimisation on 64-bit platforms.
Differential Revision: https://phabricator.services.mozilla.com/D118977
Inline `Set.prototype.has` in CacheIR when called with strings.
Normalising a string input is a bit annoying, because we have to atomise the
string, which means performing a VM-call. And in contrast to other VM-calls,
we have to continue the CacheIR operation after the call, which means we can't
implement this as a shared method in `CacheIRCompiler`, but instead need to
implement it in `BaselineCacheIRCompiler`. And furthermore we require that
atomising a string won't GC, because we spill the `SetObject` on the stack.
Depends on D118973
Differential Revision: https://phabricator.services.mozilla.com/D118974
Inline `Set.prototype.has` in CacheIR when called with non-GC things.
We have to inline the following steps:
1. Guard the input is a non-GC thing.
2. Normalise the input, i.e. transform doubles to int32 when possible and
canonicalise NaN values.
3. Hash the input through `mozilla::HashGeneric()`.
4. Perform the hash lookup.
The hash lookup already uses templates and handles BigInts in preparation for
the next parts.
Differential Revision: https://phabricator.services.mozilla.com/D118973
Use a simple VM-call in CacheIR for now. This approach won't be enough to
close the distance to the competition, because JSC/V8 can inline the complete
hash operation, but already inlining everything in CacheIR seems a bit extreme.
The next parts will inline the hash operation when called with specific types,
because there we can guarantee we won't generate a big blob of assembly in
CacheIR.
Differential Revision: https://phabricator.services.mozilla.com/D118972
ARM64 and MIPS64 already support this mode. And ARM32 and MIPS32 can simply take
the same approach as x86.
The next part will add another `branch64` method and that method supports
`Condition::Equal`. And instead of adjusting the comment for `branch64` when
`Equal` is or is not supported, it was easier to just support it everywhere.
Differential Revision: https://phabricator.services.mozilla.com/D118970
We are using the OS version as reported in the user agent string, but on macOS the version is capped at 10.15. This patch now reports the real and full OS version.
Differential Revision: https://phabricator.services.mozilla.com/D122063
This doesn't actually initialize FOG on Android yet;
that part will come later.
For now it only separates out everything used on Desktop (full initialization, pref watching, user activity)
from what's necessary on mobile (where Glean is actually controlled by the embedding application, e.g. Fenix)
For desktop this simply moves most code out into a separate module.
For mobile it has a bare minimum init function.
Differential Revision: https://phabricator.services.mozilla.com/D121100
In GeckoView we need to depend on the same Glean version as the included
Glean Rust crate has.
We _could_ let Gradle read that from Cargo.lock directly,
but that complicates the build.
Instead we manually update both versions to the same
and have Gradle ensure we don't forget that.
Differential Revision: https://phabricator.services.mozilla.com/D116602
This also upgrades to Kotlin 1.3.50, which is required to due Glean
requirements. Fenix is already on 1.4, so that's no problem.
We also turn the geckoview_example into a multiDex application.
Otherwise we run into the 64k dex symbols size limit.
Differential Revision: https://phabricator.services.mozilla.com/D116601