mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-21 22:05:20 +00:00
constant_truncate -> constant_trunc to be consistent with other intrinsics
This commit is contained in:
@@ -244,10 +244,10 @@ constant_utf16_cstring :: proc($literal: string) -> [^]u16 ---
|
||||
|
||||
constant_log2 :: proc($v: $T) -> T where type_is_integer(T) ---
|
||||
|
||||
constant_floor :: proc($v: $T) -> T where type_is_integer(T) || type_is_float(T) ---
|
||||
constant_truncate :: proc($v: $T) -> T where type_is_integer(T) || type_is_float(T) ---
|
||||
constant_ceil :: proc($v: $T) -> T where type_is_integer(T) || type_is_float(T) ---
|
||||
constant_round :: proc($v: $T) -> T where type_is_integer(T) || type_is_float(T) ---
|
||||
constant_floor :: proc($v: $T) -> T where type_is_integer(T) || type_is_float(T) ---
|
||||
constant_trunc :: proc($v: $T) -> T where type_is_integer(T) || type_is_float(T) ---
|
||||
constant_ceil :: proc($v: $T) -> T where type_is_integer(T) || type_is_float(T) ---
|
||||
constant_round :: proc($v: $T) -> T where type_is_integer(T) || type_is_float(T) ---
|
||||
|
||||
// SIMD related
|
||||
simd_add :: proc(a, b: #simd[N]T) -> #simd[N]T ---
|
||||
|
||||
@@ -4769,7 +4769,7 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As
|
||||
}
|
||||
|
||||
case BuiltinProc_constant_floor:
|
||||
case BuiltinProc_constant_truncate:
|
||||
case BuiltinProc_constant_trunc:
|
||||
case BuiltinProc_constant_ceil:
|
||||
case BuiltinProc_constant_round:
|
||||
{
|
||||
@@ -4789,10 +4789,10 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As
|
||||
} else if (value.kind == ExactValue_Float) {
|
||||
f64 f = value.value_float;
|
||||
switch (id) {
|
||||
case BuiltinProc_constant_floor: f = floor(f); break;
|
||||
case BuiltinProc_constant_truncate: f = trunc(f); break;
|
||||
case BuiltinProc_constant_ceil: f = ceil(f); break;
|
||||
case BuiltinProc_constant_round: f = round(f); break;
|
||||
case BuiltinProc_constant_floor: f = floor(f); break;
|
||||
case BuiltinProc_constant_trunc: f = trunc(f); break;
|
||||
case BuiltinProc_constant_ceil: f = ceil(f); break;
|
||||
case BuiltinProc_constant_round: f = round(f); break;
|
||||
default:
|
||||
GB_PANIC("Unhandled built-in: %.*s", LIT(builtin_name));
|
||||
break;
|
||||
|
||||
@@ -50,7 +50,7 @@ enum BuiltinProcId {
|
||||
BuiltinProc_constant_log2,
|
||||
|
||||
BuiltinProc_constant_floor,
|
||||
BuiltinProc_constant_truncate,
|
||||
BuiltinProc_constant_trunc,
|
||||
BuiltinProc_constant_ceil,
|
||||
BuiltinProc_constant_round,
|
||||
|
||||
@@ -427,7 +427,7 @@ gb_global BuiltinProc builtin_procs[BuiltinProc_COUNT] = {
|
||||
|
||||
{STR_LIT("constant_log2"), 1, false, Expr_Expr, BuiltinProcPkg_intrinsics},
|
||||
{STR_LIT("constant_floor"), 1, false, Expr_Expr, BuiltinProcPkg_intrinsics},
|
||||
{STR_LIT("constant_truncate"), 1, false, Expr_Expr, BuiltinProcPkg_intrinsics},
|
||||
{STR_LIT("constant_trunc"), 1, false, Expr_Expr, BuiltinProcPkg_intrinsics},
|
||||
{STR_LIT("constant_ceil"), 1, false, Expr_Expr, BuiltinProcPkg_intrinsics},
|
||||
{STR_LIT("constant_round"), 1, false, Expr_Expr, BuiltinProcPkg_intrinsics},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user