Bug 1175714 - Watch for baseline frame values with nursery types during OSR, r=jandem.

This commit is contained in:
Brian Hackett 2015-07-07 11:24:36 -07:00
parent cab812c755
commit a1a3df909c

View File

@ -1095,8 +1095,12 @@ IonBuilder::initParameters()
// interpreter and didn't accumulate type information, try to use that OSR
// frame to determine possible initial types for 'this' and parameters.
if (thisTypes->empty() && baselineFrame_)
thisTypes->addType(baselineFrame_->thisType, alloc_->lifoAlloc());
if (thisTypes->empty() && baselineFrame_) {
TypeSet::Type type = baselineFrame_->thisType;
if (type.isSingleton())
checkNurseryObject(type.singleton());
thisTypes->addType(type, alloc_->lifoAlloc());
}
MParameter* param = MParameter::New(alloc(), MParameter::THIS_SLOT, thisTypes);
current->add(param);
@ -1107,7 +1111,10 @@ IonBuilder::initParameters()
if (types->empty() && baselineFrame_ &&
!script_->baselineScript()->modifiesArguments())
{
types->addType(baselineFrame_->argTypes[i], alloc_->lifoAlloc());
TypeSet::Type type = baselineFrame_->argTypes[i];
if (type.isSingleton())
checkNurseryObject(type.singleton());
types->addType(type, alloc_->lifoAlloc());
}
param = MParameter::New(alloc(), i, types);
@ -6995,6 +7002,9 @@ IonBuilder::newPendingLoopHeader(MBasicBlock* predecessor, jsbytecode* pc, bool
else
existingType = baselineFrame_->varTypes[var];
if (existingType.isSingleton())
checkNurseryObject(existingType.singleton());
// Extract typeset from value.
LifoAlloc* lifoAlloc = alloc().lifoAlloc();
TemporaryTypeSet* typeSet =