Elektrine lite

← Feed

@swetland@chaos.social

Post #2937842

2026-05-13 23:05 UTC

@cda@macaw.social This is what I've been leaning toward... having the string/slice entities basically be structs with a couple extra rules around their usage. The thing I really need to sort out is handling larger-than-single-register/word value types, which I think may entail decomposing variables of such types into groups-of-variables. Trying to avoid having to re-engineer the entire codegen phase of things (which presently assumes 1:1 param/variable:register, one register/value result of each expr, etc)

Replies (1)

  • @cda@macaw.social 2026-05-14 02:01

    @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.

    Open ##2937843