mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:47:46 +00:00
LibJS: Devirtualize and pack the bytecode stream :^)
This patch changes the LibJS bytecode to be a stream of instructions packed one-after-the-other in contiguous memory, instead of a vector of OwnPtr<Instruction>. This should be a lot more cache-friendly. :^) Instructions are also devirtualized and instead have a type field using a new Instruction::Type enum. To iterate over a bytecode stream, one must now use Bytecode::InstructionStreamIterator.
This commit is contained in:
parent
845f2826aa
commit
e7d69c5d3c
11 changed files with 284 additions and 110 deletions
|
@ -29,6 +29,6 @@ template<>
|
|||
struct AK::Formatter<JS::Bytecode::Label> : AK::Formatter<FormatString> {
|
||||
void format(FormatBuilder& builder, JS::Bytecode::Label const& value)
|
||||
{
|
||||
return AK::Formatter<FormatString>::format(builder, "@{}", value.address());
|
||||
return AK::Formatter<FormatString>::format(builder, "@{:x}", value.address());
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue