mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 11:45:06 +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:
parent
4efccbd030
commit
6a0d1fa259
16 changed files with 173 additions and 82 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue