mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:48:12 +00:00
LibJS: Add AbstractInequals bytecode instruction :^)
This commit is contained in:
parent
6ae9346cd3
commit
bd1a5e282a
3 changed files with 32 additions and 0 deletions
|
@ -31,6 +31,11 @@ void LessThan::execute(Bytecode::Interpreter& interpreter) const
|
|||
interpreter.reg(m_dst) = less_than(interpreter.global_object(), interpreter.reg(m_src1), interpreter.reg(m_src2));
|
||||
}
|
||||
|
||||
void AbstractInequals::execute(Bytecode::Interpreter& interpreter) const
|
||||
{
|
||||
interpreter.reg(m_dst) = Value(!abstract_eq(interpreter.global_object(), interpreter.reg(m_src1), interpreter.reg(m_src2)));
|
||||
}
|
||||
|
||||
void NewString::execute(Bytecode::Interpreter& interpreter) const
|
||||
{
|
||||
interpreter.reg(m_dst) = js_string(interpreter.vm(), m_string);
|
||||
|
@ -79,6 +84,11 @@ String LessThan::to_string() const
|
|||
return String::formatted("LessThan dst:{}, src1:{}, src2:{}", m_dst, m_src1, m_src2);
|
||||
}
|
||||
|
||||
String AbstractInequals::to_string() const
|
||||
{
|
||||
return String::formatted("AbstractInequals dst:{}, src1:{}, src2:{}", m_dst, m_src1, m_src2);
|
||||
}
|
||||
|
||||
String NewString::to_string() const
|
||||
{
|
||||
return String::formatted("NewString dst:{}, string:\"{}\"", m_dst, m_string);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue