Skip to content

Commit f3f0722

Browse files
authored
Update absint.jl
1 parent 9008a97 commit f3f0722

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/absint.jl

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,6 @@
55

66
const JL_MAX_TAGS = 64 # see `enum jl_small_typeof_tags` in julia.h
77

8-
"""
9-
Returns `nothing` if the value could not be resolved statically.
10-
"""
11-
function resolve_static_type_tag(val::LLVM.Value)
12-
type_tag = resolve_static_uint(val)
13-
type_tag === nothing && return nothing
14-
type_addr = if type_tag < (JL_MAX_TAGS << 4)
15-
# "small" type tags are indices into a special array
16-
jl_small_typeof = Ptr{Ptr{Cvoid}}(cglobal(:jl_small_typeof))
17-
type_idx = type_tag ÷ Core.sizeof(Ptr{Cvoid})
18-
unsafe_load(jl_small_typeof, type_idx + 1)
19-
else
20-
Ptr{Cvoid}(type_tag)
21-
end
22-
return Base.unsafe_pointer_to_objref(type_addr)
23-
end
24-
258
function absint(@nospecialize(arg::LLVM.Value), partial::Bool = false, istracked::Bool=false, typetag::Bool=false)::Tuple{Bool, Any}
269
if (value_type(arg) == LLVM.PointerType(LLVM.StructType(LLVMType[]), Tracked)) || (value_type(arg) == LLVM.PointerType(LLVM.StructType(LLVMType[]), Derived)) || istracked
2710
ce, _ = get_base_and_offset(arg; offsetAllowed = false, inttoptr = true)

0 commit comments

Comments
 (0)