mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibJS/Bytecode: Add Operand in/out to all the bytecode codegen helpers
This is pure prep work for refactoring the bytecode to use more operands instead of only registers. generate_bytecode() virtuals now return an Optional<Operand>, and the idea is to return an Operand referring to the value produced by this AST node. They also take an Optional<Operand> "preferred_dst" input. This is intended to communicate the caller's preference for an output operand, if any. This will be used to elide temporaries when we can store the result directly in a local, for example.
This commit is contained in:
parent
e46de4eb59
commit
7f1a62a1d3
Notes:
sideshowbarker
2024-07-17 05:01:20 +09:00
Author: https://github.com/awesomekling
Commit: 7f1a62a1d3
Pull-request: https://github.com/SerenityOS/serenity/pull/23259
Reviewed-by: https://github.com/trflynn89 ✅
4 changed files with 375 additions and 370 deletions
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue