mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:57:45 +00:00
LibWasm: Don't put values and labels in OwnPtrs
Doing that was causing a lot of malloc/free traffic, but since there's no need to have a stable pointer to them, we can just store them by value. This makes execution significantly faster :^)
This commit is contained in:
parent
c7bc1f59d8
commit
73eb0785e0
5 changed files with 83 additions and 86 deletions
|
@ -388,7 +388,7 @@ public:
|
|||
|
||||
private:
|
||||
size_t m_arity { 0 };
|
||||
InstructionPointer m_continuation;
|
||||
InstructionPointer m_continuation { 0 };
|
||||
};
|
||||
|
||||
class Frame {
|
||||
|
@ -418,7 +418,7 @@ private:
|
|||
|
||||
class Stack {
|
||||
public:
|
||||
using EntryType = Variant<NonnullOwnPtr<Value>, NonnullOwnPtr<Label>, NonnullOwnPtr<Frame>>;
|
||||
using EntryType = Variant<Value, Label, NonnullOwnPtr<Frame>>;
|
||||
Stack() = default;
|
||||
|
||||
[[nodiscard]] bool is_empty() const { return m_data.is_empty(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue