get rid of recurse/overdub cycle in favor of only overdub #63
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
supercedes #62
fixes #59 (@Keno)
fixes #61
In my ongoing quest to increase user confusion, this PR removes the current
Cassette.overdub
and changes the name ofCassette.recurse
toCassette.overdub
. This newoverdub
function performs a similar operation to the oldrecurse
, but now manually inlines the body of the oldoverdub
function instead of calling such a function.This is a fairly disruptive change this close to Cassette's impending initial release, but it's worth it. This approach has drastically less reliance on splatting optimizations than the current approach, and additionally ensures there are (mostly) no more unspoofed recursion cycles left to trigger inferences limiting heuristic. As a result, many things are inferring now that weren't before (including the examples from #59). As a nice little side effect, we get to cut down our API by a function.
The tradeoff is that this approach requires more IR-munging than the old approach. Lucky, I was able to move most of the finnicky stuff to a reusable utility function (
insert_ir_elements!
).All tests here pass locally. I'm not sure if CI will pass immediately, though, since this requires JuliaLang/julia#28279 which was just merged.
Oh, and this removes
Fallback
(which as I've said before, was kind of just sitting around as an idea, but I don't think it's very useful here).