From ee5d5d68826a24011a0596f1586ffd73092db183 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Mon, 15 Jun 2026 16:57:27 +0100 Subject: [PATCH] Remove the now defunct `__write_bits` and `__read_bits` --- base/runtime/internal.odin | 21 +-------------------- src/check_expr.cpp | 5 ----- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/base/runtime/internal.odin b/base/runtime/internal.odin index 091feece7..3847ce046 100644 --- a/base/runtime/internal.odin +++ b/base/runtime/internal.odin @@ -1374,7 +1374,7 @@ fixdfti :: proc "c" (a: u64) -> i128 { } -__copy_bits :: #force_inline proc "contextless" ( +__copy_bits :: proc "contextless" ( dst: [^]byte, src: [^]byte, buf_bytes: uintptr, @@ -1421,25 +1421,6 @@ __copy_bits :: #force_inline proc "contextless" ( } } -__write_bits :: proc "contextless" (dst, src: [^]byte, dst_size_bytes: uintptr, offset_bits: uintptr, size_bits: uintptr) { - __copy_bits(dst, src, dst_size_bytes, offset_bits, 0, size_bits) - // for i in 0..>3]) & (1<<(i&7)) != 0) - // dst[j>>3] &~= 1<<(j&7) - // dst[j>>3] |= the_bit<<(j&7) - // } -} - -__read_bits :: proc "contextless" (dst, src: [^]byte, src_size_bytes: uintptr, offset_bits: uintptr, size_bits: uintptr) { - __copy_bits(dst, src, src_size_bytes, 0, offset_bits, size_bits) - // for j in 0..>3]) & (1<<(i&7)) != 0) - // dst[j>>3] &~= 1<<(j&7) - // dst[j>>3] |= the_bit<<(j&7) - // } -} when .Address in ODIN_SANITIZER_FLAGS { foreign { diff --git a/src/check_expr.cpp b/src/check_expr.cpp index a28c6016b..a9c9f1fb0 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -6124,11 +6124,6 @@ gb_internal Entity *check_selector(CheckerContext *c, Operand *operand, Ast *nod operand->type = entity->type; operand->expr = node; - if (entity->flags & EntityFlag_BitFieldField) { - add_package_dependency(c, "runtime", "__write_bits"); - add_package_dependency(c, "runtime", "__read_bits"); - } - switch (entity->kind) { case Entity_Constant: operand->value = entity->Constant.value;