mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-05 22:52:10 +02:00
LibJS: Join locals, constants and registers into single vector
Merging registers, constants and locals into single vector means: - Better data locality - No need to check type in Interpreter::get() and Interpreter::set() which are very hot functions Performance improvement is visible in almost all Octane and Kraken tests.
This commit is contained in:
committed by
Andreas Kling
parent
59cb7994c6
commit
d79438a2a6
@@ -157,6 +157,7 @@ public:
|
||||
size_t length() const;
|
||||
ByteString to_byte_string(Bytecode::Executable const&) const;
|
||||
void visit_labels(Function<void(Label&)> visitor);
|
||||
void visit_operands(Function<void(Operand&)> visitor);
|
||||
static void destroy(Instruction&);
|
||||
|
||||
protected:
|
||||
@@ -166,6 +167,7 @@ protected:
|
||||
}
|
||||
|
||||
void visit_labels_impl(Function<void(Label&)>) { }
|
||||
void visit_operands_impl(Function<void(Operand&)>) { }
|
||||
|
||||
private:
|
||||
Type m_type {};
|
||||
|
||||
Reference in New Issue
Block a user