mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-02 04:27:12 +02:00
LibJS: Allow SpreadExpressions to generate bytecode
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 20:33:50 +09:00
Author: https://github.com/Hendiadyoin1 Commit: https://github.com/SerenityOS/serenity/commit/ab763a56f6 Pull-request: https://github.com/SerenityOS/serenity/pull/15112 Reviewed-by: https://github.com/alimpfard ✅ Reviewed-by: https://github.com/davidot Reviewed-by: https://github.com/linusg
@@ -1959,6 +1959,13 @@ Bytecode::CodeGenerationErrorOr<void> ClassExpression::generate_bytecode(Bytecod
|
||||
return {};
|
||||
}
|
||||
|
||||
Bytecode::CodeGenerationErrorOr<void> SpreadExpression::generate_bytecode(Bytecode::Generator& generator) const
|
||||
{
|
||||
// NOTE: All users of this should handle the behaviour of this on their own,
|
||||
// assuming it returns an Array-like object
|
||||
return m_target->generate_bytecode(generator);
|
||||
}
|
||||
|
||||
Bytecode::CodeGenerationErrorOr<void> ThisExpression::generate_bytecode(Bytecode::Generator& generator) const
|
||||
{
|
||||
generator.emit<Bytecode::Op::ResolveThisBinding>();
|
||||
|
||||
Reference in New Issue
Block a user