mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 22:38:41 +09:00
Issue #1894 - Part 4: Implement IonMonkey support for nullish coalescing
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1566141
This commit is contained in:
parent
f282a4c05f
commit
5812721809
12 changed files with 123 additions and 16 deletions
|
|
@ -11517,6 +11517,24 @@ CodeGenerator::visitIsObjectAndBranch(LIsObjectAndBranch* ins)
|
|||
testObjectEmitBranch(Assembler::Equal, value, ins->ifTrue(), ins->ifFalse());
|
||||
}
|
||||
|
||||
void
|
||||
CodeGenerator::visitIsNullOrUndefined(LIsNullOrUndefined* ins)
|
||||
{
|
||||
Register output = ToRegister(ins->output());
|
||||
ValueOperand value = ToValue(ins, LIsNullOrUndefined::Input);
|
||||
|
||||
Label isNotNull, done;
|
||||
masm.branchTestNull(Assembler::NotEqual, value, &isNotNull);
|
||||
|
||||
masm.move32(Imm32(1), output);
|
||||
masm.jump(&done);
|
||||
|
||||
masm.bind(&isNotNull);
|
||||
masm.testUndefinedSet(Assembler::Equal, value, output);
|
||||
|
||||
masm.bind(&done);
|
||||
}
|
||||
|
||||
void
|
||||
CodeGenerator::loadOutermostJSScript(Register reg)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue