зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1518837: Reuse input register in LGuardToClass. r=jandem
This commit is contained in:
Родитель
6de4d9b81c
Коммит
085ce9ea7b
|
@ -12678,14 +12678,16 @@ void CodeGenerator::visitHasClass(LHasClass* ins) {
|
|||
|
||||
void CodeGenerator::visitGuardToClass(LGuardToClass* ins) {
|
||||
Register lhs = ToRegister(ins->lhs());
|
||||
Register output = ToRegister(ins->output());
|
||||
Register temp = ToRegister(ins->temp());
|
||||
|
||||
// branchTestObjClass may zero the object register on speculative paths
|
||||
// (we should have a defineReuseInput allocation in this case).
|
||||
Register spectreRegToZero = lhs;
|
||||
|
||||
Label notEqual;
|
||||
|
||||
masm.branchTestObjClass(Assembler::NotEqual, lhs, ins->mir()->getClass(),
|
||||
temp, output, ¬Equal);
|
||||
masm.mov(lhs, output);
|
||||
temp, spectreRegToZero, ¬Equal);
|
||||
|
||||
// Can't return null-return here, so bail.
|
||||
bailoutFrom(¬Equal, ins->snapshot());
|
||||
|
|
|
@ -4208,9 +4208,9 @@ void LIRGenerator::visitGuardToClass(MGuardToClass* ins) {
|
|||
MOZ_ASSERT(ins->object()->type() == MIRType::Object);
|
||||
MOZ_ASSERT(ins->type() == MIRType::Object);
|
||||
LGuardToClass* lir =
|
||||
new (alloc()) LGuardToClass(useRegister(ins->object()), temp());
|
||||
new (alloc()) LGuardToClass(useRegisterAtStart(ins->object()), temp());
|
||||
assignSnapshot(lir, Bailout_TypeBarrierO);
|
||||
define(lir, ins);
|
||||
defineReuseInput(lir, ins, 0);
|
||||
}
|
||||
|
||||
void LIRGenerator::visitObjectClassToString(MObjectClassToString* ins) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче