Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get rid of recurse/overdub cycle in favor of only overdub #63

Merged
merged 1 commit into from
Jul 27, 2018

Conversation

jrevels
Copy link
Collaborator

@jrevels jrevels commented Jul 27, 2018

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 of Cassette.recurse to Cassette.overdub. This new overdub function performs a similar operation to the old recurse, but now manually inlines the body of the old overdub 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).

@jrevels jrevels force-pushed the jr/inlineoverdub branch 2 times, most recently from e279ad0 to 68c2371 Compare July 27, 2018 04:13
@jrevels
Copy link
Collaborator Author

jrevels commented Jul 27, 2018

tests pass using latest Julia, CI just didn't have an updated build, so I'm merging

@jrevels jrevels merged commit 284370c into master Jul 27, 2018
@jrevels jrevels deleted the jr/inlineoverdub branch July 27, 2018 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

invalid pcre ccall error message Composed broadcast example does not infer
1 participant