Skip to content

Commit 0f072b4

Browse files
committed
Fix Sym construction in CSE
[skip ci]
1 parent ad7a861 commit 0f072b4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/code.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export toexpr, Assignment, (←), Let, Func, DestructuredArgs, LiteralExpr,
88

99
import ..SymbolicUtils
1010
import ..SymbolicUtils.Rewriters
11-
import SymbolicUtils: @matchable, BasicSymbolic, Sym, Term, iscall, operation, arguments, issym,
11+
import SymbolicUtils: @matchable, BasicSymbolic, _Sym, Term, iscall, operation, arguments, issym,
1212
isconst, symtype, sorted_arguments, metadata, isterm, term, maketerm
1313
import SymbolicIndexingInterface: symbolic_type, NotSymbolic
1414

@@ -683,7 +683,7 @@ end
683683

684684
### Common subexprssion evaluation
685685

686-
@inline newsym(::Type{T}) where T = Sym{T}(gensym("cse"))
686+
@inline newsym(::Type{T}) where T = _Sym(T, gensym("cse"))
687687

688688
function _cse!(mem, expr)
689689
iscall(expr) || return expr
@@ -747,7 +747,7 @@ function cse_block!(assignments, counter, names, name, state, x)
747747
if haskey(names, x)
748748
return names[x]
749749
else
750-
sym = Sym{symtype(x)}(Symbol(name, counter[]))
750+
sym = _Sym(symtype(x), Symbol(name, counter[]))
751751
names[x] = sym
752752
push!(assignments, sym x)
753753
counter[] += 1

0 commit comments

Comments
 (0)