mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-19 16:42:33 +00:00
Remove the now defunct __write_bits and __read_bits
This commit is contained in:
@@ -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..<size_bits {
|
||||
// j := offset_bits+i
|
||||
// the_bit := byte((src[i>>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..<size_bits {
|
||||
// i := offset_bits+j
|
||||
// the_bit := byte((src[i>>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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user