Fix handling empty returns in aarch64 compiler

This commit is contained in:
Nikita Lisitsa 2026-03-13 12:53:03 +03:00
parent 788e98409a
commit e5ce32d25f

View file

@ -198,7 +198,8 @@ namespace pslang::jit::aarch64
void apply(ast::return_statement const & node)
{
apply(*node.value);
if (node.value)
apply(*node.value);
}
void apply(ast::field_definition const &)
@ -817,7 +818,8 @@ namespace pslang::jit::aarch64
void apply(ast::return_statement const & node)
{
apply(*node.value);
if (node.value)
apply(*node.value);
if (stack_offset > 0)
builder.add_imm(31, 31, stack_offset);
builder.ret();