Use StencilModuleMetadata to hold module function-declarations list so that a
ModuleObject is no longer needed to perform parsing.
Depends on D83274
Differential Revision: https://phabricator.services.mozilla.com/D83270
The binding name is by definition the explicitName of the JSFunction so do
not store a copy of it. This avoids needing to trace that anymore.
Depends on D83269
Differential Revision: https://phabricator.services.mozilla.com/D83274
Similar to what is done for FunctionScope, defer the initialization of
ModuleScope::Data::module field until creating concrete scope.
Depends on D83206
Differential Revision: https://phabricator.services.mozilla.com/D83269
Introduce StencilModuleEntry type to replace {Import,Export}EntryObject
during parsing. Also introduce StencilModuleMetadata to hold resulting
import/export tables.
Differential Revision: https://phabricator.services.mozilla.com/D83206
This way IsPackedArray does not depend on TI and can be used with Warp.
Adds MStoreHoleValueElement for JSOp::InitElemArray writing a hole value. This
instruction writes the hole value and sets the NON_PACKED flag. ICs don't
optimize writing holes.
We now also check in debug builds that if IsPackedArray returns true, the first
few elements aren't the magic hole value.
Differential Revision: https://phabricator.services.mozilla.com/D82966
Re-organize the code. Add an early return instead of a big if-statement.
Change the initlen reference to a plain uint32_t.
Depends on D82963
Differential Revision: https://phabricator.services.mozilla.com/D82964
The old code in ensureDenseElements marked non-packed before extending the
elements capacity. That's a problem because it can be the statically-allocated
EmptyObjectElements and we can't set the flag on that.
It's clearer to do the non-packed check in ensureDenseInitializedLength.
Depends on D82962
Differential Revision: https://phabricator.services.mozilla.com/D82963
Use StencilModuleMetadata to hold module function-declarations list so that a
ModuleObject is no longer needed to perform parsing.
Depends on D83274
Differential Revision: https://phabricator.services.mozilla.com/D83270
The binding name is by definition the explicitName of the JSFunction so do
not store a copy of it. This avoids needing to trace that anymore.
Depends on D83269
Differential Revision: https://phabricator.services.mozilla.com/D83274
Similar to what is done for FunctionScope, defer the initialization of
ModuleScope::Data::module field until creating concrete scope.
Depends on D83206
Differential Revision: https://phabricator.services.mozilla.com/D83269
Introduce StencilModuleEntry type to replace {Import,Export}EntryObject
during parsing. Also introduce StencilModuleMetadata to hold resulting
import/export tables.
Differential Revision: https://phabricator.services.mozilla.com/D83206
Use StencilModuleMetadata to hold module function-declarations list so that a
ModuleObject is no longer needed to perform parsing.
Depends on D83274
Differential Revision: https://phabricator.services.mozilla.com/D83270
The binding name is by definition the explicitName of the JSFunction so do
not store a copy of it. This avoids needing to trace that anymore.
Differential Revision: https://phabricator.services.mozilla.com/D83274
Similar to what is done for FunctionScope, defer the initialization of
ModuleScope::Data::module field until creating concrete scope.
Differential Revision: https://phabricator.services.mozilla.com/D83269
Introduce StencilModuleEntry type to replace {Import,Export}EntryObject
during parsing. Also introduce StencilModuleMetadata to hold resulting
import/export tables.
Differential Revision: https://phabricator.services.mozilla.com/D83206
I based the InliningTree / CompileInfo code on IonBuilder::inlineScriptedCall.
In the future, if we want to inline cases where we didn't allocate a new ICScript, it should just be a matter of changing a few lines in maybeInlineIC. We can use the default ICScript off the target script.
(Note: we now check in maybeInlineCall that we don't already have a CallInlinedFunction. This should not normally happen, but could happen if we reset the warmup counter for a script.)
Differential Revision: https://phabricator.services.mozilla.com/D83184
When taking a snapshot for inlining, we have to read the CacheIR to find the ICScript and the target. We could store the target in another field in CallInlinedFunction, but that could be awkward in the future if we want to inline without trial inlining, because we won't have a CallInlinedFunction available. Instead, I hoisted the CacheIR-reading code in maybeInlineCall into its own function that can be shared by TrialInlining and the snapshot code.
Differential Revision: https://phabricator.services.mozilla.com/D83183
Preparing for inlining, at which point the WarpSnapshot / WarpScriptSnapshot relationship is no longer 1-to-1.
Depends on D83180
Differential Revision: https://phabricator.services.mozilla.com/D83182
Almost all of the data in WarpBuilder was already script-specific, so instead of renaming it to WarpScriptBuilder everywhere, I pulled out a WarpCompilation class to hold the data that is shared between scripts.
Differential Revision: https://phabricator.services.mozilla.com/D83180
I added an overload of IsInsideNursery for TenuredCell that always returns false so that IsAboutToBeFinalizedInternal should optimise out the nursery check for things that are never allocated in the nursery.
Differential Revision: https://phabricator.services.mozilla.com/D83308
GCRuntime::decommitFreeArenasWithoutUnlocking can now get called in situations when we do have empty chunks, e.g. when handling OOM in GCRuntime::decommitFreeArenas. We can just remove this assertion.
Differential Revision: https://phabricator.services.mozilla.com/D83295