pallene-lang / pallene

Pallene Compiler
MIT License
697 stars 29 forks source link

Slightly adjust frameenter/exit in generated C #613

Closed hugomg closed 4 months ago

hugomg commented 4 months ago

1) Don't add blank lines around FRAMEENTER.

static void function_03(
    lua_State *L,
    Udata * restrict K,
    TValue * restrict U
) {
    PALLENE_C_FRAMEENTER(L, "myfunc");
    StackValue *base = L->top.p;
    ptrdiff_t base_offset = savestack(L, base);

2) Move the FRAMEEXIT to before the multi-return assignments. The assingments+return are a single thing.

PALLENE_FRAMEEXIT();
*ret2 = x3;
return x2;
hugomg commented 4 months ago

Next time, feel free to use a thumbs up reaction on GitHub instead (sends fewer notification emails)Em 9 de jul. de 2024 3:08 AM, SD Asif Hossein @.***> escreveu: Looks good to me.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>