Core.Builtins

Builtin Function APIs

以下内置函数API被认为是不稳定的,但提供了定义Julia程序能力和行为的基本定义。它们通常通过更高级别的通用API访问。

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

返回一个 GenericMemoryRef 用于 GenericMemory。请参见 memoryref。

Julia 1.11

此函数需要 Julia 1.11 或更高版本。

source
Core.memoryrefoffset — Function
Core..memoryrefoffset(::GenericMemoryRef)

返回用于构造 MemoryRef 的偏移索引。请参见 memoryref。

Julia 1.11

此函数需要 Julia 1.11 或更高版本。

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

返回存储在 MemoryRef 中的值,如果 Memory 为空则抛出 BoundsError。参见 ref[]。指定的内存顺序必须与 isatomic 参数兼容。

Julia 1.11

此函数需要 Julia 1.11 或更高版本。

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

将值存储到 MemoryRef,如果 Memory 为空则抛出 BoundsError。参见 ref[] = value。指定的内存顺序必须与 isatomic 参数兼容。

Julia 1.11

此函数需要 Julia 1.11 或更高版本。

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

返回 MemoryRef 中是否存储了值,如果 Memory 为空则返回 false。请参见 isassigned(::Base.RefValue),Core.memoryrefget。指定的内存顺序必须与 isatomic 参数兼容。

Julia 1.11

此函数需要 Julia 1.11 或更高版本。

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

原子性地执行操作,同时获取和设置 MemoryRef 值。

Julia 1.11

此函数需要 Julia 1.11 或更高版本。

另请参见 swapproperty! 和 Core.memoryrefset!.

source
Core.memoryrefmodify! — Function
Core.memoryrefmodify!(::GenericMemoryRef, op, value, ordering::Symbol, boundscheck::Bool) -> Pair

原子地执行操作以获取和设置 MemoryRef 值,应用函数 op 后。

Julia 1.11

此函数需要 Julia 1.11 或更高版本。

另请参见 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)

原子地执行获取和有条件设置 MemoryRef 值的操作。

Julia 1.11

此函数需要 Julia 1.11 或更高版本。

另请参见 replaceproperty! 和 Core.memoryrefset!。

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

原子性地执行操作,将 MemoryRef 设置为给定值,仅在之前未设置的情况下。

Julia 1.11

此函数需要 Julia 1.11 或更高版本。

另请参见 setpropertyonce! 和 Core.memoryrefset!。

source
Core.get_binding_type — Function
Core.get_binding_type(module::Module, name::Symbol)

从模块 module 中检索绑定 name 的声明类型。

Julia 1.9

此函数需要 Julia 1.9 或更高版本。

source
Core.set_binding_type! — Function
Core.set_binding_type!(module::Module, name::Symbol, [type::Type])

将模块 module 中绑定 name 的声明类型设置为 type。如果该绑定已经具有与 type 不相等的类型,则会报错。如果 type 参数缺失,则在未设置的情况下将绑定类型设置为 Any,但不会报错。

Julia 1.9

此函数需要 Julia 1.9 或更高版本。

source
Core.IntrinsicFunction — Type
Core.IntrinsicFunction <: Core.Builtin <: Function

Core.IntrinsicFunction 函数定义了一些基本原语,这些原语定义了 Julia 程序的能力和行为。

source
Core.Intrinsics — Module
Core.Intrinsics

Core.Intrinsics 模块包含 Core.IntrinsicFunction 对象。

source
Core.IR — Module
Core.IR

Core.IR 模块导出了 IR 对象模型。

source