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:
Aliaksandr Kalenik
2024-05-12 18:49:03 +02:00
committed by Andreas Kling
parent 59cb7994c6
commit d79438a2a6
11 changed files with 478 additions and 57 deletions

View File

@@ -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 {};