Entering the atoms zone with AutoAllocInAtomsZone is a bit of a special case and we don't support entering another realm in this state. Unfortunately this can happen during GC in a couple of place. The patch temporarily leaves the atoms zone during GC so that callbacks can enter whatever zones they like.
Differential Revision: https://phabricator.services.mozilla.com/D42312
--HG--
extra : moz-landing-system : lando
This makes it easier to change the jitScript_ field in later patches.
Depends on D42288
Differential Revision: https://phabricator.services.mozilla.com/D42289
--HG--
extra : moz-landing-system : lando
maybeJitScript() will become a bit slower in the future but many callers know
statically they have a script with a JitScript so by calling jitScript() there
we can avoid the hasJitScript() check in opt builds.
This is also consistent with the baselineScript() and ionScript() accessors.
I renamed jitScript() to jitScriptX() and then fixed all callers to call
the right method.
Differential Revision: https://phabricator.services.mozilla.com/D42288
--HG--
extra : moz-landing-system : lando
This should make this fail cleanly on OOM rather than crashing, which should make this crash go away (without reducing memory usage obviously). The problem was the lack of hasHash/ensureHash methods that we use to handle OOM when generating unique IDs for GC things. I also tidied the equivalent code for ObjectGroupRealm::NewEntry (FallibleHashMethods is already implemented for MovableCellHasher).
We could further improve this by giving each script an immutable hash code on creation if you think it's worth the tradeoff of storing this for every script.
Differential Revision: https://phabricator.services.mozilla.com/D41233
--HG--
extra : moz-landing-system : lando
This defines both |constexpr uintptr_t| and |const pointer| values. reinterpret_cast
in constexpr is not allowed and this way we can still use these values in static_asserts.
Differential Revision: https://phabricator.services.mozilla.com/D42109
--HG--
extra : moz-landing-system : lando
This also removes BaselineScript::Trace and IonScript::Trace that were just
forwarding to the non-static trace().
Differential Revision: https://phabricator.services.mozilla.com/D41708
--HG--
extra : moz-landing-system : lando
We want to move BaselineScript and IonScript to JitScript, but JitScript can be
discarded on GC. These flags ensure this state is persisted when that happens.
Differential Revision: https://phabricator.services.mozilla.com/D41578
--HG--
extra : moz-landing-system : lando
This is more consistent with Baseline Interpreter -> Baseline JIT code and
avoids calling into C++ repeatedly when we disable Ion compilation for the
script after Baseline JIT compilation.
The inIon fix prevents an iloop when running jit-test/tests/ion/bug1324521.js
Differential Revision: https://phabricator.services.mozilla.com/D41574
--HG--
extra : moz-landing-system : lando
The main goal was to abstract the special BASELINE_DISABLED_SCRIPT and
ION_*_SCRIPT values better. Each of these values now has its own setter
method instead of passing these values to setBaselineScript and setIonScript.
Differential Revision: https://phabricator.services.mozilla.com/D41573
--HG--
extra : moz-landing-system : lando
This adds a testcase for the fix in bug 1568029. This adds a testing function markObjectPropertiesUnknown() which will hopefully be useful for fuzzing.
Differential Revision: https://phabricator.services.mozilla.com/D42093
--HG--
extra : moz-landing-system : lando
This should make this fail cleanly on OOM rather than crashing, which should make this crash go away (without reducing memory usage obviously). The problem was the lack of hasHash/ensureHash methods that we use to handle OOM when generating unique IDs for GC things. I also tidied the equivalent code for ObjectGroupRealm::NewEntry (FallibleHashMethods is already implemented for MovableCellHasher).
We could further improve this by giving each script an immutable hash code on creation if you think it's worth the tradeoff of storing this for every script.
Differential Revision: https://phabricator.services.mozilla.com/D41233
--HG--
extra : moz-landing-system : lando
WasmInstance::funcRef has 'FailureMode::FailOnInvalidRef' so it looks like we
just need to report the OOM and return InvalidRef.
Differential Revision: https://phabricator.services.mozilla.com/D42050
--HG--
extra : moz-landing-system : lando