as per @code_warntype
(donβt know what a MWE is) everything is fine (no reds!)
MethodInstance for sendints_inner(::BitBuffer, ::Int64, ::MVector{3, UInt32}, ::MVector{3, UInt32}, ::UInt128)
from sendints_inner(buffer::BitBuffer, num_of_bits::Integer, sizes::MVector{3, UInt32}, nums::MVector{3, UInt32}, result::T) where T<:Unsigned in Main at /Users/uliano/files/bitbuffer.jl:181
Static Parameters
T = UInt128
Arguments
#self#::Core.Const(sendints_inner)
buffer::BitBuffer
num_of_bits@_3::Int64
sizes::MVector{3, UInt32}
nums::MVector{3, UInt32}
result@_6::UInt128
Locals
@_7::Union{Nothing, Tuple{Int64, Int64}}
num_of_bytes::Int64
value::UInt128
part::UInt128
rest::UInt128
shiftbits::Int64
shiftbytes::Int64
firstbits::UInt8
freebits::Int64
avail_in_first_byte::Int64
byte::UInt8
num_of_bits@_18::Int64
result@_19::UInt128
Body::Nothing
1 β (result@_19 = result@_6)
β (num_of_bits@_18 = num_of_bits@_3)
β Core.NewvarNode(:(@_7))
β Core.NewvarNode(:(num_of_bytes))
β Core.NewvarNode(:(value))
β Core.NewvarNode(:(part))
β Core.NewvarNode(:(rest))
β Core.NewvarNode(:(shiftbits))
β Core.NewvarNode(:(shiftbytes))
β Core.NewvarNode(:(firstbits))
β %11 = result@_19::UInt128
β %12 = Base.getindex(sizes, 2)::UInt32
β (result@_19 = %11 * %12)
β %14 = result@_19::UInt128
β %15 = Base.getindex(nums, 2)::UInt32
β (result@_19 = %14 + %15)
β %17 = result@_19::UInt128
β %18 = Base.getindex(sizes, 3)::UInt32
β (result@_19 = %17 * %18)
β %20 = result@_19::UInt128
β %21 = Base.getindex(nums, 3)::UInt32
β (result@_19 = %20 + %21)
β %23 = Base.getproperty(buffer, :offset)::Int64
β %24 = (8 - %23)::Int64
β (avail_in_first_byte = Main.mod(%24, 8))
β %26 = Main.sizeof(result@_19)::Core.Const(16)
β %27 = (%26 * 8)::Core.Const(128)
β (freebits = %27 - num_of_bits@_18)
β %29 = Base.getproperty(buffer, :offset)::Int64
β %30 = (%29 > 0)::Bool
βββ goto #3 if not %30
2 β %32 = result@_19::UInt128
β %33 = Base.getproperty(buffer, :offset)::Int64
β %34 = (0xff << %33)::UInt8
β %35 = (%32 & %34)::UInt128
β %36 = (%35 % Main.UInt8)::UInt8
β %37 = Base.getproperty(buffer, :offset)::Int64
β (firstbits = %36 >>> %37)
β %39 = Base.getproperty(buffer, :bits)::Vector{UInt8}
β %40 = Base.getproperty(buffer, :index)::Int64
β %41 = Base.getindex(%39, %40)::UInt8
β %42 = (%41 | firstbits)::UInt8
β %43 = Base.getproperty(buffer, :bits)::Vector{UInt8}
β %44 = Base.getproperty(buffer, :index)::Int64
β Base.setindex!(%43, %42, %44)
β %46 = Base.getproperty(buffer, :index)::Int64
β %47 = (%46 + 1)::Int64
β Base.setproperty!(buffer, :index, %47)
βββ (num_of_bits@_18 = num_of_bits@_18 - avail_in_first_byte)
3 β (result@_19 = Main.bswap(result@_19))
β (shiftbytes = Main.cld(freebits, 8))
β (shiftbits = Main.rem(freebits, 8))
β %53 = Main.typeof(result@_19)::Core.Const(UInt128)
β %54 = Main.typemax(%53)::Core.Const(0xffffffffffffffffffffffffffffffff)
β %55 = (8 * shiftbytes)::Int64
β (rest = %54 << %55)
β (part = ~rest)
β %58 = (result@_19 & part)::UInt128
β (value = %58 << shiftbits)
β %60 = (result@_19 & rest)::UInt128
β (result@_19 = %60 | value)
β (result@_19 = result@_19 << avail_in_first_byte)
β (result@_19 = Main.bswap(result@_19))
β (num_of_bytes = Main.cld(num_of_bits@_18, 8))
β %65 = (1:num_of_bytes)::Core.PartialStruct(UnitRange{Int64}, Any[Core.Const(1), Int64])
β (@_7 = Base.iterate(%65))
β %67 = (@_7 === nothing)::Bool
β %68 = Base.not_int(%67)::Bool
βββ goto #6 if not %68
4 β %70 = @_7::Tuple{Int64, Int64}
β Core.getfield(%70, 1)
β %72 = Core.getfield(%70, 2)::Int64
β (byte = result@_19 % Main.UInt8)
β %74 = Base.getproperty(buffer, :bits)::Vector{UInt8}
β %75 = byte::UInt8
β %76 = Base.getproperty(buffer, :index)::Int64
β Base.setindex!(%74, %75, %76)
β %78 = Base.getproperty(buffer, :index)::Int64
β %79 = (%78 + 1)::Int64
β Base.setproperty!(buffer, :index, %79)
β (result@_19 = result@_19 >>> 8)
β (@_7 = Base.iterate(%65, %72))
β %83 = (@_7 === nothing)::Bool
β %84 = Base.not_int(%83)::Bool
βββ goto #6 if not %84
5 β goto #4
6 β %87 = Main.mod(num_of_bits@_18, 8)::Int64
β Base.setproperty!(buffer, :offset, %87)
β %89 = Base.getproperty(buffer, :offset)::Int64
β %90 = (%89 > 0)::Bool
βββ goto #8 if not %90
7 β %92 = Base.getproperty(buffer, :index)::Int64
β %93 = (%92 - 1)::Int64
βββ Base.setproperty!(buffer, :index, %93)
8 β return Main.nothing