1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 10:18:13 +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:
Ali Mohammad Pur 2021-05-23 21:21:17 +04:30 committed by Ali Mohammad Pur
parent c7bc1f59d8
commit 73eb0785e0
5 changed files with 83 additions and 86 deletions

View file

@ -34,7 +34,7 @@ private:
template<typename T>
T read_value(ReadonlyBytes data);
Vector<NonnullOwnPtr<Value>> pop_values(Configuration& configuration, size_t count);
Vector<Value> pop_values(Configuration& configuration, size_t count);
bool trap_if_not(bool value)
{
if (!value)