mirror of
https://github.com/janet-lang/janet
synced 2025-10-26 13:17:40 +00:00
Renamed bigint -> inttypes / int
A lot of refactoring larger integer types. Fix a number of casting errors, but mostly rename things. Also try to limit use of template-like macros as they bloat the binary if not used in moderation. We were able to reduce the size of typed array code as well by using a single view types.
This commit is contained in:
@@ -23,8 +23,8 @@
|
||||
|
||||
# some tests for bigint
|
||||
|
||||
(def i64 bigint/int64)
|
||||
(def u64 bigint/uint64)
|
||||
(def i64 int/s64)
|
||||
(def u64 int/u64)
|
||||
|
||||
(assert-no-error
|
||||
"create some uint64 bigints"
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
(assert-error
|
||||
"trap INT64_MIN / -1"
|
||||
(:/ (bigint/int64 "-0x8000_0000_0000_0000") -1))
|
||||
(:/ (int/s64 "-0x8000_0000_0000_0000") -1))
|
||||
|
||||
# in place operators
|
||||
(assert (let [a (u64 1e10)] (:+! a 1000000 "1000000" "0xffff") (:== a 10002065535)) "in place operators")
|
||||
|
||||
Reference in New Issue
Block a user