aboutsummaryrefslogtreecommitdiff
path: root/core/math/big/logical.odin
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2021-12-11 15:22:24 +0100
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2021-12-11 15:22:24 +0100
commit938744b2760193ff1dffc8ae03c740e91a4dfec5 (patch)
tree2da48aede88afdbc3a1089613acc8dcae33b85a3 /core/math/big/logical.odin
parent84b84d9f7de0d17e74ca0b482f784497b509c282 (diff)
[math/big] Rename `internal_int_shl_digit` to `_private_int_shl_leg`.
Same for the SHR variant. These are pure implementation details to shift by a leg/word at a time. Prevent accidental usage.
Diffstat (limited to 'core/math/big/logical.odin')
-rw-r--r--core/math/big/logical.odin33
1 files changed, 1 insertions, 32 deletions
diff --git a/core/math/big/logical.odin b/core/math/big/logical.odin
index dbcf566c8..e7e55cc47 100644
--- a/core/math/big/logical.odin
+++ b/core/math/big/logical.odin
@@ -87,21 +87,6 @@ int_shr :: proc(dest, source: ^Int, bits: int, allocator := context.allocator) -
shr :: proc { int_shr, }
/*
- Shift right by `digits` * _DIGIT_BITS bits.
-*/
-int_shr_digit :: proc(quotient: ^Int, digits: int, allocator := context.allocator) -> (err: Error) {
- /*
- Check that `quotient` is usable.
- */
- assert_if_nil(quotient)
- context.allocator = allocator
-
- internal_clear_if_uninitialized(quotient) or_return
- return #force_inline internal_int_shr_digit(quotient, digits)
-}
-shr_digit :: proc { int_shr_digit, }
-
-/*
Shift right by a certain bit count with sign extension.
*/
int_shr_signed :: proc(dest, src: ^Int, bits: int, allocator := context.allocator) -> (err: Error) {
@@ -124,20 +109,4 @@ int_shl :: proc(dest, src: ^Int, bits: int, allocator := context.allocator) -> (
internal_clear_if_uninitialized(dest, src) or_return
return #force_inline internal_int_shl(dest, src, bits)
}
-shl :: proc { int_shl, }
-
-
-/*
- Shift left by `digits` * _DIGIT_BITS bits.
-*/
-int_shl_digit :: proc(quotient: ^Int, digits: int, allocator := context.allocator) -> (err: Error) {
- /*
- Check that `quotient` is usable.
- */
- assert_if_nil(quotient)
- context.allocator = allocator
-
- internal_clear_if_uninitialized(quotient) or_return
- return #force_inline internal_int_shl_digit(quotient, digits)
-}
-shl_digit :: proc { int_shl_digit, }; \ No newline at end of file
+shl :: proc { int_shl, } \ No newline at end of file