Elektrine lite

← Feed

@joe@f.duriansoftware.com

Post #2177627

2026-05-07 20:24 UTC

@zwarich@hachyderm.io maybe you could have the caller reserve stack space for the error, and then do the Swift trick of having a normally callee-save register that is either null on no error or takes on the sret address if an error is thrown. you'd waste the stack space in the no-error case, but it shouldn't cost the caller anything extra to reserve in addition to the rest of its own stack frame. and if the normal return is also indirect, you could share the stack slot for either the normal or error result

Replies (0)

No replies.