diff --git a/base/genericmemory.jl b/base/genericmemory.jl index 6537839320206..c4ebbc6ca14e1 100644 --- a/base/genericmemory.jl +++ b/base/genericmemory.jl @@ -320,11 +320,13 @@ end # get, set(once), modify, swap and replace at index, atomically function getindex_atomic(mem::GenericMemory, order::Symbol, i::Int) + @_propagate_inbounds_meta memref = memoryref(mem, i) return memoryrefget(memref, order, @_boundscheck) end function setindex_atomic!(mem::GenericMemory, order::Symbol, val, i::Int) + @_propagate_inbounds_meta T = eltype(mem) memref = memoryref(mem, i) return memoryrefset!( @@ -342,6 +344,7 @@ function setindexonce_atomic!( val, i::Int, ) + @_propagate_inbounds_meta T = eltype(mem) memref = memoryref(mem, i) return Core.memoryrefsetonce!( @@ -354,11 +357,13 @@ function setindexonce_atomic!( end function modifyindex_atomic!(mem::GenericMemory, order::Symbol, op, val, i::Int) + @_propagate_inbounds_meta memref = memoryref(mem, i) return Core.memoryrefmodify!(memref, op, val, order, @_boundscheck) end function swapindex_atomic!(mem::GenericMemory, order::Symbol, val, i::Int) + @_propagate_inbounds_meta T = eltype(mem) memref = memoryref(mem, i) return Core.memoryrefswap!( @@ -377,6 +382,7 @@ function replaceindex_atomic!( desired, i::Int, ) + @_propagate_inbounds_meta T = eltype(mem) memref = memoryref(mem, i) return Core.memoryrefreplace!(