dfdx / Umlaut.jl

The Code Tracer
MIT License
32 stars 6 forks source link

gotoifnot handle #30

Closed willtebbutt closed 1 year ago

willtebbutt commented 1 year ago

Proposal for just making a generic handler for GotoIfNot, which defaults to doing what it currently does. Lets the pass-author produce context-specific behaviour by dispatching on the first type parameter of t.

I'm very much open to changing this if it's not what you were imagining @dfdx

codecov-commenter commented 1 year ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@c026364). Click here to learn what that means. Patch has no changes to coverable lines.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #30 +/- ## ====================================== Coverage ? 1.09% ====================================== Files ? 7 Lines ? 637 Branches ? 0 ====================================== Hits ? 7 Misses ? 630 Partials ? 0 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

dfdx commented 1 year ago

Looks good for the current codebase.

Just for your information, for quite some time I experimented with adding control flow to the Tape by inferring loops and conditions. The current code structure, especially the part about goto's, is mostly the result of these experiments. Currently I don't work and don't plan to work on the control flow refactoring, if I go for it again, we might need to update handle_gotoifnot_node!() too.