Skip to content

Commit 7e39426

Browse files
authored
Merge pull request #120 from JuliaSymbolics/s/workaround-crash
don't specialize Chain for tuples of rewriters
2 parents 23abaa1 + 8a4e08d commit 7e39426

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

src/rewriters.jl

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ end
5050

5151
If(f, x) = IfElse(f, x, Empty())
5252

53-
struct Chain{Cs}
54-
rws::Cs
53+
struct Chain
54+
rws
5555
end
5656

5757
function (rw::Chain)(x)
@@ -64,19 +64,6 @@ function (rw::Chain)(x)
6464
return x
6565
end
6666

67-
@generated function (rw::Chain{<:NTuple{N,Any}})(x) where N
68-
quote
69-
Base.@nexprs $N i->begin
70-
let f = rw.rws[i]
71-
y = @timer cached_repr(f) f(x)
72-
if y !== nothing
73-
x = y
74-
end
75-
end
76-
end
77-
return x
78-
end
79-
end
8067

8168
struct RestartedChain{Cs}
8269
rws::Cs

0 commit comments

Comments
 (0)