mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 903193 - Part 7: Replace PushPar use in Ion with SetElementPar. (r=nmatsakis)
This commit is contained in:
parent
b0abb42ae8
commit
8fd041e907
@ -4839,7 +4839,11 @@ CodeGenerator::visitStoreElementHoleV(LStoreElementHoleV *lir)
|
||||
|
||||
typedef bool (*SetObjectElementFn)(JSContext *, HandleObject, HandleValue, HandleValue,
|
||||
bool strict);
|
||||
static const VMFunction SetObjectElementInfo = FunctionInfo<SetObjectElementFn>(SetObjectElement);
|
||||
typedef ParallelResult (*SetElementParFn)(ForkJoinSlice *, HandleObject, HandleValue,
|
||||
HandleValue, bool);
|
||||
static const VMFunctionsModal SetObjectElementInfo = VMFunctionsModal(
|
||||
FunctionInfo<SetObjectElementFn>(SetObjectElement),
|
||||
FunctionInfo<SetElementParFn>(SetElementPar));
|
||||
|
||||
bool
|
||||
CodeGenerator::visitOutOfLineStoreElementHole(OutOfLineStoreElementHole *ool)
|
||||
@ -4917,7 +4921,6 @@ CodeGenerator::visitOutOfLineStoreElementHole(OutOfLineStoreElementHole *ool)
|
||||
else
|
||||
pushArg(TypedOrValueRegister(MIRType_Int32, ToAnyRegister(index)));
|
||||
pushArg(object);
|
||||
// FIXME: Handle parallel case in upcoming patch.
|
||||
if (!callVM(SetObjectElementInfo, ins))
|
||||
return false;
|
||||
|
||||
|
@ -159,6 +159,25 @@ jit::ExtendArrayPar(ForkJoinSlice *slice, JSObject *array, uint32_t length)
|
||||
return array;
|
||||
}
|
||||
|
||||
ParallelResult
|
||||
jit::SetElementPar(ForkJoinSlice *slice, HandleObject obj, HandleValue index, HandleValue value,
|
||||
bool strict)
|
||||
{
|
||||
RootedId id(slice);
|
||||
if (!ValueToIdPure(index, id.address()))
|
||||
return TP_RETRY_SEQUENTIALLY;
|
||||
|
||||
// SetObjectElementOperation, the sequential version, has several checks
|
||||
// for certain deoptimizing behaviors, such as marking having written to
|
||||
// holes and non-indexed element accesses. We don't do that here, as we
|
||||
// can't modify any TI state anyways. If we need to add a new type, we
|
||||
// would bail out.
|
||||
RootedValue v(slice, value);
|
||||
if (!baseops::SetPropertyHelper<ParallelExecution>(slice, obj, obj, id, 0, &v, strict))
|
||||
return TP_RETRY_SEQUENTIALLY;
|
||||
return TP_SUCCESS;
|
||||
}
|
||||
|
||||
ParallelResult
|
||||
jit::ConcatStringsPar(ForkJoinSlice *slice, HandleString left, HandleString right,
|
||||
MutableHandleString out)
|
||||
|
@ -24,6 +24,10 @@ bool CheckInterruptPar(ForkJoinSlice *slice);
|
||||
// generation.
|
||||
JSObject *ExtendArrayPar(ForkJoinSlice *slice, JSObject *array, uint32_t length);
|
||||
|
||||
// Set properties and elements on thread local objects.
|
||||
ParallelResult SetElementPar(ForkJoinSlice *slice, HandleObject obj, HandleValue index,
|
||||
HandleValue value, bool strict);
|
||||
|
||||
// String related parallel functions. These tend to call existing VM functions
|
||||
// that take a ThreadSafeContext.
|
||||
ParallelResult ConcatStringsPar(ForkJoinSlice *slice, HandleString left, HandleString right,
|
||||
|
Loading…
Reference in New Issue
Block a user