Skip to content

Commit

Permalink
Bug 1175714 - Watch for baseline frame values with nursery types duri…
Browse files Browse the repository at this point in the history
…ng OSR, r=jandem.
  • Loading branch information
bhackett1024 committed Jul 8, 2015
1 parent e05708e commit f41604e
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions js/src/jit/IonBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.isSingletonUnchecked())
checkNurseryObject(type.singleton());
thisTypes->addType(type, alloc_->lifoAlloc());
}

MParameter* param = MParameter::New(alloc(), MParameter::THIS_SLOT, thisTypes);
current->add(param);
Expand All @@ -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.isSingletonUnchecked())
checkNurseryObject(type.singleton());
types->addType(type, alloc_->lifoAlloc());
}

param = MParameter::New(alloc(), i, types);
Expand Down Expand Up @@ -6995,6 +7002,9 @@ IonBuilder::newPendingLoopHeader(MBasicBlock* predecessor, jsbytecode* pc, bool
else
existingType = baselineFrame_->varTypes[var];

if (existingType.isSingletonUnchecked())
checkNurseryObject(existingType.singleton());

// Extract typeset from value.
LifoAlloc* lifoAlloc = alloc().lifoAlloc();
TemporaryTypeSet* typeSet =
Expand Down

0 comments on commit f41604e

Please sign in to comment.