Skip to content

Commit

Permalink
translate literal variables
Browse files Browse the repository at this point in the history
  • Loading branch information
KDr2 committed Oct 22, 2024
1 parent 7d73c27 commit b18752b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/tapedfunction.jl
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,14 @@ function translate!!(var::IRVar, line::Core.SlotNumber,
return Instruction(func, input, output)
end

function translate!!(var::IRVar, line::Number, # literal vars
bindings::Bindings, isconst::Bool, ir)
func = identity
input = (bind_var!(line, bindings, ir),)
output = bind_var!(var, bindings, ir)
return Instruction(func, input, output)
end

function translate!!(var::IRVar, line::NTuple{N, Symbol},
bindings::Bindings, isconst::Bool, ir) where {N}
# for syntax (; x, y, z), see Turing.jl#1873
Expand Down

0 comments on commit b18752b

Please sign in to comment.