-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Labels
enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.frontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.optimization
Milestone
Description
for error unions it looks like this:
tail call fastcc void @__zig_return_error(%StackTrace* %0, i8* blockaddress(@foo, %ReturnError)), !dbg !50
ret i16 %6, !dbg !50
We could have __zig_return_error
take the sret parameter and populate the error value, then return void, so that it can be a tail call.
for pure errors we can pass the error code and return it, and then return it in the parent, another tail call.
Then look at the generated assembly and make sure we're doing tail calls. This is to keep the size of the code generated small for error return tracing. What is a return statement in code without error return tracing can become a jump instruction in code with error return tracing.
mathetake, illfygli, lin72h and ChiefMateStarbuck
Metadata
Metadata
Assignees
Labels
enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.frontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.optimization
Type
Projects
Status
To do