mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 18:20:43 +09:00
LibJS/Bytecode: Implement the delete unary expression
`delete` has to operate directly on Reference Records, so this introduces a new set of operations called DeleteByValue, DeleteVariable and DeleteById. They operate similarly to their Get counterparts, except they end in creating a (temporary) Reference and calling delete_ on it.
This commit is contained in:
parent
589c3771e9
commit
7cc53b7ef1
Notes:
sideshowbarker
2024-07-17 16:38:10 +09:00
Author: https://github.com/Lubrsi
Commit: 7cc53b7ef1
Pull-request: https://github.com/SerenityOS/serenity/pull/13312
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/linusg ✅
6 changed files with 146 additions and 4 deletions
|
@ -79,6 +79,7 @@ public:
|
|||
|
||||
CodeGenerationErrorOr<void> emit_load_from_reference(JS::ASTNode const&);
|
||||
CodeGenerationErrorOr<void> emit_store_to_reference(JS::ASTNode const&);
|
||||
CodeGenerationErrorOr<void> emit_delete_reference(JS::ASTNode const&);
|
||||
|
||||
void begin_continuable_scope(Label continue_target);
|
||||
void end_continuable_scope();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue