1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 20:34:59 +00:00

LibJS/Bytecode: Make primitive strings be constants

Instead of emitting a NewString instruction to construct a primitive
string from a parsed literal, we now instantiate the PrimitiveString on
the heap during codegen.
This commit is contained in:
Andreas Kling 2024-03-03 11:34:36 +01:00
parent fd694e8672
commit 46d209c55b
8 changed files with 27 additions and 52 deletions

View file

@ -50,4 +50,11 @@ void Executable::dump() const
warnln("");
}
void Executable::visit_edges(Visitor& visitor)
{
Base::visit_edges(visitor);
for (auto constant : constants)
visitor.visit(constant);
}
}