Bug 764163 - Inlined dynamic call to check GC Zeal in ionmonkey. r=dvander

This commit is contained in:
Eric Faust 2012-06-13 15:13:26 -07:00 committed by Nicolas Pierron
parent 54a9c41c29
commit 9c80337a33
2 changed files with 6 additions and 8 deletions

View File

@ -385,17 +385,16 @@ MacroAssembler::getNewObject(JSContext *cx, const Register &result,
JS_ASSERT(!templateObject->hasDynamicElements());
#ifdef JS_GC_ZEAL
if (cx->runtime->needZealousGC()) {
jump(fail);
return;
}
// Dynamic Cehck for GC Zeal.
movePtr(ImmWord(cx->runtime), result);
loadPtr(Address(result, offsetof(JSRuntime, gcZeal_)), result);
branch32(Assembler::NotEqual, result, Imm32(0), fail);
#endif
// Inline FreeSpan::allocate.
// There is always exactly one FreeSpan per allocKind per JSCompartment.
// If a FreeSpan is replaced, its members are updated in the freeLists table,
// which the code below always re-reads.
gc::FreeSpan *list = const_cast<gc::FreeSpan *>
(cx->compartment->arenas.getFreeList(allocKind));
loadPtr(AbsoluteAddress(&list->first), result);

View File

@ -207,7 +207,7 @@ CodeGeneratorShared::encode(LSnapshot *snapshot)
FlattenedMResumePointIter mirOperandIter(snapshot->mir());
if (!mirOperandIter.init())
return false;
uint32 startIndex = 0;
for (MResumePoint **it = mirOperandIter.begin(), **end = mirOperandIter.end();
it != end;
@ -251,7 +251,7 @@ CodeGeneratorShared::encode(LSnapshot *snapshot)
snapshots_.endSnapshot();
snapshot->setSnapshotOffset(offset);
return !snapshots_.oom();
}
@ -474,7 +474,6 @@ void
CodeGeneratorShared::emitPreBarrier(Address address, MIRType type)
{
addPreBarrierOffset(masm.patchableCallPreBarrier(address, type));
}
} // namespace ion