mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 857094. (r=sstangl)
This commit is contained in:
parent
e2b5865f26
commit
905d015a4d
@ -6058,7 +6058,6 @@ IonBuilder::jsop_setelem_dense()
|
||||
return false;
|
||||
}
|
||||
|
||||
// Determine whether a write barrier is required.
|
||||
if (oracle->elementWriteNeedsBarrier(script(), pc))
|
||||
store->setNeedsBarrier();
|
||||
|
||||
|
@ -1001,6 +1001,9 @@ IonBuilder::inlineUnsafeSetDenseArrayElement(CallInfo &callInfo, uint32_t base)
|
||||
/* needsHoleCheck = */ false);
|
||||
store->setRacy();
|
||||
|
||||
if (oracle->elementWriteNeedsBarrier(getInlineArgTypeSet(callInfo, arri)))
|
||||
store->setNeedsBarrier();
|
||||
|
||||
current->add(store);
|
||||
|
||||
if (!resumeAfter(store))
|
||||
|
@ -640,8 +640,13 @@ TypeInferenceOracle::elementWriteNeedsBarrier(RawScript script, jsbytecode *pc)
|
||||
{
|
||||
// Return true if SETELEM-like instructions need a write barrier before modifying
|
||||
// a property. The object is the third value popped by SETELEM.
|
||||
StackTypeSet *types = script->analysis()->poppedTypes(pc, 2);
|
||||
return types->propertyNeedsBarrier(cx, JSID_VOID);
|
||||
return elementWriteNeedsBarrier(script->analysis()->poppedTypes(pc, 2));
|
||||
}
|
||||
|
||||
bool
|
||||
TypeInferenceOracle::elementWriteNeedsBarrier(StackTypeSet *obj)
|
||||
{
|
||||
return obj->propertyNeedsBarrier(cx, JSID_VOID);
|
||||
}
|
||||
|
||||
StackTypeSet *
|
||||
|
@ -141,6 +141,9 @@ class TypeOracle
|
||||
virtual bool elementWriteNeedsBarrier(RawScript script, jsbytecode *pc) {
|
||||
return true;
|
||||
}
|
||||
virtual bool elementWriteNeedsBarrier(types::StackTypeSet *obj) {
|
||||
return true;
|
||||
}
|
||||
virtual MIRType elementWrite(RawScript script, jsbytecode *pc) {
|
||||
return MIRType_None;
|
||||
}
|
||||
@ -288,6 +291,7 @@ class TypeInferenceOracle : public TypeOracle
|
||||
bool propertyWriteCanSpecialize(RawScript script, jsbytecode *pc);
|
||||
bool propertyWriteNeedsBarrier(RawScript script, jsbytecode *pc, RawId id);
|
||||
bool elementWriteNeedsBarrier(RawScript script, jsbytecode *pc);
|
||||
bool elementWriteNeedsBarrier(types::StackTypeSet *obj);
|
||||
MIRType elementWrite(RawScript script, jsbytecode *pc);
|
||||
bool canInlineCall(HandleScript caller, jsbytecode *pc);
|
||||
types::TypeBarrier *callArgsBarrier(HandleScript caller, jsbytecode *pc);
|
||||
@ -416,4 +420,3 @@ IsNullOrUndefined(MIRType type)
|
||||
} /* js */
|
||||
|
||||
#endif // js_ion_type_oracle_h__
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user