Update builtins data: "Say hello to @qualCast
". (#962)
This commit is contained in:
parent
9e986de4d9
commit
4ba5631f7b
@ -1249,6 +1249,13 @@ pub const builtins = [_]Builtin{
|
|||||||
\\Converts a pointer of one type to a pointer of another type.
|
\\Converts a pointer of one type to a pointer of another type.
|
||||||
\\
|
\\
|
||||||
\\[Optional Pointers](https://ziglang.org/documentation/master/#Optional-Pointers) are allowed. Casting an optional pointer which is [null](https://ziglang.org/documentation/master/#null) to a non-optional pointer invokes safety-checked [Undefined Behavior](https://ziglang.org/documentation/master/#Undefined-Behavior).
|
\\[Optional Pointers](https://ziglang.org/documentation/master/#Optional-Pointers) are allowed. Casting an optional pointer which is [null](https://ziglang.org/documentation/master/#null) to a non-optional pointer invokes safety-checked [Undefined Behavior](https://ziglang.org/documentation/master/#Undefined-Behavior).
|
||||||
|
\\
|
||||||
|
\\`@ptrCast` cannot be used for:
|
||||||
|
\\
|
||||||
|
\\ - Removing `const` or `volatile` qualifier, use [@qualCast](https://ziglang.org/documentation/master/#qualCast).
|
||||||
|
\\ - Changing pointer address space, use [@addrSpaceCast](https://ziglang.org/documentation/master/#addrSpaceCast).
|
||||||
|
\\ - Increasing pointer alignment, use [@alignCast](https://ziglang.org/documentation/master/#alignCast).
|
||||||
|
\\ - Casting a non-slice pointer to a slice, use slicing syntax `ptr[start..end]`.
|
||||||
,
|
,
|
||||||
.arguments = &.{
|
.arguments = &.{
|
||||||
"comptime DestType: type",
|
"comptime DestType: type",
|
||||||
@ -1268,6 +1275,18 @@ pub const builtins = [_]Builtin{
|
|||||||
"value: anytype",
|
"value: anytype",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
.{
|
||||||
|
.name = "@qualCast",
|
||||||
|
.signature = "@qualCast(comptime DestType: type, value: anytype) DestType",
|
||||||
|
.snippet = "@qualCast(${1:comptime DestType: type}, ${2:value: anytype})",
|
||||||
|
.documentation =
|
||||||
|
\\Remove `const` or `volatile` qualifier from a pointer.
|
||||||
|
,
|
||||||
|
.arguments = &.{
|
||||||
|
"comptime DestType: type",
|
||||||
|
"value: anytype",
|
||||||
|
},
|
||||||
|
},
|
||||||
.{
|
.{
|
||||||
.name = "@rem",
|
.name = "@rem",
|
||||||
.signature = "@rem(numerator: T, denominator: T) T",
|
.signature = "@rem(numerator: T, denominator: T) T",
|
||||||
@ -1613,8 +1632,7 @@ pub const builtins = [_]Builtin{
|
|||||||
.documentation =
|
.documentation =
|
||||||
\\Performs the square root of a floating point number. Uses a dedicated hardware instruction when available.
|
\\Performs the square root of a floating point number. Uses a dedicated hardware instruction when available.
|
||||||
\\
|
\\
|
||||||
\\Supports [Floats](https://ziglang.org/documentation/master/#Floats) and [Vectors](https://ziglang.org/documentation/master/#Vectors) of floats, with the caveat that
|
\\Supports [Floats](https://ziglang.org/documentation/master/#Floats) and [Vectors](https://ziglang.org/documentation/master/#Vectors) of floats.
|
||||||
\\[some float operations are not yet implemented for all float types](https://github.com/ziglang/zig/issues/4026).
|
|
||||||
,
|
,
|
||||||
.arguments = &.{
|
.arguments = &.{
|
||||||
"value: anytype",
|
"value: anytype",
|
||||||
@ -1627,8 +1645,7 @@ pub const builtins = [_]Builtin{
|
|||||||
.documentation =
|
.documentation =
|
||||||
\\Sine trigonometric function on a floating point number. Uses a dedicated hardware instruction when available.
|
\\Sine trigonometric function on a floating point number. Uses a dedicated hardware instruction when available.
|
||||||
\\
|
\\
|
||||||
\\Supports [Floats](https://ziglang.org/documentation/master/#Floats) and [Vectors](https://ziglang.org/documentation/master/#Vectors) of floats, with the caveat that
|
\\Supports [Floats](https://ziglang.org/documentation/master/#Floats) and [Vectors](https://ziglang.org/documentation/master/#Vectors) of floats.
|
||||||
\\[some float operations are not yet implemented for all float types](https://github.com/ziglang/zig/issues/4026).
|
|
||||||
,
|
,
|
||||||
.arguments = &.{
|
.arguments = &.{
|
||||||
"value: anytype",
|
"value: anytype",
|
||||||
@ -1641,8 +1658,7 @@ pub const builtins = [_]Builtin{
|
|||||||
.documentation =
|
.documentation =
|
||||||
\\Cosine trigonometric function on a floating point number. Uses a dedicated hardware instruction when available.
|
\\Cosine trigonometric function on a floating point number. Uses a dedicated hardware instruction when available.
|
||||||
\\
|
\\
|
||||||
\\Supports [Floats](https://ziglang.org/documentation/master/#Floats) and [Vectors](https://ziglang.org/documentation/master/#Vectors) of floats, with the caveat that
|
\\Supports [Floats](https://ziglang.org/documentation/master/#Floats) and [Vectors](https://ziglang.org/documentation/master/#Vectors) of floats.
|
||||||
\\[some float operations are not yet implemented for all float types](https://github.com/ziglang/zig/issues/4026).
|
|
||||||
,
|
,
|
||||||
.arguments = &.{
|
.arguments = &.{
|
||||||
"value: anytype",
|
"value: anytype",
|
||||||
@ -1655,8 +1671,7 @@ pub const builtins = [_]Builtin{
|
|||||||
.documentation =
|
.documentation =
|
||||||
\\Tangent trigonometric function on a floating point number. Uses a dedicated hardware instruction when available.
|
\\Tangent trigonometric function on a floating point number. Uses a dedicated hardware instruction when available.
|
||||||
\\
|
\\
|
||||||
\\Supports [Floats](https://ziglang.org/documentation/master/#Floats) and [Vectors](https://ziglang.org/documentation/master/#Vectors) of floats, with the caveat that
|
\\Supports [Floats](https://ziglang.org/documentation/master/#Floats) and [Vectors](https://ziglang.org/documentation/master/#Vectors) of floats.
|
||||||
\\[some float operations are not yet implemented for all float types](https://github.com/ziglang/zig/issues/4026).
|
|
||||||
,
|
,
|
||||||
.arguments = &.{
|
.arguments = &.{
|
||||||
"value: anytype",
|
"value: anytype",
|
||||||
@ -1669,8 +1684,7 @@ pub const builtins = [_]Builtin{
|
|||||||
.documentation =
|
.documentation =
|
||||||
\\Base-e exponential function on a floating point number. Uses a dedicated hardware instruction when available.
|
\\Base-e exponential function on a floating point number. Uses a dedicated hardware instruction when available.
|
||||||
\\
|
\\
|
||||||
\\Supports [Floats](https://ziglang.org/documentation/master/#Floats) and [Vectors](https://ziglang.org/documentation/master/#Vectors) of floats, with the caveat that
|
\\Supports [Floats](https://ziglang.org/documentation/master/#Floats) and [Vectors](https://ziglang.org/documentation/master/#Vectors) of floats.
|
||||||
\\[some float operations are not yet implemented for all float types](https://github.com/ziglang/zig/issues/4026).
|
|
||||||
,
|
,
|
||||||
.arguments = &.{
|
.arguments = &.{
|
||||||
"value: anytype",
|
"value: anytype",
|
||||||
@ -1683,8 +1697,7 @@ pub const builtins = [_]Builtin{
|
|||||||
.documentation =
|
.documentation =
|
||||||
\\Base-2 exponential function on a floating point number. Uses a dedicated hardware instruction when available.
|
\\Base-2 exponential function on a floating point number. Uses a dedicated hardware instruction when available.
|
||||||
\\
|
\\
|
||||||
\\Supports [Floats](https://ziglang.org/documentation/master/#Floats) and [Vectors](https://ziglang.org/documentation/master/#Vectors) of floats, with the caveat that
|
\\Supports [Floats](https://ziglang.org/documentation/master/#Floats) and [Vectors](https://ziglang.org/documentation/master/#Vectors) of floats.
|
||||||
\\[some float operations are not yet implemented for all float types](https://github.com/ziglang/zig/issues/4026).
|
|
||||||
,
|
,
|
||||||
.arguments = &.{
|
.arguments = &.{
|
||||||
"value: anytype",
|
"value: anytype",
|
||||||
@ -1697,8 +1710,7 @@ pub const builtins = [_]Builtin{
|
|||||||
.documentation =
|
.documentation =
|
||||||
\\Returns the natural logarithm of a floating point number. Uses a dedicated hardware instruction when available.
|
\\Returns the natural logarithm of a floating point number. Uses a dedicated hardware instruction when available.
|
||||||
\\
|
\\
|
||||||
\\Supports [Floats](https://ziglang.org/documentation/master/#Floats) and [Vectors](https://ziglang.org/documentation/master/#Vectors) of floats, with the caveat that
|
\\Supports [Floats](https://ziglang.org/documentation/master/#Floats) and [Vectors](https://ziglang.org/documentation/master/#Vectors) of floats.
|
||||||
\\[some float operations are not yet implemented for all float types](https://github.com/ziglang/zig/issues/4026).
|
|
||||||
,
|
,
|
||||||
.arguments = &.{
|
.arguments = &.{
|
||||||
"value: anytype",
|
"value: anytype",
|
||||||
@ -1711,8 +1723,7 @@ pub const builtins = [_]Builtin{
|
|||||||
.documentation =
|
.documentation =
|
||||||
\\Returns the logarithm to the base 2 of a floating point number. Uses a dedicated hardware instruction when available.
|
\\Returns the logarithm to the base 2 of a floating point number. Uses a dedicated hardware instruction when available.
|
||||||
\\
|
\\
|
||||||
\\Supports [Floats](https://ziglang.org/documentation/master/#Floats) and [Vectors](https://ziglang.org/documentation/master/#Vectors) of floats, with the caveat that
|
\\Supports [Floats](https://ziglang.org/documentation/master/#Floats) and [Vectors](https://ziglang.org/documentation/master/#Vectors) of floats.
|
||||||
\\[some float operations are not yet implemented for all float types](https://github.com/ziglang/zig/issues/4026).
|
|
||||||
,
|
,
|
||||||
.arguments = &.{
|
.arguments = &.{
|
||||||
"value: anytype",
|
"value: anytype",
|
||||||
@ -1725,8 +1736,7 @@ pub const builtins = [_]Builtin{
|
|||||||
.documentation =
|
.documentation =
|
||||||
\\Returns the logarithm to the base 10 of a floating point number. Uses a dedicated hardware instruction when available.
|
\\Returns the logarithm to the base 10 of a floating point number. Uses a dedicated hardware instruction when available.
|
||||||
\\
|
\\
|
||||||
\\Supports [Floats](https://ziglang.org/documentation/master/#Floats) and [Vectors](https://ziglang.org/documentation/master/#Vectors) of floats, with the caveat that
|
\\Supports [Floats](https://ziglang.org/documentation/master/#Floats) and [Vectors](https://ziglang.org/documentation/master/#Vectors) of floats.
|
||||||
\\[some float operations are not yet implemented for all float types](https://github.com/ziglang/zig/issues/4026).
|
|
||||||
,
|
,
|
||||||
.arguments = &.{
|
.arguments = &.{
|
||||||
"value: anytype",
|
"value: anytype",
|
||||||
@ -1739,8 +1749,7 @@ pub const builtins = [_]Builtin{
|
|||||||
.documentation =
|
.documentation =
|
||||||
\\Returns the absolute value of a floating point number. Uses a dedicated hardware instruction when available.
|
\\Returns the absolute value of a floating point number. Uses a dedicated hardware instruction when available.
|
||||||
\\
|
\\
|
||||||
\\Supports [Floats](https://ziglang.org/documentation/master/#Floats) and [Vectors](https://ziglang.org/documentation/master/#Vectors) of floats, with the caveat that
|
\\Supports [Floats](https://ziglang.org/documentation/master/#Floats) and [Vectors](https://ziglang.org/documentation/master/#Vectors) of floats.
|
||||||
\\[some float operations are not yet implemented for all float types](https://github.com/ziglang/zig/issues/4026).
|
|
||||||
,
|
,
|
||||||
.arguments = &.{
|
.arguments = &.{
|
||||||
"value: anytype",
|
"value: anytype",
|
||||||
@ -1753,8 +1762,7 @@ pub const builtins = [_]Builtin{
|
|||||||
.documentation =
|
.documentation =
|
||||||
\\Returns the largest integral value not greater than the given floating point number. Uses a dedicated hardware instruction when available.
|
\\Returns the largest integral value not greater than the given floating point number. Uses a dedicated hardware instruction when available.
|
||||||
\\
|
\\
|
||||||
\\Supports [Floats](https://ziglang.org/documentation/master/#Floats) and [Vectors](https://ziglang.org/documentation/master/#Vectors) of floats, with the caveat that
|
\\Supports [Floats](https://ziglang.org/documentation/master/#Floats) and [Vectors](https://ziglang.org/documentation/master/#Vectors) of floats.
|
||||||
\\[some float operations are not yet implemented for all float types](https://github.com/ziglang/zig/issues/4026).
|
|
||||||
,
|
,
|
||||||
.arguments = &.{
|
.arguments = &.{
|
||||||
"value: anytype",
|
"value: anytype",
|
||||||
@ -1767,8 +1775,7 @@ pub const builtins = [_]Builtin{
|
|||||||
.documentation =
|
.documentation =
|
||||||
\\Returns the smallest integral value not less than the given floating point number. Uses a dedicated hardware instruction when available.
|
\\Returns the smallest integral value not less than the given floating point number. Uses a dedicated hardware instruction when available.
|
||||||
\\
|
\\
|
||||||
\\Supports [Floats](https://ziglang.org/documentation/master/#Floats) and [Vectors](https://ziglang.org/documentation/master/#Vectors) of floats, with the caveat that
|
\\Supports [Floats](https://ziglang.org/documentation/master/#Floats) and [Vectors](https://ziglang.org/documentation/master/#Vectors) of floats.
|
||||||
\\[some float operations are not yet implemented for all float types](https://github.com/ziglang/zig/issues/4026).
|
|
||||||
,
|
,
|
||||||
.arguments = &.{
|
.arguments = &.{
|
||||||
"value: anytype",
|
"value: anytype",
|
||||||
@ -1781,8 +1788,7 @@ pub const builtins = [_]Builtin{
|
|||||||
.documentation =
|
.documentation =
|
||||||
\\Rounds the given floating point number to an integer, towards zero. Uses a dedicated hardware instruction when available.
|
\\Rounds the given floating point number to an integer, towards zero. Uses a dedicated hardware instruction when available.
|
||||||
\\
|
\\
|
||||||
\\Supports [Floats](https://ziglang.org/documentation/master/#Floats) and [Vectors](https://ziglang.org/documentation/master/#Vectors) of floats, with the caveat that
|
\\Supports [Floats](https://ziglang.org/documentation/master/#Floats) and [Vectors](https://ziglang.org/documentation/master/#Vectors) of floats.
|
||||||
\\[some float operations are not yet implemented for all float types](https://github.com/ziglang/zig/issues/4026).
|
|
||||||
,
|
,
|
||||||
.arguments = &.{
|
.arguments = &.{
|
||||||
"value: anytype",
|
"value: anytype",
|
||||||
@ -1795,8 +1801,7 @@ pub const builtins = [_]Builtin{
|
|||||||
.documentation =
|
.documentation =
|
||||||
\\Rounds the given floating point number to an integer, away from zero. Uses a dedicated hardware instruction when available.
|
\\Rounds the given floating point number to an integer, away from zero. Uses a dedicated hardware instruction when available.
|
||||||
\\
|
\\
|
||||||
\\Supports [Floats](https://ziglang.org/documentation/master/#Floats) and [Vectors](https://ziglang.org/documentation/master/#Vectors) of floats, with the caveat that
|
\\Supports [Floats](https://ziglang.org/documentation/master/#Floats) and [Vectors](https://ziglang.org/documentation/master/#Vectors) of floats.
|
||||||
\\[some float operations are not yet implemented for all float types](https://github.com/ziglang/zig/issues/4026).
|
|
||||||
,
|
,
|
||||||
.arguments = &.{
|
.arguments = &.{
|
||||||
"value: anytype",
|
"value: anytype",
|
||||||
|
Loading…
Reference in New Issue
Block a user