Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backports for Julia 1.11.0-rc2 #54925

Merged
merged 36 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
c3a21a2
set VERSION to 1.11.0-rc1
KristofferC Jun 25, 2024
30c4d49
LazyString in interpolated error messages in threadingconstructs (#54…
jishnub Jun 24, 2024
d728558
remove `wrap` from NEWS and docs since it was made private
KristofferC Jun 25, 2024
6cf82f9
Revert "Revert "Cleanup MemoryRef tests (#54681)""
KristofferC Jun 25, 2024
b7af64f
1.11: improve type stability of `_unsafe_take!(::IOBuffer)` (#54942)
aviatesk Jun 27, 2024
74cead1
inference: add missing `MustAlias` widening in `_getfield_tfunc` (#54…
aviatesk Jul 2, 2024
744b24d
Create `jl_clear_coverage_data` to dynamically reset coverage (#54358)
MilesCranmer May 24, 2024
b3b0416
LAPACK: Avoid repr call in `chkvalidparam` (#54952)
jishnub Jun 27, 2024
4929aa2
fix concurrent module loading return value (#54898)
vtjnash Jul 7, 2024
7e5214d
Add fast method for copyto!(::Memory, ::Memory) (#55082)
jakobnissen Jul 9, 2024
2314ea6
Use triple quotes in TOML.print when string contains newline (#55084)
palday Jul 9, 2024
c84b516
LinearAlgebra: use `≈` instead of `==` for `tr` tests in symmetric.jl…
aviatesk Jul 17, 2024
b5c04a4
Fix generic triangular solves with empty matrices (#54201)
dkarrasch Apr 23, 2024
d9906cf
Update the aarch64 devdocs to reflect the current state of its suppor…
gbaraldi Jul 16, 2024
2bc291a
don't throw EOFError from sleep (#54955)
lgeissbauer-btig Jul 17, 2024
f9b3b7f
Make warn missed transformations pass optional (#54871)
lcw Jul 18, 2024
a02dbac
Compat for `Base.@nospecializeinfer` (#55178)
mikmoore Jul 20, 2024
93e086f
compat notice for a[begin] indexing (#55197)
stevengj Jul 21, 2024
5ba19c1
Fix potential underrun with annotation merging (#54917)
tecosaur Jul 22, 2024
35f56b1
correction to compat notice for a[begin] (#55209)
stevengj Jul 22, 2024
91976c2
document mutable struct const fields (#55203)
IanButterworth Jul 23, 2024
4e18948
Bump libblastrampoline to v5.10.1 (#54791)
staticfloat Jun 14, 2024
73353dc
SuiteSparse: Bump version (#54950)
rayegun Jun 27, 2024
54bd4b9
Fix accidental early evaluation of imported `using` binding (#54956)
Keno Jun 28, 2024
3387373
LinearAlgebra: LazyString in error messages for Diagonal/Bidiagonal (…
jishnub Jul 10, 2024
3f67b31
Raise an error when using `include_dependency` with non-existent file…
fatteneder Jun 21, 2024
11bba3b
RFC: Make `include_dependency(path; track_content=true)` the default …
fatteneder Jul 2, 2024
c42fc03
Make ScopedValues public (#54574)
LilithHafner Jul 3, 2024
19f838f
finish implementation of upgradable stdlibs (#54739)
vtjnash Jun 21, 2024
bddb4ed
#54739-related fixes for loading stdlibs (#54891)
vtjnash Jun 24, 2024
d4f9808
fix loading of repeated/concurrent modules (#55066)
vtjnash Jul 11, 2024
66ffcea
Reinstate similar for AbstractQ for backward compatibility (#52694)
jishnub May 22, 2024
6844898
bump Pkg to latest v1.11
KristofferC Jul 23, 2024
b39fd85
Make Core.TypeofUnion use the type method table (#55188)
vtjnash Jul 23, 2024
f51eeca
Artifacts: use a different way of getting the UUID of a module (#55218)
KristofferC Jul 23, 2024
c2dcb7e
remove JuliaSyntaxHighlighting from 1.11 (#55217)
KristofferC Jul 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "Revert "Cleanup MemoryRef tests (#54681)""
This reverts commit 09f450f.
  • Loading branch information
KristofferC committed Jun 25, 2024
commit 6cf82f9a86738eb22695eef938858eb97097be43
50 changes: 25 additions & 25 deletions base/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ isbitsunion(u::Type) = u isa Union && allocatedinline(u)
function _unsetindex!(A::Array, i::Int)
@inline
@boundscheck checkbounds(A, i)
@inbounds _unsetindex!(GenericMemoryRef(A.ref, i))
@inbounds _unsetindex!(memoryref(A.ref, i))
return A
end

Expand All @@ -239,14 +239,14 @@ function isassigned(a::Array, i::Int...)
@_noub_if_noinbounds_meta
@boundscheck checkbounds(Bool, a, i...) || return false
ii = _sub2ind(size(a), i...)
return @inbounds isassigned(memoryref(a.ref, ii, false))
return @inbounds isassigned(memoryrefnew(a.ref, ii, false))
end

function isassigned(a::Vector, i::Int) # slight compiler simplification for the most common case
@inline
@_noub_if_noinbounds_meta
@boundscheck checkbounds(Bool, a, i) || return false
return @inbounds isassigned(memoryref(a.ref, i, false))
return @inbounds isassigned(memoryrefnew(a.ref, i, false))
end


Expand Down Expand Up @@ -281,7 +281,7 @@ the same manner as C.
"""
function unsafe_copyto!(dest::Array, doffs, src::Array, soffs, n)
n == 0 && return dest
unsafe_copyto!(GenericMemoryRef(dest.ref, doffs), GenericMemoryRef(src.ref, soffs), n)
unsafe_copyto!(memoryref(dest.ref, doffs), memoryref(src.ref, soffs), n)
return dest
end

Expand All @@ -303,8 +303,8 @@ function _copyto_impl!(dest::Union{Array,Memory}, doffs::Integer, src::Union{Arr
n > 0 || _throw_argerror("Number of elements to copy must be non-negative.")
@boundscheck checkbounds(dest, doffs:doffs+n-1)
@boundscheck checkbounds(src, soffs:soffs+n-1)
@inbounds let dest = GenericMemoryRef(dest isa Array ? getfield(dest, :ref) : dest, doffs)
src = GenericMemoryRef(src isa Array ? getfield(src, :ref) : src, soffs)
@inbounds let dest = memoryref(dest isa Array ? getfield(dest, :ref) : dest, doffs),
src = memoryref(src isa Array ? getfield(src, :ref) : src, soffs)
unsafe_copyto!(dest, src, n)
end
return dest
Expand Down Expand Up @@ -348,7 +348,7 @@ copy
@_nothrow_meta
ref = a.ref
newmem = ccall(:jl_genericmemory_copy_slice, Ref{Memory{T}}, (Any, Ptr{Cvoid}, Int), ref.mem, ref.ptr_or_offset, length(a))
return $(Expr(:new, :(typeof(a)), :(Core.memoryref(newmem)), :(a.size)))
return $(Expr(:new, :(typeof(a)), :(memoryref(newmem)), :(a.size)))
end

## Constructors ##
Expand Down Expand Up @@ -973,21 +973,21 @@ function setindex! end
function setindex!(A::Array{T}, x, i::Int) where {T}
@_noub_if_noinbounds_meta
@boundscheck (i - 1)%UInt < length(A)%UInt || throw_boundserror(A, (i,))
memoryrefset!(memoryref(A.ref, i, false), x isa T ? x : convert(T,x)::T, :not_atomic, false)
memoryrefset!(memoryrefnew(A.ref, i, false), x isa T ? x : convert(T,x)::T, :not_atomic, false)
return A
end
function setindex!(A::Array{T}, x, i1::Int, i2::Int, I::Int...) where {T}
@inline
@_noub_if_noinbounds_meta
@boundscheck checkbounds(A, i1, i2, I...) # generally _to_linear_index requires bounds checking
memoryrefset!(memoryref(A.ref, _to_linear_index(A, i1, i2, I...), false), x isa T ? x : convert(T,x)::T, :not_atomic, false)
memoryrefset!(memoryrefnew(A.ref, _to_linear_index(A, i1, i2, I...), false), x isa T ? x : convert(T,x)::T, :not_atomic, false)
return A
end

__safe_setindex!(A::Vector{Any}, @nospecialize(x), i::Int) = (@inline; @_nothrow_noub_meta;
memoryrefset!(memoryref(A.ref, i, false), x, :not_atomic, false); return A)
memoryrefset!(memoryrefnew(A.ref, i, false), x, :not_atomic, false); return A)
__safe_setindex!(A::Vector{T}, x::T, i::Int) where {T} = (@inline; @_nothrow_noub_meta;
memoryrefset!(memoryref(A.ref, i, false), x, :not_atomic, false); return A)
memoryrefset!(memoryrefnew(A.ref, i, false), x, :not_atomic, false); return A)
__safe_setindex!(A::Vector{T}, x, i::Int) where {T} = (@inline;
__safe_setindex!(A, convert(T, x)::T, i))

Expand Down Expand Up @@ -1059,7 +1059,7 @@ function _growbeg!(a::Vector, delta::Integer)
setfield!(a, :size, (newlen,))
# if offset is far enough advanced to fit data in existing memory without copying
if delta <= offset - 1
setfield!(a, :ref, @inbounds GenericMemoryRef(ref, 1 - delta))
setfield!(a, :ref, @inbounds memoryref(ref, 1 - delta))
else
@noinline (function()
memlen = length(mem)
Expand All @@ -1078,7 +1078,7 @@ function _growbeg!(a::Vector, delta::Integer)
newmem = array_new_memory(mem, newmemlen)
end
unsafe_copyto!(newmem, newoffset + delta, mem, offset, len)
setfield!(a, :ref, @inbounds GenericMemoryRef(newmem, newoffset))
setfield!(a, :ref, @inbounds memoryref(newmem, newoffset))
end)()
end
return
Expand Down Expand Up @@ -1113,7 +1113,7 @@ function _growend!(a::Vector, delta::Integer)
newmem = array_new_memory(mem, newmemlen2)
newoffset = offset
end
newref = @inbounds GenericMemoryRef(newmem, newoffset)
newref = @inbounds memoryref(newmem, newoffset)
unsafe_copyto!(newref, ref, len)
setfield!(a, :ref, newref)
end)()
Expand Down Expand Up @@ -1142,7 +1142,7 @@ function _growat!(a::Vector, i::Integer, delta::Integer)
prefer_start = i <= div(len, 2)
# if offset is far enough advanced to fit data in beginning of the memory
if prefer_start && delta <= offset - 1
newref = @inbounds GenericMemoryRef(mem, offset - delta)
newref = @inbounds memoryref(mem, offset - delta)
unsafe_copyto!(newref, ref, i)
setfield!(a, :ref, newref)
for j in i:i+delta-1
Expand All @@ -1159,7 +1159,7 @@ function _growat!(a::Vector, i::Integer, delta::Integer)
newmemlen = max(overallocation(memlen), len+2*delta+1)
newoffset = (newmemlen - newlen) ÷ 2 + 1
newmem = array_new_memory(mem, newmemlen)
newref = @inbounds GenericMemoryRef(newmem, newoffset)
newref = @inbounds memoryref(newmem, newoffset)
unsafe_copyto!(newref, ref, i-1)
unsafe_copyto!(newmem, newoffset + delta + i - 1, mem, offset + i - 1, len - i + 1)
setfield!(a, :ref, newref)
Expand All @@ -1176,7 +1176,7 @@ function _deletebeg!(a::Vector, delta::Integer)
end
newlen = len - delta
if newlen != 0 # if newlen==0 we could accidentally index past the memory
newref = @inbounds GenericMemoryRef(a.ref, delta + 1)
newref = @inbounds memoryref(a.ref, delta + 1)
setfield!(a, :ref, newref)
end
setfield!(a, :size, (newlen,))
Expand Down Expand Up @@ -1491,16 +1491,16 @@ function sizehint!(a::Vector, sz::Integer; first::Bool=false, shrink::Bool=true)
end
newmem = array_new_memory(mem, sz)
if first
newref = GenericMemoryRef(newmem, inc + 1)
newref = memoryref(newmem, inc + 1)
else
newref = GenericMemoryRef(newmem)
newref = memoryref(newmem)
end
unsafe_copyto!(newref, ref, len)
setfield!(a, :ref, newref)
elseif first
_growbeg!(a, inc)
newref = getfield(a, :ref)
newref = GenericMemoryRef(newref, inc + 1)
newref = memoryref(newref, inc + 1)
setfield!(a, :size, (len,)) # undo the size change from _growbeg!
setfield!(a, :ref, newref) # undo the offset change from _growbeg!
else # last
Expand Down Expand Up @@ -3075,9 +3075,9 @@ function _wrap(ref::MemoryRef{T}, dims::NTuple{N, Int}) where {T, N}
mem_len = length(mem) + 1 - memoryrefoffset(ref)
len = Core.checked_dims(dims...)
@boundscheck mem_len >= len || invalid_wrap_err(mem_len, dims, len)
if N != 1 && !(ref === GenericMemoryRef(mem) && len === mem_len)
if N != 1 && !(ref === memoryref(mem) && len === mem_len)
mem = ccall(:jl_genericmemory_slice, Memory{T}, (Any, Ptr{Cvoid}, Int), mem, ref.ptr_or_offset, len)
ref = MemoryRef(mem)
ref = memoryref(mem)
end
return ref
end
Expand All @@ -3093,7 +3093,7 @@ end

@eval @propagate_inbounds function wrap(::Type{Array}, m::Memory{T}, dims::NTuple{N, Integer}) where {T, N}
dims = convert(Dims, dims)
ref = _wrap(MemoryRef(m), dims)
ref = _wrap(memoryref(m), dims)
$(Expr(:new, :(Array{T, N}), :ref, :dims))
end
@eval @propagate_inbounds function wrap(::Type{Array}, m::MemoryRef{T}, l::Integer) where {T}
Expand All @@ -3103,11 +3103,11 @@ end
end
@eval @propagate_inbounds function wrap(::Type{Array}, m::Memory{T}, l::Integer) where {T}
dims = (Int(l),)
ref = _wrap(MemoryRef(m), (l,))
ref = _wrap(memoryref(m), (l,))
$(Expr(:new, :(Array{T, 1}), :ref, :dims))
end
@eval @propagate_inbounds function wrap(::Type{Array}, m::Memory{T}) where {T}
ref = MemoryRef(m)
ref = memoryref(m)
dims = (length(m),)
$(Expr(:new, :(Array{T, 1}), :ref, :dims))
end
17 changes: 7 additions & 10 deletions base/boot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -518,15 +518,12 @@ const undef = UndefInitializer()
# empty vector constructor
(self::Type{GenericMemory{kind,T,addrspace}})() where {T,kind,addrspace} = self(undef, 0)

memoryref(mem::GenericMemory) = memoryrefnew(mem)
memoryref(mem::GenericMemory, i::Integer) = memoryrefnew(memoryrefnew(mem), Int(i), @_boundscheck)
memoryref(ref::GenericMemoryRef, i::Integer) = memoryrefnew(ref, Int(i), @_boundscheck)
GenericMemoryRef(mem::GenericMemory) = memoryref(mem)
GenericMemoryRef(ref::GenericMemoryRef, i::Integer) = memoryref(ref, Int(i), @_boundscheck)
GenericMemoryRef(mem::GenericMemory, i::Integer) = memoryref(memoryref(mem), Int(i), @_boundscheck)
GenericMemoryRef{kind,<:Any,AS}(mem::GenericMemory{kind,<:Any,AS}) where {kind,AS} = memoryref(mem)
GenericMemoryRef{kind,<:Any,AS}(ref::GenericMemoryRef{kind,<:Any,AS}, i::Integer) where {kind,AS} = memoryref(ref, Int(i), @_boundscheck)
GenericMemoryRef{kind,<:Any,AS}(mem::GenericMemory{kind,<:Any,AS}, i::Integer) where {kind,AS} = memoryref(memoryref(mem), Int(i), @_boundscheck)
GenericMemoryRef{kind,T,AS}(mem::GenericMemory{kind,T,AS}) where {kind,T,AS} = memoryref(mem)
GenericMemoryRef{kind,T,AS}(ref::GenericMemoryRef{kind,T,AS}, i::Integer) where {kind,T,AS} = memoryref(ref, Int(i), @_boundscheck)
GenericMemoryRef{kind,T,AS}(mem::GenericMemory{kind,T,AS}, i::Integer) where {kind,T,AS} = memoryref(memoryref(mem), Int(i), @_boundscheck)
GenericMemoryRef(mem::GenericMemory, i::Integer) = memoryref(mem, i)
GenericMemoryRef(mem::GenericMemoryRef, i::Integer) = memoryref(mem, i)

const Memory{T} = GenericMemory{:not_atomic, T, CPU}
const MemoryRef{T} = GenericMemoryRef{:not_atomic, T, CPU}
Expand Down Expand Up @@ -634,12 +631,12 @@ module IR
export CodeInfo, MethodInstance, CodeInstance, GotoNode, GotoIfNot, ReturnNode,
NewvarNode, SSAValue, SlotNumber, Argument,
PiNode, PhiNode, PhiCNode, UpsilonNode, LineInfoNode,
Const, PartialStruct, InterConditional, EnterNode
Const, PartialStruct, InterConditional, EnterNode, memoryref

using Core: CodeInfo, MethodInstance, CodeInstance, GotoNode, GotoIfNot, ReturnNode,
NewvarNode, SSAValue, SlotNumber, Argument,
PiNode, PhiNode, PhiCNode, UpsilonNode, LineInfoNode,
Const, PartialStruct, InterConditional, EnterNode
Const, PartialStruct, InterConditional, EnterNode, memoryref

end # module IR

Expand Down
2 changes: 1 addition & 1 deletion base/compiler/optimize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ function iscall_with_boundscheck(@nospecialize(stmt), sv::PostOptAnalysisState)
f === nothing && return false
if f === getfield
nargs = 4
elseif f === memoryref || f === memoryrefget || f === memoryref_isassigned
elseif f === memoryrefnew || f === memoryrefget || f === memoryref_isassigned
nargs = 4
elseif f === memoryrefset!
nargs = 5
Expand Down
14 changes: 7 additions & 7 deletions base/compiler/tfuncs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2074,7 +2074,7 @@ end
hasintersect(widenconst(idx), Int) || return Bottom
return ref
end
add_tfunc(memoryref, 1, 3, memoryref_tfunc, 1)
add_tfunc(memoryrefnew, 1, 3, memoryref_tfunc, 1)

@nospecs function memoryrefoffset_tfunc(𝕃::AbstractLattice, mem)
hasintersect(widenconst(mem), GenericMemoryRef) || return Bottom
Expand Down Expand Up @@ -2224,7 +2224,7 @@ end
# Query whether the given builtin is guaranteed not to throw given the argtypes
@nospecs function _builtin_nothrow(𝕃::AbstractLattice, f, argtypes::Vector{Any}, rt)
⊑ = partialorder(𝕃)
if f === memoryref
if f === memoryrefnew
return memoryref_builtin_common_nothrow(argtypes)
elseif f === memoryrefoffset
length(argtypes) == 1 || return false
Expand Down Expand Up @@ -2348,7 +2348,7 @@ const _EFFECT_FREE_BUILTINS = [
isa,
UnionAll,
getfield,
memoryref,
memoryrefnew,
memoryrefoffset,
memoryrefget,
memoryref_isassigned,
Expand Down Expand Up @@ -2383,7 +2383,7 @@ const _INACCESSIBLEMEM_BUILTINS = Any[
]

const _ARGMEM_BUILTINS = Any[
memoryref,
memoryrefnew,
memoryrefoffset,
memoryrefget,
memoryref_isassigned,
Expand Down Expand Up @@ -2565,7 +2565,7 @@ function builtin_effects(𝕃::AbstractLattice, @nospecialize(f::Builtin), argty
else
if contains_is(_CONSISTENT_BUILTINS, f)
consistent = ALWAYS_TRUE
elseif f === memoryref || f === memoryrefoffset
elseif f === memoryrefnew || f === memoryrefoffset
consistent = ALWAYS_TRUE
elseif f === memoryrefget || f === memoryrefset! || f === memoryref_isassigned
consistent = CONSISTENT_IF_INACCESSIBLEMEMONLY
Expand All @@ -2589,7 +2589,7 @@ function builtin_effects(𝕃::AbstractLattice, @nospecialize(f::Builtin), argty
else
inaccessiblememonly = ALWAYS_FALSE
end
if f === memoryref || f === memoryrefget || f === memoryrefset! || f === memoryref_isassigned
if f === memoryrefnew || f === memoryrefget || f === memoryrefset! || f === memoryref_isassigned
noub = memoryop_noub(f, argtypes) ? ALWAYS_TRUE : ALWAYS_FALSE
else
noub = ALWAYS_TRUE
Expand All @@ -2604,7 +2604,7 @@ function memoryop_noub(@nospecialize(f), argtypes::Vector{Any})
nargs == 0 && return true # must throw and noub
lastargtype = argtypes[end]
isva = isvarargtype(lastargtype)
if f === memoryref
if f === memoryrefnew
if nargs == 1 && !isva
return true
elseif nargs == 2 && !isva
Expand Down
12 changes: 6 additions & 6 deletions base/deepcopy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,16 @@ function _deepcopy_memory_t(@nospecialize(x::Memory), T, stackdict::IdDict)
end
dest = typeof(x)(undef, length(x))
stackdict[x] = dest
xr = Core.memoryref(x)
dr = Core.memoryref(dest)
xr = memoryref(x)
dr = memoryref(dest)
for i = 1:length(x)
xi = Core.memoryref(xr, i, false)
xi = Core.memoryrefnew(xr, i, false)
if Core.memoryref_isassigned(xi, :not_atomic, false)
xi = Core.memoryrefget(xi, :not_atomic, false)
if !isbits(xi)
xi = deepcopy_internal(xi, stackdict)::typeof(xi)
end
di = Core.memoryref(dr, i, false)
di = Core.memoryrefnew(dr, i, false)
Core.memoryrefset!(di, xi, :not_atomic, false)
end
end
Expand All @@ -131,9 +131,9 @@ function deepcopy_internal(x::GenericMemoryRef, stackdict::IdDict)
return stackdict[x]::typeof(x)
end
mem = getfield(x, :mem)
dest = GenericMemoryRef(deepcopy_internal(mem, stackdict)::typeof(mem))
dest = memoryref(deepcopy_internal(mem, stackdict)::typeof(mem))
i = memoryrefoffset(x)
i == 1 || (dest = Core.memoryref(dest, i, true))
i == 1 || (dest = Core.memoryrefnew(dest, i, true))
return dest
end

Expand Down
16 changes: 8 additions & 8 deletions base/docs/basedocs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2669,23 +2669,23 @@ julia> Memory{Float64}(undef, 3)
Memory{T}(::UndefInitializer, n)

"""
MemoryRef(memory)
`memoryref(::GenericMemory)`

Construct a MemoryRef from a memory object. This does not fail, but the
resulting memory may point out-of-bounds if the memory is empty.
Construct a `GenericMemoryRef` from a memory object. This does not fail, but the
resulting memory will point out-of-bounds if and only if the memory is empty.
"""
MemoryRef(::Memory)
memoryref(::Memory)

"""
MemoryRef(::Memory, index::Integer)
MemoryRef(::MemoryRef, index::Integer)
memoryref(::GenericMemory, index::Integer)
memoryref(::GenericMemoryRef, index::Integer)

Construct a MemoryRef from a memory object and an offset index (1-based) which
Construct a `GenericMemoryRef` from a memory object and an offset index (1-based) which
can also be negative. This always returns an inbounds object, and will throw an
error if that is not possible (because the index would result in a shift
out-of-bounds of the underlying memory).
"""
MemoryRef(::Union{Memory,MemoryRef}, ::Integer)
memoryref(::Union{GenericMemory,GenericMemoryRef}, ::Integer)

"""
Vector{T}(undef, n)
Expand Down
10 changes: 5 additions & 5 deletions base/docs/intrinsicsdocs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ The `Core.Intrinsics` module holds the `Core.IntrinsicFunction` objects.
Core.Intrinsics

"""
Core.memoryref(::GenericMemory)
Core.memoryref(::GenericMemoryRef, index::Int, [boundscheck::Bool])
Core.memoryrefnew(::GenericMemory)
Core.memoryrefnew(::GenericMemoryRef, index::Int, [boundscheck::Bool])

Return a `GenericMemoryRef` for a `GenericMemory`. See [`MemoryRef`](@ref).
Return a `GenericMemoryRef` for a `GenericMemory`. See [`memoryref`](@ref).

!!! compat "Julia 1.11"
This function requires Julia 1.11 or later.
"""
Core.memoryref
Core.memoryrefnew

"""
Core..memoryrefoffset(::GenericMemoryRef)

Return the offset index that was used to construct the `MemoryRef`. See [`Core.memoryref`](@ref).
Return the offset index that was used to construct the `MemoryRef`. See [`memoryref`](@ref).

!!! compat "Julia 1.11"
This function requires Julia 1.11 or later.
Expand Down
Loading