This commit is contained in:
Kannan Vijayan 2013-12-20 18:11:21 -05:00
Родитель 1bdeb67c5f
Коммит dbdcf17535
4 изменённых файлов: 19 добавлений и 2 удалений

Просмотреть файл

@ -9235,6 +9235,7 @@ IonBuilder::jsop_setarg(uint32_t arg)
JS_ASSERT(script()->uninlineable() && !isInlineBuilder());
MSetFrameArgument *store = MSetFrameArgument::New(alloc(), arg, val);
modifiesFrameArguments_ = true;
current->add(store);
current->setArg(arg);
return true;

Просмотреть файл

@ -767,7 +767,13 @@ LinearScanAllocator::assign(LAllocation allocation)
}
}
if (reg && allocation.isMemory()) {
bool useAsCanonicalSpillSlot = allocation.isMemory();
// Only canonically spill argument values when frame arguments are not
// modified in the body.
if (mir->modifiesFrameArguments())
useAsCanonicalSpillSlot = allocation.isStackSlot();
if (reg && useAsCanonicalSpillSlot) {
if (reg->canonicalSpill()) {
JS_ASSERT(allocation == *reg->canonicalSpill());

Просмотреть файл

@ -127,6 +127,10 @@ class MIRGenerator
return asmJSGlobalAccesses_;
}
bool modifiesFrameArguments() const {
return modifiesFrameArguments_;
}
public:
CompileCompartment *compartment;
@ -146,6 +150,11 @@ class MIRGenerator
AsmJSGlobalAccessVector asmJSGlobalAccesses_;
uint32_t minAsmJSHeapLength_;
// Keep track of whether frame arguments are modified during execution.
// RegAlloc needs to know this as spilling values back to their register
// slots is not compatible with that.
bool modifiesFrameArguments_;
#if defined(JS_ION_PERF)
AsmJSPerfSpewer asmJSPerfSpewer_;

Просмотреть файл

@ -30,7 +30,8 @@ MIRGenerator::MIRGenerator(CompileCompartment *compartment,
performsAsmJSCall_(false),
asmJSHeapAccesses_(*alloc),
asmJSGlobalAccesses_(*alloc),
minAsmJSHeapLength_(AsmJSAllocationGranularity)
minAsmJSHeapLength_(AsmJSAllocationGranularity),
modifiesFrameArguments_(false)
{ }
bool