mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Backed out changeset af3a0d277ad2 (bug 1073991) for mass bustage.
CLOSED TREE
This commit is contained in:
parent
5240838225
commit
08cf036ad4
@ -7911,26 +7911,13 @@ ICSetPropNativeAddCompiler::generateStubCode(MacroAssembler &masm)
|
||||
masm.loadPtr(Address(BaselineStubReg, ICSetProp_NativeAdd::offsetOfNewShape()), scratch);
|
||||
masm.storePtr(scratch, shapeAddr);
|
||||
|
||||
// Try to change the object's type.
|
||||
// Change the object's type if required.
|
||||
Label noTypeChange;
|
||||
|
||||
// Check if the cache has a new type to change to.
|
||||
masm.loadPtr(Address(BaselineStubReg, ICSetProp_NativeAdd::offsetOfNewType()), scratch);
|
||||
masm.branchTestPtr(Assembler::Zero, scratch, scratch, &noTypeChange);
|
||||
|
||||
// Check if the old type still has a newScript.
|
||||
Register scratch2 = protoReg;
|
||||
masm.loadPtr(Address(objReg, JSObject::offsetOfType()), scratch2);
|
||||
masm.branchPtr(Assembler::Equal,
|
||||
Address(scratch2, types::TypeObject::offsetOfNewScript()),
|
||||
ImmWord(0),
|
||||
&noTypeChange);
|
||||
|
||||
// Change the object's type.
|
||||
Address typeAddr(objReg, JSObject::offsetOfType());
|
||||
EmitPreBarrier(masm, typeAddr, MIRType_TypeObject);
|
||||
masm.storePtr(scratch, typeAddr);
|
||||
|
||||
masm.bind(&noTypeChange);
|
||||
|
||||
Register holderReg;
|
||||
|
@ -2583,27 +2583,11 @@ GenerateAddSlot(JSContext *cx, MacroAssembler &masm, IonCache::StubAttacher &att
|
||||
|
||||
if (oldType != obj->type()) {
|
||||
// Changing object's type from a partially to fully initialized type,
|
||||
// per the acquired properties analysis. Only change the type if the
|
||||
// old type still has a newScript.
|
||||
Label noTypeChange, skipPop;
|
||||
|
||||
masm.push(object);
|
||||
masm.loadPtr(Address(object, JSObject::offsetOfType()), object);
|
||||
masm.branchPtr(Assembler::Equal,
|
||||
Address(object, types::TypeObject::offsetOfNewScript()),
|
||||
ImmWord(0),
|
||||
&noTypeChange);
|
||||
masm.pop(object);
|
||||
|
||||
// per the acquired properties analysis.
|
||||
Address typeAddr(object, JSObject::offsetOfType());
|
||||
if (cx->zone()->needsIncrementalBarrier())
|
||||
masm.callPreBarrier(typeAddr, MIRType_TypeObject);
|
||||
masm.storePtr(ImmGCPtr(obj->type()), typeAddr);
|
||||
|
||||
masm.jump(&skipPop);
|
||||
masm.bind(&noTypeChange);
|
||||
masm.pop(object);
|
||||
masm.bind(&skipPop);
|
||||
}
|
||||
|
||||
// Set the value on the object. Since this is an add, obj->lastProperty()
|
||||
|
@ -1236,10 +1236,6 @@ struct TypeObject : public gc::TenuredCell
|
||||
return offsetof(TypeObject, proto_);
|
||||
}
|
||||
|
||||
static inline uint32_t offsetOfNewScript() {
|
||||
return offsetof(TypeObject, newScript_);
|
||||
}
|
||||
|
||||
private:
|
||||
inline uint32_t basePropertyCount() const;
|
||||
inline void setBasePropertyCount(uint32_t count);
|
||||
|
Loading…
Reference in New Issue
Block a user