Bug 1209026 - Use infallible new for some Label allocations. r=jonco

This commit is contained in:
Jan de Mooij 2015-10-06 09:48:41 +01:00
parent b37841304f
commit a2bc87fa0b
4 changed files with 6 additions and 3 deletions

View File

@ -0,0 +1,3 @@
// |jit-test| --no-threads
load(libdir + 'oomTest.js');
oomTest(() => getBacktrace({thisprops: gc() && delete addDebuggee.enabled}));

View File

@ -658,7 +658,7 @@ CodeGenerator::getJumpLabelForBranch(MBasicBlock* block)
// important here as these tests are extremely unlikely to be used in loop
// backedges, so emit inline code for the patchable jump. Heap allocating
// the label allows it to be used by out of line blocks.
Label* res = alloc().lifoAlloc()->new_<Label>();
Label* res = alloc().lifoAlloc()->newInfallible<Label>();
Label after;
masm.jump(&after);
masm.bind(res);

View File

@ -531,7 +531,7 @@ CodeGeneratorX64::visitAsmJSStoreHeap(LAsmJSStoreHeap* ins)
if (mir->isAtomicAccess())
jumpTo = gen->outOfBoundsLabel();
else
rejoin = jumpTo = alloc().lifoAlloc()->new_<Label>();
rejoin = jumpTo = alloc().lifoAlloc()->newInfallible<Label>();
maybeCmpOffset = emitAsmJSBoundsCheckBranch(mir, mir, ToRegister(ptr), jumpTo);
}

View File

@ -636,7 +636,7 @@ CodeGeneratorX86::visitAsmJSStoreHeap(LAsmJSStoreHeap* ins)
if (mir->isAtomicAccess())
jumpTo = gen->outOfBoundsLabel();
else
rejoin = jumpTo = alloc().lifoAlloc()->new_<Label>();
rejoin = jumpTo = alloc().lifoAlloc()->newInfallible<Label>();
maybeCmpOffset = emitAsmJSBoundsCheckBranch(mir, mir, ToRegister(ptr), jumpTo);
}