Commit Graph
46 Commits
Author SHA1 Message Date
Louis Novy 374024fc73 Parse integer literals without allocating per digit and reject non digits in their exponent 2026-09-30 15:50:30 -04:00
gingerBill ae63a4a4c6 Fix big integer representation of large numbers such as 98765.0e309 2026-09-29 11:41:50 +01:00
kalsprite c580e1af93 big_int: base prefix iwth only seperateors and no digits 2026-08-19 11:29:28 -07:00
kalsprite 885e12d21d and-not fold 2026-08-15 23:06:35 -07:00
kalsprite 33636c8236 fix bigint negative prints 2026-08-06 21:40:32 -07:00
jerksto ff949ac6fd Don't assert on -define: values with an exponent 2026-07-30 10:59:10 -04:00
gingerBill 51bc27be01 Fix big_int_shr for arithmetic shift (i.e. negative numbers) 2026-07-12 00:04:35 +01:00
misomosi 85c2aaf0a4 Use libtommath API for counting bits 2026-06-28 19:25:02 -04:00
gingerBill 55b63099a8 Fix constant x %% y evaluation 2026-06-24 10:35:36 +01:00
gingerBill 153a522228 Use normal i64 arithmetic instead of big-ints for hot path 2026-03-17 13:34:06 +00:00
gingerBill 36d5a19115 Replace Scope.elements to use a custom hash map ScopeMap
This hash map is robin hood based with a inline slot amount for small scopes
2026-03-16 17:41:58 +00:00
Jeroen van Rijn 6434bf4b65 Limit maximum exponent in parsing of float/integer literals 2026-03-07 12:38:04 +01:00
misomosi 26f9688c69 Fix early overwrite of dst w/ exp_u64 2024-12-21 16:53:31 -05:00
Yawning Angel 61795232f4 src/big_int.cpp: Use square-multiply for exponentiation
For utterly unrealistic constant sizes, this still crashes on my system,
but it crashes fast due to the OOM killer, and people using rediculously
large exponents get what they deserve.
2024-10-25 11:46:47 +09:00
Laytan Laats efe68c2e24 posix: add package 2024-08-14 01:44:35 +02:00
gingerBill 8f4ffbe1da Fix #2299 by handling very large value cases correctly 2023-01-20 11:23:15 +00:00
gingerBill 520ff731de Add ArenaTemp to the compiler 2023-01-12 00:47:20 +00:00
gingerBill ac5f5a33e9 gb_internal a lot 2022-12-18 21:17:07 +00:00
gingerBill 098f51aa80 Allow transmute to be constant for integers of the same internal endianness 2022-10-19 16:59:38 +01:00
Jeroen van Rijn d9b0c05acf Typo. 2022-05-03 13:47:13 +02:00
Jeroen van Rijn 59f55a2119 Make big_int_from_string return an error if not an integer. 2022-05-03 13:15:49 +02:00
gingerBill 10f4d8df32 Override libtommath allocation procedures 2021-07-14 23:36:23 +01:00
gingerBill 76707e1d2f Add sanity casts for 32/64 bit correctness 2021-07-12 11:03:12 +01:00
gingerBill ff2e5c3efe Simplify big_int_not for negative inputs 2021-07-11 17:43:56 +01:00
gingerBill a1a1668dcf Update build.bat and Makefile 2021-07-11 16:23:25 +01:00
gingerBill 63b572a0ab Clean up big int to LLVM integer code 2021-07-11 16:18:30 +01:00
gingerBill e90e7d4af9 Change mp_clear calls to big_int_dealloc 2021-07-11 16:10:04 +01:00
gingerBill 460e14e586 Change the compiler's big integer library to use libTomMath
This now replaces Bill's crappy big int implementation
2021-07-11 16:08:16 +01:00
gingerBill d9e6ade030 Add experimental support for a threaded semantic checker to -threaded-checker 2021-07-10 23:51:37 +01:00
gingerBill 690374d4de Fix typo 2021-07-10 23:07:42 +01:00
gingerBill d8bc2030e6 Fix big_int_to_f64 2020-05-30 16:45:49 +01:00
gingerBill 1a0614b0d7 Improve performance of tokenization and parsing 2020-05-27 18:23:37 +01:00
gingerBill 5bf71ba75c big_int addition overflow rules 2019-11-11 22:47:25 +00:00
gingerBill 33d05a07de Fix big_int_or and big_int_xor 2019-11-10 20:06:04 +00:00
gingerBill 8da8301b09 Fix big subtraction for very large numbers on edges of overflow. 2019-11-10 19:55:26 +00:00
gingerBill fa5d00521b Remove inline from many of the mem.* procedures 2019-02-04 12:15:51 +00:00
gingerBill bd62bceca6 Fix BigInt normalization issue #293 2018-12-08 11:25:35 +00:00
gingerBill dfd7a194ed Fix big int shifts of 0 2018-10-28 09:32:59 +00:00
Alexis Breust 805cc48f03 Replaced __builtin_clz by long long version - Fixes #268 2018-10-08 08:23:50 +02:00
gingerBill 28816dc491 Fix parenthesis warning on clang 2018-08-08 13:04:40 +01:00
gingerBill 6512a3e5f2 using Foo :: enum {A, B, C}; len(Foo) 2018-07-29 10:50:15 +01:00
gingerBill 49f2124df0 Support larger integer literals to work with the new BigInt system 2018-07-29 10:22:17 +01:00
gingerBill 1705ba8069 Fix typos 2018-07-28 19:44:00 +01:00
gingerBill 8504ff920b Correctly handle bitwise operations for negative BigInt 2018-07-28 18:36:45 +01:00
gingerBill e34a9e6185 Fix big_int_shr 2018-07-28 00:48:36 +01:00
gingerBill c3c7834246 BigInt support in the constant system 2018-07-28 00:41:31 +01:00