Commit Graph

607 Commits

Author SHA1 Message Date
df7a8508c8 Move docs 2024-08-10 14:26:41 -04:00
3b1d88ab93 Bugfix for table literals with duplicated keys 2024-08-10 14:20:54 -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
8e2156ac48 Guard against tables exceeding maximum supported size 2024-08-04 18:28:18 -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
fa0dee19e2 Add comment 2024-08-04 17:02:29 -04:00
aa218fe872 Tweak bits 2024-08-04 15:01:27 -04:00
cb44b09715 Tweak reallocation heuristics for arrays 2024-08-04 14:58:09 -04:00
7a649b145e Bugfix for tests 2024-08-04 14:57:22 -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
46396646bf Add proper error check for heap popping 2024-08-03 15:36:40 -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
52544344f1 Fix bug caused by not handling item padding properly 2024-08-03 14:52:49 -04:00
2b9bec18a4 Fix for stride overflows in arrays 2024-08-03 14:40:56 -04:00
b2e752ee32 Replace heap_str with GC_strdup 2024-07-26 13:30:24 -04:00
cfe46ee393 Replace heap_strn() with GC_strndup() 2024-07-26 13:28:18 -04:00
87785555ec Fix for order of operations issues with enum and function typedef code 2024-07-23 19:46:42 -04:00
09ea357f46 Update string docs 2024-07-23 14:29:23 -04:00
6467e6c9d0 Tweak Make deps 2024-07-23 12:27:14 -04:00
9ac51bf2f3 Add headers to make deps 2024-07-23 12:25:54 -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
907122a049 Fix for unqualified enum names as return values 2024-07-19 14:16:51 -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
df765200c4 Switch to parallel compilation 2024-07-06 17:23:32 -04:00
a86dc05d36 Cache AST parsings so we don't have to re-parse files 2024-07-05 15:51:23 -04:00
e51e6f840c Tweak syntax for debug prints 2024-07-05 01:55:02 -04:00
6ba91c1f64 Mention binutils in readme 2024-07-05 00:37:01 -04:00