mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:47:44 +00:00
LibJS/Bytecode: Add Bytecode::Operand
An Operand is either a register, a local, or a constant (index into the executable's constant table)
This commit is contained in:
parent
c0ec924dc9
commit
3466771492
6 changed files with 85 additions and 1 deletions
|
@ -42,4 +42,10 @@ RefPtr<SourceCode> InstructionStreamIterator::source_code() const
|
|||
return m_executable ? m_executable->source_code.ptr() : nullptr;
|
||||
}
|
||||
|
||||
Operand::Operand(Register reg)
|
||||
: m_type(Type::Register)
|
||||
, m_index(reg.index())
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue