Commit Graph

311 Commits

Author SHA1 Message Date
2c4f6536a3 Fix Int->Num promotions 2024-08-13 02:51:10 -04:00
ab7a5e7af6 Proper promotion of ints 2024-08-13 02:45:57 -04:00
aa74180ed1 Fixing up integers 2024-08-13 02:20:48 -04:00
158a1c6ad2 More fixes 2024-08-13 02:09:18 -04:00
d08f795794 Partially working first draft of bigints 2024-08-13 01:30:25 -04:00
c1c889b024 Fix for set.items 2024-08-12 18:00:54 -04:00
ea80fefa05 Bugfix some issues with table keys/values 2024-08-12 17:57:14 -04:00
6aabed4fcc Fix some COW bugs for arrays/tables/sets 2024-08-12 17:44:05 -04:00
d2f4d07585 Support channels with maximum size 2024-08-11 15:04:22 -04:00
2ecb5fe885 Add channels and threads 2024-08-11 14:47:34 -04:00
6d3d104363 Overhaul of operator metamethods 2024-08-10 20:50:15 -04:00
f0e56acc5b Bugfix some issues with mod1 2024-08-10 20:40:41 -04:00
948d6b4c22 Add array:counts() 2024-08-10 16:36:50 -04:00
4265728cbb Add Array:unique() to get a set of unique items 2024-08-10 16:19:36 -04:00
b37bd70b60 For tables, deprecate support for square bracket indexing and .default
values, replacing them with a `:bump()` function for tables with numeric
values. This means that counters can be implemented easily without the
need to mask complexity.
2024-08-10 16:03:41 -04:00
671f81137e Make Num32/Num64 literals explicitly typed to aid in macros using
__typeof
2024-08-10 16:03:00 -04:00
8d3d591312 Add Sets to the language 2024-08-10 15:15:38 -04:00
f78cd6357a Change table removal function to use values instead of references 2024-08-08 13:20:38 -04:00
c045c54309 Add a Range datatype with creation methods like 5:to(10) and
modification methods like `range:by(2)` or `range:reversed()`
2024-08-05 14:40:28 -04:00
7300049867 Switch to TABLE_INCREF 2024-08-04 17:31:33 -04:00
7fd74553f8 More refcount fixes 2024-08-04 17:27:43 -04:00
d7e3d399d6 Fix up some edge cases with refcounting 2024-08-04 17:25:54 -04:00
43501f7bec Minor fix for array refcounting 2024-08-04 17:23:42 -04:00
ff4ea60daf Tweaks to array implementation, including changing how the bits are
allocated, making more explicit checks for refcounts and max values,
optimizations for certain methods, and adding compile-time errors for
arrays that hold items that are too large.
2024-08-04 14:22:58 -04:00
adccc56880 Switch around some of the logic for array:random() and array:shuffle()
to use Int$random() and return values
2024-08-04 13:03:55 -04:00
09204f4ce8 Revert "Fix array:random() to return a random item using correct RNG logic,"
This reverts commit 68b34cf00b.
2024-08-03 17:44:22 -04:00
8357d02992 Make default table removal behavior deterministic, but have caches
explicitly use random eviction.
2024-08-03 17:42:45 -04:00
68b34cf00b Fix array:random() to return a random item using correct RNG logic,
rather than a reference.
2024-08-03 17:33:18 -04:00
99b00530ce Change structs/enums so they allow for field/tag names that are C
keywords
2024-08-03 16:39:04 -04:00
17be975d3a Fix integer random functions so they correctly handle all representable
ranges
2024-08-03 16:23:28 -04:00
167634eaa4 Change array API to take a padded item size instead of a type info in
most cases
2024-08-03 15:33:50 -04:00
16c2e3f590 Incrementally moving towards passing array entry sizes explicitly 2024-08-03 15:06:59 -04:00
2b9bec18a4 Fix for stride overflows in arrays 2024-08-03 14:40:56 -04:00
87785555ec Fix for order of operations issues with enum and function typedef code 2024-07-23 19:46:42 -04:00
7911df8294 Make sure array slicing doesn't require a pointer and disallow automatic
stackifying of values
2024-07-22 13:54:03 -04:00
5b0a841db6 Fix edge case with iterating over array:from(-999) 2024-07-20 17:20:50 -04:00
279cd23143 Micro optimization for iterating over array ranges 2024-07-20 17:13:15 -04:00
fb95bbb1d4 Deprecate array:pairs() and switch iterator functions to use enums 2024-07-20 16:45:13 -04:00
d3f14cf53c Support nested lambda closures 2024-07-14 14:13:23 -04:00
4e6d8162bf Fix issue with bindings inside closures 2024-07-14 13:22:42 -04:00
9fec3a6adb Fix for reductions over iterators like (+) range(5, 10) 2024-07-13 19:58:21 -04:00
39576466a7 Add ReturnType(ret) so we can more accurately track return values for
`if` statements
2024-07-13 18:43:50 -04:00
2e2f68e582 Allow lambdas to have a return statement as the last statement 2024-07-13 18:26:41 -04:00
f64aaf5960 Add array:pairs() 2024-07-13 18:05:14 -04:00
445f79cb70 Add iterator functions 2024-07-13 17:17:58 -04:00
3db57b4d2e Bugfix for unchecked array access 2024-07-10 13:47:15 -04:00
068d0e8563 Add array:to() to split out functionality of array:from() 2024-07-10 13:42:58 -04:00
10e86153a2 Replace array:slice() with array:from(first, last) and array:by(step) 2024-07-10 13:34:45 -04:00
f4dee58f03 Check for functions that don't return when they need to, as well as a
fix for 'when' statement typing
2024-07-04 18:27:08 -04:00
2c89f3385f Fixes for defer statements in lambdas 2024-07-04 18:09:33 -04:00