Skip to content

Commit

Permalink
Remove all recursion limits
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisYatunin committed Sep 18, 2024
1 parent 3d90cc3 commit 930e798
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 57 deletions.
10 changes: 9 additions & 1 deletion src/UnrolledUtilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,14 @@ abstract type StaticSequence{N} end
include("StaticOneTo.jl")
include("StaticBitVector.jl")

include("recursion_limits.jl") # This must be included at the end of the module.
# Remove the default recursion limit from every function defined in this module.
@static if hasfield(Method, :recursion_relation)
module_names = names(@__MODULE__; all = true)
module_values = map(Base.Fix1(getproperty, @__MODULE__), module_names)
module_functions = filter(Base.Fix2(isa, Function), module_values)
for f in module_functions, method in methods(f)
method.recursion_relation = Returns(true)
end
end

end
56 changes: 0 additions & 56 deletions src/recursion_limits.jl

This file was deleted.

0 comments on commit 930e798

Please sign in to comment.