gingerBill
3a9b0a22e7
Add core:container/intrusive/list
2022-04-27 14:27:33 +01:00
hanabi1224
ded8342f3f
Reduce allocations
2022-04-19 20:46:33 +08:00
hanabi1224
4247ba67ed
Fix bugs in core:container/lru
2022-04-18 15:24:54 +08:00
gingerBill
2289b7a33d
Remove #caller_location from certain calls in core:container/small_array
2022-04-04 17:04:05 +01:00
Jeroen van Rijn
ce057ff755
[bit_array] Really fix the leak.
2022-03-06 12:29:17 +01:00
Andrea Piseri
bff3426d25
Fix leak in core:container/bit_array
...
calling `clear` on a `bit_array` no longer leaks the previous
allocation, instead it sets all bits to `false` preserving the same
backing dynamic array.
2022-03-06 10:21:46 +01:00
ap29600
697f8c7ee6
replace a branch with max in core:container/bit_array.set
2022-02-05 18:46:25 +01:00
Andrea Piseri
b6ebfe4b2c
rename iterator procedures
2022-02-05 18:11:48 +01:00
Andrea Piseri
bccbdefde9
Update interface to allow more modes of iteration
...
It's now possible to iterate over:
- all keys in the range min_value ..= max_value, with `iterate_all`
- all set keys in the bit array, with `iterate_set`
- all unset keys in the range min_value ..= max_value, with `iterate_unset`
`Bit_Array` now stores the `max_value` provided during construction, and
updates it when a key that was previously out of range is set.
2022-02-05 18:00:59 +01:00
ap29600
b54fc96b1e
rename iterator proc to next, add named return values
2022-02-04 22:39:47 +01:00
Andrea Piseri
48af78e469
add iterator to core:container/bit_array
2022-02-04 22:12:07 +01:00
gingerBill
76edfae0e0
core:container/topological_sort
2022-02-04 12:08:20 +00:00
gingerBill
35533a7baa
Update core:container/lru to support clear and take a boolean to indicate whether or not to call the on_remove procedure on clear or destroy
2022-02-02 23:38:32 +00:00
gingerBill
a04d849e30
core:container/lru
2022-02-01 15:24:37 +00:00
gingerBill
fb86c23dbd
Keep -vet happy
2022-01-25 16:41:31 +00:00
Jeroen van Rijn
515fd2a228
bit_array: Fix initial size.
2022-01-25 17:08:32 +01:00
CiD-
6cf5371d7d
fix push_back and pop_front
2022-01-14 10:17:49 -05:00
gingerBill
a60b9735a2
Add core:container/queue
2022-01-01 15:46:22 +00:00
gingerBill
43763ddfda
Correct _shift_down logic
2022-01-01 13:44:37 +00:00
gingerBill
70ed280c5a
Fix typo in priority_queue.odin and add default_swap_proc
2022-01-01 13:11:53 +00:00
gingerBill
c7ff296bef
Change the implementation of Priority_Queue to have a better interface that allows for a less and swap procedure
2021-12-30 13:42:10 +00:00
gingerBill
ed8b20da78
Add core:container/priority_queue
2021-12-29 14:38:39 +00:00
gingerBill
a66f859fb4
Minor improvements to core:container/small_array
2021-12-29 11:58:27 +00:00
gingerBill
c46e7eda1d
Add core:container/small_array
2021-12-29 11:26:22 +00:00
Jeroen van Rijn
53e30e4621
[core:container/bit_vector] Create new package.
...
A dynamic bit array, optionally allowing negative indices.
2021-12-28 15:38:12 +01:00
gingerBill
7f61a90ea1
Remove core:container contents
2021-12-28 14:05:09 +00:00
gingerBill
344abf2cb2
Make core and vendor adhere to -vet, -strict-style, and -disallow-do
2021-09-11 16:40:19 +01:00
gingerBill
251da264ed
Remove unneeded semicolons from the core library
2021-08-31 22:21:13 +01:00
gingerBill
f0437a4242
Enforce core:builtin and core:intrinsics for imports
2021-08-21 13:44:16 +01:00
streof
114efbc57c
Fix error: Cannot assign to a procedure parameter
2021-07-09 14:03:49 +02:00
streof
2c71494ad1
Fix error: Undeclared name: p
2021-07-09 13:54:27 +02:00
gingerBill
3e7aabe6d8
Change uses for parapoly records to use $ always
2021-06-14 11:43:35 +01:00
gingerBill
266b5d7d85
Fix container/map.odin
2021-06-01 09:26:01 +01:00
gingerBill
43ac6ca8f4
Add linalg.matrix_cast
2021-03-26 16:24:56 +00:00
breeo
24e7b5ea78
Add container.Priority_Queue
2021-03-25 15:50:33 +01:00
gingerBill
5faa560f82
Make container.Map have similar semantics to the built-in map type
2020-12-15 23:23:07 +00:00
Tetralux
213864a50c
Reuse container.Queue capacity when calling pop_front()
...
Currently, the Queue will never reuse it's full capacity if you call `pop_front`, even if you empty it before pushing more items.
With this change, if you empty the Queue with `pop_front`, then the offset will be set back to the start of the underlying array when you pop the last item.
Future pushes will then reuse the already-allocated--but now empty--space.
2020-10-26 00:12:31 +00:00
gingerBill
3a4f0d85a6
Fix container.Array and container.Ring
2020-10-01 17:04:56 +01:00
gingerBill
fc4fdd588e
Remove usage of do in core library
2020-09-23 17:17:14 +01:00
gingerBill
b8bebf4511
Fix typo in Small_Array procedure
2020-09-14 10:10:35 +01:00
Platin21
3946f357e8
Update ring.odin
...
Someone missed the T type here ;)
2020-08-22 13:12:18 +02:00
gingerBill
5fa54fd2cc
Commit fix
2020-06-16 16:07:44 +01:00
gingerBill
5edb1e8a28
Add hash.djb2 hash.jenkins; Add container.Bloom_Filter; Add container.Ring
2020-06-16 12:53:57 +01:00
Tetralux
dc236d6830
Fix container.Array.array_push_back_elems
...
We were previously using array_slice to get the storage
that we were copying the new elements into, using the current
length as the offset: `copy(data[len:], ..elems)`
However, array_slice returns a slice over `data[0:len]` -- we
were using it as if it was `data[0:cap]`.
Add array_cap_slice that does this instead. :^)
2020-05-15 03:54:32 +00:00
gingerBill
026bb8ed6f
Remove unused headers
2020-04-21 23:26:59 +01:00
gingerBill
f141e2868d
container.Set
2020-04-20 00:12:01 +01:00
gingerBill
400d6014d0
container.Small_Array
2020-04-19 23:57:57 +01:00
gingerBill
ab6947b2c7
container.Small_Array
2020-04-19 23:57:40 +01:00
gingerBill
52bbdefec4
container.Map
2020-04-19 23:43:02 +01:00
gingerBill
8ee67e41f4
Fix #optional_ok; Fix container.Array
2020-04-19 23:08:50 +01:00