Skip to content

Please add documentation on the .goto. pragma to Nim manual #21151

Open
@yuanweixin

Description

@yuanweixin

Summary

Please add documentation on the currently undocumented .goto. pragma to nim manual.

Description

I have been going through some code and came across the undocumented .goto. pragma. Initially I thought maybe it is related to (e.g. predecessor of) the computedGoto pragma, but it appears to be a different thing.

Example code where it is used

Did some googling and found a forum post where it is mentioned.

Relevant forum thread

And apparently it is a feature.

Araq:
This is not a hack btw and we should document it. It's a terrific design: We transform a control flow dependency into a data dependency so that all analysis algorithms that rely on structured control flow simply continue to work.

Please add doc to the nim manual so it is clear what .goto. can be used for. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationRelated to documentation content (not generation).

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions