Compare commits

..

1 Commits

Author SHA1 Message Date
259382da28 Compile the compiler
All checks were successful
CI / ci (Release, ubuntu-latest) (pull_request) Successful in 5m53s
CI / ci (MinSizeRel, ubuntu-latest) (pull_request) Successful in 5m58s
CI / ci (RelWithDebInfo, ubuntu-latest) (pull_request) Successful in 5m56s
CI / ci (Debug, ubuntu-latest) (pull_request) Successful in 19m16s
2025-06-20 10:47:06 -06:00
2 changed files with 5 additions and 7 deletions

View File

@ -1040,7 +1040,7 @@ target_get_native = fn () Target
target_compare = fn (a: Target, b: Target) u1 target_compare = fn (a: Target, b: Target) u1
{ {
>is_same_cpu = a.cpu == b.cpu; >is_same_cpu = a.cpu == b.cpu;
>is_same_os = a.cpu == b.cpu; >is_same_os = a.os == b.os;
return is_same_cpu and is_same_os; return is_same_cpu and is_same_os;
} }
@ -7158,8 +7158,7 @@ parse_block = fn (module: &Module, parent_scope: &Scope) &Block
enum_bit_count = fn (highest_value: u64) u64 enum_bit_count = fn (highest_value: u64) u64
{ {
>needed_bit_count: u64 = 64 - #leading_zeroes(highest_value); >needed_bit_count: u64 = #select(highest_value == 0, 1, 64 - #leading_zeroes(highest_value));
needed_bit_count = #select(needed_bit_count != 0, needed_bit_count, 1);
return needed_bit_count; return needed_bit_count;
} }
@ -14559,8 +14558,8 @@ emit_value = fn (module: &Module, value: &Value, type_kind: TypeKind, expect_con
>left = value.content.binary.left; >left = value.content.binary.left;
>right = value.content.binary.right; >right = value.content.binary.right;
>right_block = LLVMAppendBasicBlockInContext(module.llvm.context, llvm_function, "shorcircuit.right"); >right_block = LLVMAppendBasicBlockInContext(module.llvm.context, llvm_function, "shortcircuit.right");
>end_block = LLVMAppendBasicBlockInContext(module.llvm.context, llvm_function, "shorcircuit.end"); >end_block = LLVMAppendBasicBlockInContext(module.llvm.context, llvm_function, "shortcircuit.end");
>true_block: &LLVMBasicBlock = undefined; >true_block: &LLVMBasicBlock = undefined;
>false_block: &LLVMBasicBlock = undefined; >false_block: &LLVMBasicBlock = undefined;

View File

@ -2064,8 +2064,7 @@ fn Type* resolve_alias(Module* module, Type* type)
fn u64 enum_bit_count(u64 highest_value) fn u64 enum_bit_count(u64 highest_value)
{ {
auto needed_bit_count = 64 - (u64)clz(highest_value); auto needed_bit_count = highest_value == 0 ? 1 : 64 - clz(highest_value);
needed_bit_count = needed_bit_count ? needed_bit_count : 1;
return needed_bit_count; return needed_bit_count;
} }