mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 14:28:39 +09:00
Change inlining of intrinsics.
This commit is contained in:
parent
dca3b936bf
commit
8f16d02c34
16 changed files with 206 additions and 40 deletions
|
|
@ -11528,6 +11528,32 @@ CodeGenerator::visitHasClass(LHasClass* ins)
|
|||
masm.cmpPtrSet(Assembler::Equal, output, ImmPtr(ins->mir()->getClass()), output);
|
||||
}
|
||||
|
||||
void
|
||||
CodeGenerator::visitGuardToClass(LGuardToClass* ins)
|
||||
{
|
||||
Register lhs = ToRegister(ins->lhs());
|
||||
Register output = ToRegister(ins->output());
|
||||
Register temp = ToRegister(ins->temp());
|
||||
|
||||
Label notEqual;
|
||||
|
||||
masm.branchTestObjClass(Assembler::NotEqual, lhs, temp, ins->mir()->getClass(), ¬Equal);
|
||||
masm.mov(lhs, output);
|
||||
|
||||
if (ins->mir()->type() == MIRType::Object) {
|
||||
// Can't return null-return here, so bail
|
||||
bailoutFrom(¬Equal, ins->snapshot());
|
||||
} else {
|
||||
Label done;
|
||||
masm.jump(&done);
|
||||
|
||||
masm.bind(¬Equal);
|
||||
masm.mov(ImmPtr(0), output);
|
||||
|
||||
masm.bind(&done);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CodeGenerator::visitWasmParameter(LWasmParameter* lir)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue