mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-11-09 17:51:03 +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:
parent
fd694e8672
commit
46d209c55b
Notes:
sideshowbarker
2024-07-16 22:14:49 +09:00
Author: https://github.com/awesomekling
Commit: 46d209c55b
Pull-request: https://github.com/SerenityOS/serenity/pull/23444
Reviewed-by: https://github.com/trflynn89
8 changed files with 27 additions and 52 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue