Skip to content

Commit 4814f1c

Browse files
refactor: remove get_substitutions_and_solved_unknowns
1 parent a5c28ce commit 4814f1c

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

src/utils.jl

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -837,29 +837,6 @@ function get_cmap(sys, exprs = nothing)
837837
return cmap, cs
838838
end
839839

840-
function get_substitutions_and_solved_unknowns(sys, exprs = nothing; no_postprocess = false)
841-
cmap, cs = get_cmap(sys, exprs)
842-
if empty_substitutions(sys) && isempty(cs)
843-
sol_states = Code.LazyState()
844-
pre = no_postprocess ? (ex -> ex) : get_postprocess_fbody(sys)
845-
else # Have to do some work
846-
if !empty_substitutions(sys)
847-
@unpack subs = get_substitutions(sys)
848-
else
849-
subs = []
850-
end
851-
subs = [cmap; subs] # The constants need to go first
852-
sol_states = Code.NameState(Dict(eq.lhs => Symbol(eq.lhs) for eq in subs))
853-
if no_postprocess
854-
pre = ex -> Let(Assignment[Assignment(eq.lhs, eq.rhs) for eq in subs], ex,
855-
false)
856-
else
857-
process = get_postprocess_fbody(sys)
858-
pre = ex -> Let(Assignment[Assignment(eq.lhs, eq.rhs) for eq in subs],
859-
process(ex), false)
860-
end
861-
end
862-
return pre, sol_states
863840
function empty_substitutions(sys)
864841
isempty(observed(sys))
865842
end

0 commit comments

Comments
 (0)