Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Dec 31, 2024
1 parent 94620d4 commit ea5f34d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/compiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -803,11 +803,19 @@ function zero_single_allocation(builder::LLVM.IRBuilder, @nospecialize(jlType::D
continue
end
if isa(ty, LLVM.ArrayType)
@assert jlty isa DataType
subTy = if jlty isa DataType
eltype(jlty)
elseif !(jlty isa DataType)
if eltype(ty) isa LLVM.PointerType && LLVM.addrspace(eltype(ty)) == 10
Any
else
throw(AssertionError("jlty=$jlty ty=$ty"))
end
end
for i = 1:length(ty)
npath = copy(path)
push!(npath, LLVM.ConstantInt(LLVM.IntType(32), i - 1))
push!(todo, (npath, eltype(ty), eltype(jlty)))
push!(todo, (npath, eltype(ty), subty))
end
continue
end
Expand Down

0 comments on commit ea5f34d

Please sign in to comment.