Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Tail call + exception handling #249

@thibaudmichaud

Description

@thibaudmichaud

return_call and related instructions from the tail-call proposal (now phase 4) unwind the current frame before calling the target. So if the return_call is enclosed by a try block, I expect that any exception thrown by the callee cannot be caught by the try block:

try
  return_call $fn
catch_all
  ;; Unreachable, this frame is gone so the exception is "rethrown" to the caller.
end

Does this match everyone's expectations? Should we add some spec text and tests to cover this case? Are there other ambiguous cases with tail-call+EH?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions