mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +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
Notes:
sideshowbarker
2024-07-16 20:31:50 +09:00
Author: https://github.com/awesomekling
Commit: 3466771492
Pull-request: https://github.com/SerenityOS/serenity/pull/23259
Reviewed-by: https://github.com/trflynn89 ✅
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