Core.Builtins · The Julia Language
Description: Documentation for The Julia Language.

# Core.Builtins

The following builtin functions are considered unstable, but provide the basic definitions for what defines the abilities and behaviors of a Julia program. They are typically accessed through a higher level generic API.

## Raw access to memory

`Core.Intrinsics.pointerref` — Function

    Core.Intrinsics.pointerref(p::Ptr{T}, i::Int, align::Int)

Load a value of type `T` from the address of the `i`th element (1-indexed) starting at `p`. This is equivalent to the C expression `p[i-1]`.

The alignment must be a power of two, or 0, indicating the default alignment for `T`. If `p[i-1]` is out of bounds, invalid, or is not aligned, the behavior is undefined. An alignment of 1 is always safe.

See also `unsafe_load`.

source
`Core.Intrinsics.pointerset` — Function

    Core.Intrinsics.pointerset(p::Ptr{T}, x::T, i::Int, align::Int)

Store a value of type `T` to the address of the `i`th element (1-indexed) starting at `p`. This is equivalent to the C expression `p[i-1] = x`.

The alignment must be a power of two, or `0`, indicating the default alignment for `T`. If `p[i-1]` is out of bounds, invalid, or is not aligned, the behavior is undefined. An alignment of 1 is always safe.

See also `unsafe_store!`.

source
`Core.Intrinsics.atomic_pointerref` — Function

    Core.Intrinsics.atomic_pointerref(pointer::Ptr{T}, order::Symbol) --> T

Julia 1.7

This function requires Julia 1.7 or later.

See `unsafe_load`.

source
`Core.Intrinsics.atomic_pointerset` — Function

    Core.Intrinsics.atomic_pointerset(pointer::Ptr{T}, new::T, order::Symbol) --> pointer

Julia 1.7

This function requires Julia 1.7 or later.

See `unsafe_store!`.

source
`Core.Intrinsics.atomic_pointerswap` — Function

    Core.Intrinsics.atomic_pointerswap(pointer::Ptr{T}, new::T, order::Symbol) --> old

Julia 1.7

This function requires Julia 1.7 or later.

See `unsafe_swap!`.

source
`Core.Intrinsics.atomic_pointermodify` — Function

    Core.Intrinsics.atomic_pointermodify(pointer::Ptr{T}, function::(old::T,arg::S)->T, arg::S, order::Symbol) --> old

Julia 1.7

This function requires Julia 1.7 or later.

See `unsafe_modify!`.

source
`Core.Intrinsics.atomic_pointerreplace` — Function

    Core.Intrinsics.atomic_pointerreplace(pointer::Ptr{T}, expected::Any, new::T, success_order::Symbol, failure_order::Symbol) --> (old, cmp)

Julia 1.7

This function requires Julia 1.7 or later.

See `unsafe_replace!`.

source

## Managed memory

`Core.memorynew` — Function

    Core.memorynew(::Type{T} where T <: GenericMemory, n::Int)

Construct an uninitialized `GenericMemory` of length `n`.

See also `Memory`, `Memory{T}(undef, n)`.

source
`Core.memoryrefnew` — Function

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

Return a `GenericMemoryRef` for a `GenericMemory`. See `memoryref`.

Julia 1.11

This function requires Julia 1.11 or later.

source
`Core.memoryrefoffset` — Function

    Core.memoryrefoffset(::GenericMemoryRef)

Return the offset index that was used to construct the `MemoryRef`. See `memoryref`.

Julia 1.11

This function requires Julia 1.11 or later.

source
`Core.memoryrefget` — Function

    Core.memoryrefget(::GenericMemoryRef, ordering::Symbol, boundscheck::Bool)

Return the value stored at the `MemoryRef`, throwing a `BoundsError` if the `Memory` is empty. See `ref[]`. The memory ordering specified must be compatible with the `isatomic` parameter.

Julia 1.11

This function requires Julia 1.11 or later.

source
`Core.memoryrefset!` — Function

    Core.memoryrefset!(::GenericMemoryRef, value, ordering::Symbol, boundscheck::Bool)

Store the value to the `MemoryRef`, throwing a `BoundsError` if the `Memory` is empty. See `ref[] = value`. The memory ordering specified must be compatible with the `isatomic` parameter.

Julia 1.11

This function requires Julia 1.11 or later.

source
`Core.memoryref_isassigned` — Function

    Core.memoryref_isassigned(::GenericMemoryRef, ordering::Symbol, boundscheck::Bool)

Return whether there is a value stored at the `MemoryRef`, returning false if the `Memory` is empty. See `isassigned(::Base.RefValue)`, `Core.memoryrefget`. The memory ordering specified must be compatible with the `isatomic` parameter.

Julia 1.11

This function requires Julia 1.11 or later.

source
`Core.memoryrefswap!` — Function

    Core.memoryrefswap!(::GenericMemoryRef, value, ordering::Symbol, boundscheck::Bool)

Atomically perform the operations to simultaneously get and set a `MemoryRef` value.

Julia 1.11

This function requires Julia 1.11 or later.

See also `swapproperty!`, `Core.memoryrefset!`.

source
`Core.memoryrefmodify!` — Function

    Core.memoryrefmodify!(::GenericMemoryRef, op, value, ordering::Symbol, boundscheck::Bool)::Pair

Atomically perform the operations to get and set a `MemoryRef` value after applying the function `op`.

Julia 1.11

This function requires Julia 1.11 or later.

See also `modifyproperty!`, `Core.memoryrefset!`.

source
`Core.memoryrefreplace!` — Function

    Core.memoryrefreplace!(::GenericMemoryRef, expected, desired,
                           success_order::Symbol, fail_order::Symbol=success_order, boundscheck::Bool) -> (; old, success::Bool)

Atomically perform the operations to get and conditionally set a `MemoryRef` value.

Julia 1.11

This function requires Julia 1.11 or later.

See also `replaceproperty!`, `Core.memoryrefset!`.

source
`Core.memoryrefsetonce!` — Function

    Core.memoryrefsetonce!(::GenericMemoryRef, value,
                           success_order::Symbol, fail_order::Symbol=success_order, boundscheck::Bool) -> success::Bool

Atomically perform the operations to set a `MemoryRef` to a given value, only if it was previously not set.

Julia 1.11

This function requires Julia 1.11 or later.

See also `setpropertyonce!`, `Core.memoryrefset!`.

source

## Module bindings

`Core.get_binding_type` — Function

    Core.get_binding_type(module::Module, name::Symbol)

Retrieve the declared type of the binding `name` from the module `module`.

Julia 1.9

This function requires Julia 1.9 or later.

source

## Other

`Core.IntrinsicFunction` — Type

    Core.IntrinsicFunction <: Core.Builtin <: Function

The `Core.IntrinsicFunction` function define some basic primitives for what defines the abilities and behaviors of a Julia program

source
`Core.Intrinsics` — Module

    Core.Intrinsics

The `Core.Intrinsics` module holds the `Core.IntrinsicFunction` objects.

source
`Core.IR` — Module

    Core.IR

The `Core.IR` module exports the IR object model.

source
`Base.quoted` — Function

    quoted(x)

Return `x` made safe for inserting as a constant into IR. Note that this does not make it safe for inserting into an AST, since eval will sometimes copy some types of AST object inside, and even may sometimes evaluate and interpolate any `$` inside, depending on the context.

source
`Base.isa_ast_node` — Function

    isa_ast_node(x)

Return false if `x` is not interpreted specially by any of inference, lowering, or codegen as either an AST or IR special form.

source

Theme

This document was generated with Documenter.jl version 1.16.1 on Thursday 19 February 2026. Using Julia version 1.14.0-DEV.1759.