Elektrine lite

← Feed

@cda@macaw.social

Post #2937843

2026-05-14 02:01 UTC

@swetland@chaos.social I am still on the fence about adding string slices. Ahh yeah, I just reworked parameters a little bit for mine...aggregate type parameter prep and some forms of re-ordering. Some basics like if a function returns a full struct as value that gets allocated on the stack and the address is passed in as param. That's table stakes but I can re-use alot of that mechanism for e.g. string type. Decomposing is an interesting approach though.

Replies (1)

  • @swetland@chaos.social 2026-05-14 02:13

    @cda@macaw.social I could treat tiny structs like sized arrays & slices as pass-by-stack, but I'd rather have them be (nearly) as inexpensive as raw pointers would be, so I'm hoping to just keep them in registers all the way. I gather LLVM's approach (to SSA generation) is start everything as memory hosted and them shuffle them up into registers, which does seem like it might simplify this sort of thing. Though right now I'm implementing actual register allocation, so all this must wait a bit longer.

    Open ##2937844