Skip to content

Commit

Permalink
try inference fix re ref
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Jun 14, 2024
1 parent b329abe commit 7f08afe
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/rules/jitrules.jl
Original file line number Diff line number Diff line change
Expand Up @@ -539,13 +539,14 @@ end
elseif actreg == ActiveState
Active(arg)
elseif actreg == MixedState
if dargs[i] isa Base.RefValue
MixedDuplicated(arg, dargs[i])
darg = Base.inferencebarrier(dargs[i])
if darg isa Base.RefValue
MixedDuplicated(arg, darg)
else
rval = if reverse
popfirst!(vals)
else
tmp = Ref(dargs[i])
tmp = Ref(darg)
push!(vals, tmp)
tmp
end
Expand All @@ -570,13 +571,14 @@ end
elseif actreg == MixedState
BatchMixedDuplicated(arg, ntuple(Val(Width)) do j
Base.@_inline_meta
if dargs[j][i] isa Base.RefValue
dargs[j][i]
darg = Base.inferencebarrier(dargs[j][i])
if darg isa Base.RefValue
darg
else
if reverse
popfirst!(vals)
else
tmp = Ref(dargs[j][i])
tmp = Ref(darg)
push!(vals, tmp)
tmp
end
Expand Down

0 comments on commit 7f08afe

Please sign in to comment.