-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cassette and packages that work similarly (e.g. Zygote) perform essentially the following transformation: For `f(args...) = g(args...)`, they define ``` (::overloaded{f})(c::Context, f, args...) = _apply(overloaded{g}(), (c, g), args) ``` With all of our recent compiler improvements inference can now handle this pattern fairly well. However, inlining was falling over for the case where `g === _apply` (because it didn't check the _apply special case again after inlining the first _apply), causing inefficiencies (_apply is fairly expensive). Fix that by revisiting the _apply check. While we're at it, also remove the obsolete isapply flag in InliningTodo, since we now do all the rewriting up front.
- Loading branch information
Showing
2 changed files
with
24 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters