1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-29 17:25:10 +00:00

LibJS: Add bytecode generation for BinaryOp::InstanceOf

This commit is contained in:
Linus Groh 2021-06-07 21:18:19 +01:00
parent 5e996de8c6
commit 9c0d83d11d
4 changed files with 35 additions and 2 deletions

View file

@ -113,8 +113,11 @@ Optional<Bytecode::Register> BinaryExpression::generate_bytecode(Bytecode::Gener
case BinaryOp::In:
generator.emit<Bytecode::Op::In>(dst_reg, *lhs_reg, *rhs_reg);
return dst_reg;
case BinaryOp::InstanceOf:
generator.emit<Bytecode::Op::InstanceOf>(dst_reg, *lhs_reg, *rhs_reg);
return dst_reg;
default:
TODO();
VERIFY_NOT_REACHED();
}
}