mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-23 06:05:00 -07:00
Merge remote-tracking branch 'offical/master'
This commit is contained in:
@@ -3502,9 +3502,12 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As
|
||||
case ExactValue_Integer:
|
||||
mp_abs(&operand->value.value_integer, &operand->value.value_integer);
|
||||
break;
|
||||
case ExactValue_Float:
|
||||
operand->value.value_float = gb_abs(operand->value.value_float);
|
||||
case ExactValue_Float: {
|
||||
u64 abs = bit_cast<u64>(operand->value.value_float);
|
||||
abs &= 0x7FFFFFFFFFFFFFFF;
|
||||
operand->value.value_float = bit_cast<f64>(abs);
|
||||
break;
|
||||
}
|
||||
case ExactValue_Complex: {
|
||||
f64 r = operand->value.value_complex->real;
|
||||
f64 i = operand->value.value_complex->imag;
|
||||
@@ -5558,6 +5561,9 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As
|
||||
// NOTE(bill): Is this even correct?
|
||||
new_type->Union.node = operand->expr;
|
||||
new_type->Union.scope = bt->Union.scope;
|
||||
if (bt->Union.kind == UnionType_no_nil) {
|
||||
new_type->Union.kind = UnionType_no_nil;
|
||||
}
|
||||
|
||||
operand->type = new_type;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user