зеркало из https://github.com/mozilla/gecko-dev.git
Bug 951528. r=jandem
This commit is contained in:
Родитель
1bdeb67c5f
Коммит
dbdcf17535
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче