mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 971319 - Stop passing redundant barriering information through to GetPropertyIC. (r=jandem)
This commit is contained in:
parent
ccfea40879
commit
b41c031b17
@ -6570,11 +6570,11 @@ CodeGenerator::visitNameIC(OutOfLineUpdateCache *ool, DataPtr<NameIC> &ic)
|
||||
bool
|
||||
CodeGenerator::addGetPropertyCache(LInstruction *ins, RegisterSet liveRegs, Register objReg,
|
||||
PropertyName *name, TypedOrValueRegister output,
|
||||
bool allowGetters, bool monitoredResult)
|
||||
bool monitoredResult)
|
||||
{
|
||||
switch (gen->info().executionMode()) {
|
||||
case SequentialExecution: {
|
||||
GetPropertyIC cache(liveRegs, objReg, name, output, allowGetters, monitoredResult);
|
||||
GetPropertyIC cache(liveRegs, objReg, name, output, monitoredResult);
|
||||
return addCache(ins, allocateCache(cache));
|
||||
}
|
||||
case ParallelExecution: {
|
||||
@ -6632,11 +6632,10 @@ CodeGenerator::visitGetPropertyCacheV(LGetPropertyCacheV *ins)
|
||||
RegisterSet liveRegs = ins->safepoint()->liveRegs();
|
||||
Register objReg = ToRegister(ins->getOperand(0));
|
||||
PropertyName *name = ins->mir()->name();
|
||||
bool allowGetters = ins->mir()->allowGetters();
|
||||
bool monitoredResult = ins->mir()->monitoredResult();
|
||||
TypedOrValueRegister output = TypedOrValueRegister(GetValueOutput(ins));
|
||||
|
||||
return addGetPropertyCache(ins, liveRegs, objReg, name, output, allowGetters, monitoredResult);
|
||||
return addGetPropertyCache(ins, liveRegs, objReg, name, output, monitoredResult);
|
||||
}
|
||||
|
||||
bool
|
||||
@ -6645,11 +6644,10 @@ CodeGenerator::visitGetPropertyCacheT(LGetPropertyCacheT *ins)
|
||||
RegisterSet liveRegs = ins->safepoint()->liveRegs();
|
||||
Register objReg = ToRegister(ins->getOperand(0));
|
||||
PropertyName *name = ins->mir()->name();
|
||||
bool allowGetters = ins->mir()->allowGetters();
|
||||
bool monitoredResult = ins->mir()->monitoredResult();
|
||||
TypedOrValueRegister output(ins->mir()->type(), ToAnyRegister(ins->getDef(0)));
|
||||
|
||||
return addGetPropertyCache(ins, liveRegs, objReg, name, output, allowGetters, monitoredResult);
|
||||
return addGetPropertyCache(ins, liveRegs, objReg, name, output, monitoredResult);
|
||||
}
|
||||
|
||||
typedef bool (*GetPropertyICFn)(JSContext *, size_t, HandleObject, MutableHandleValue);
|
||||
|
@ -351,7 +351,7 @@ class CodeGenerator : public CodeGeneratorSpecific
|
||||
private:
|
||||
bool addGetPropertyCache(LInstruction *ins, RegisterSet liveRegs, Register objReg,
|
||||
PropertyName *name, TypedOrValueRegister output,
|
||||
bool allowGetters, bool monitoredResult);
|
||||
bool monitoredResult);
|
||||
bool addGetElementCache(LInstruction *ins, Register obj, ConstantOrRegister index,
|
||||
TypedOrValueRegister output, bool monitoredResult,
|
||||
bool allowDoubleResult);
|
||||
|
@ -8723,7 +8723,6 @@ IonBuilder::getPropTryCache(bool *emitted, PropertyName *name,
|
||||
bool barrier, types::TemporaryTypeSet *types)
|
||||
{
|
||||
JS_ASSERT(*emitted == false);
|
||||
bool accessGetter = inspector->hasSeenAccessedGetter(pc);
|
||||
|
||||
MDefinition *obj = current->peek(-1);
|
||||
|
||||
@ -8735,7 +8734,9 @@ IonBuilder::getPropTryCache(bool *emitted, PropertyName *name,
|
||||
return true;
|
||||
}
|
||||
|
||||
if (accessGetter)
|
||||
// Since getters have no guaranteed return values, we must barrier in order to be
|
||||
// able to attach stubs for them.
|
||||
if (inspector->hasSeenAccessedGetter(pc))
|
||||
barrier = true;
|
||||
|
||||
if (needsToMonitorMissingProperties(types))
|
||||
@ -8767,10 +8768,6 @@ IonBuilder::getPropTryCache(bool *emitted, PropertyName *name,
|
||||
return false;
|
||||
}
|
||||
|
||||
// If the cache is known to access getters, then enable generation of getter stubs.
|
||||
if (accessGetter)
|
||||
load->setAllowGetters();
|
||||
|
||||
current->add(load);
|
||||
current->push(load);
|
||||
|
||||
|
@ -530,7 +530,6 @@ class GetPropertyIC : public RepatchIonCache
|
||||
size_t locationsIndex_;
|
||||
size_t numLocations_;
|
||||
|
||||
bool allowGetters_ : 1;
|
||||
bool monitoredResult_ : 1;
|
||||
bool hasTypedArrayLengthStub_ : 1;
|
||||
bool hasStrictArgumentsLengthStub_ : 1;
|
||||
@ -541,14 +540,13 @@ class GetPropertyIC : public RepatchIonCache
|
||||
GetPropertyIC(RegisterSet liveRegs,
|
||||
Register object, PropertyName *name,
|
||||
TypedOrValueRegister output,
|
||||
bool allowGetters, bool monitoredResult)
|
||||
bool monitoredResult)
|
||||
: liveRegs_(liveRegs),
|
||||
object_(object),
|
||||
name_(name),
|
||||
output_(output),
|
||||
locationsIndex_(0),
|
||||
numLocations_(0),
|
||||
allowGetters_(allowGetters),
|
||||
monitoredResult_(monitoredResult),
|
||||
hasTypedArrayLengthStub_(false),
|
||||
hasStrictArgumentsLengthStub_(false),
|
||||
@ -570,9 +568,6 @@ class GetPropertyIC : public RepatchIonCache
|
||||
TypedOrValueRegister output() const {
|
||||
return output_;
|
||||
}
|
||||
bool allowGetters() const {
|
||||
return allowGetters_ && !idempotent();
|
||||
}
|
||||
bool monitoredResult() const {
|
||||
return monitoredResult_;
|
||||
}
|
||||
@ -609,6 +604,9 @@ class GetPropertyIC : public RepatchIonCache
|
||||
// Helpers for CanAttachNativeGetProp
|
||||
typedef JSContext * Context;
|
||||
bool allowArrayLength(Context cx, HandleObject obj) const;
|
||||
bool allowGetters() const {
|
||||
return monitoredResult() && !idempotent();
|
||||
}
|
||||
|
||||
// Attach the proper stub, if possible
|
||||
bool tryAttachStub(JSContext *cx, IonScript *ion, HandleObject obj,
|
||||
|
@ -6687,7 +6687,6 @@ class MGetPropertyCache
|
||||
{
|
||||
CompilerRootPropertyName name_;
|
||||
bool idempotent_;
|
||||
bool allowGetters_;
|
||||
bool monitoredResult_;
|
||||
|
||||
CacheLocationList location_;
|
||||
@ -6698,7 +6697,6 @@ class MGetPropertyCache
|
||||
: MUnaryInstruction(obj),
|
||||
name_(name),
|
||||
idempotent_(false),
|
||||
allowGetters_(false),
|
||||
monitoredResult_(monitoredResult),
|
||||
location_(),
|
||||
inlinePropertyTable_(nullptr)
|
||||
@ -6746,15 +6744,9 @@ class MGetPropertyCache
|
||||
idempotent_ = true;
|
||||
setMovable();
|
||||
}
|
||||
bool allowGetters() const {
|
||||
return allowGetters_;
|
||||
}
|
||||
bool monitoredResult() const {
|
||||
return monitoredResult_;
|
||||
}
|
||||
void setAllowGetters() {
|
||||
allowGetters_ = true;
|
||||
}
|
||||
CacheLocationList &location() {
|
||||
return location_;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user