mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
LibJS: Store strings in a string table
Instead of using Strings in the bytecode ops this adds a global string table to the Executable struct which individual operations can refer to using indices. This brings bytecode ops one step closer to being pointer free.
This commit is contained in:
committed by
Andreas Kling
parent
4efccbd030
commit
6a0d1fa259
@@ -47,13 +47,13 @@ void BasicBlock::seal()
|
||||
// It also doesn't work because instructions that have String members use RefPtr internally which must be in writable memory.
|
||||
}
|
||||
|
||||
void BasicBlock::dump() const
|
||||
void BasicBlock::dump(Bytecode::Executable const& executable) const
|
||||
{
|
||||
Bytecode::InstructionStreamIterator it(instruction_stream());
|
||||
if (!m_name.is_empty())
|
||||
warnln("{}:", m_name);
|
||||
while (!it.at_end()) {
|
||||
warnln("[{:4x}] {}", it.offset(), (*it).to_string());
|
||||
warnln("[{:4x}] {}", it.offset(), (*it).to_string(executable));
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user