mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 23:08:39 +09:00
Issue #1894 - Part 1: Implement coalesce JS opcode
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1566141
This commit is contained in:
parent
62a140ab80
commit
3efa23472c
3 changed files with 23 additions and 4 deletions
|
|
@ -2128,6 +2128,16 @@ CASE(JSOP_IFNE)
|
|||
}
|
||||
END_CASE(JSOP_IFNE)
|
||||
|
||||
CASE(JSOP_COALESCE)
|
||||
{
|
||||
MutableHandleValue res = REGS.stackHandleAt(-1);
|
||||
bool cond = !res.isNullOrUndefined();
|
||||
if (cond) {
|
||||
ADVANCE_AND_DISPATCH(GET_JUMP_OFFSET(REGS.pc));
|
||||
}
|
||||
}
|
||||
END_CASE(JSOP_COALESCE)
|
||||
|
||||
CASE(JSOP_OR)
|
||||
{
|
||||
bool cond = ToBoolean(REGS.stackHandleAt(-1));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue