gingerBill
bbe44b49bc
Correct map_insert
2022-11-14 11:47:56 +00:00
gingerBill
ad0f11668b
Correct map_reserve_dynamic caused by an bizarre code generation bug
2022-11-13 14:53:58 +00:00
gingerBill
5d47e2a166
Change map_reserve_dynamic no do anything when current capacity is greater than specified for the reserve
2022-11-11 11:24:34 +00:00
gingerBill
b475481788
Get deleted key and value for delete_key
2022-11-11 11:19:34 +00:00
gingerBill
3858422f1d
Use mem_resize where possible
2022-11-09 20:59:49 +00:00
gingerBill
366779f8c7
Fix bug with allocator not getting set on a map
2022-11-08 16:06:10 +00:00
gingerBill
dae299b781
Make map_free_dynamic take the total size of the allocation
2022-11-08 15:40:30 +00:00
gingerBill
ed58374964
Make Map_Info store pointers to cell info rather than inline
2022-11-08 12:18:36 +00:00
gingerBill
c96e0afbf1
Begin work on implementing the new map internals
2022-11-07 23:02:21 +00:00
gingerBill
6a14c3edb4
Make raw_data an intrinsic rather a @(builtin) runtime procedure
2022-10-30 22:05:29 +00:00
gingerBill
83ffb68bb7
Fix typo in map_insert
2022-09-23 12:09:46 +01:00
gingerBill
0380601bb4
Fix map_insert
2022-09-21 23:47:33 +01:00
gingerBill
ff97a73152
Reduce unnecessary map gets
2022-09-21 13:03:13 +01:00
gingerBill
9e3ea92829
Inline many calls and delete unused procedures
2022-09-17 14:59:16 +01:00
gingerBill
81f10f53ad
Correct delete_key
2022-09-17 13:22:23 +01:00
gingerBill
fbf036a654
Wrap __dynamic_map_find for certain cases
2022-09-17 13:11:29 +01:00
gingerBill
b967ae2739
Change internal map indices to use a distinct uint rather than just int
2022-09-17 12:21:23 +01:00
gingerBill
ef372bd861
Replace #optional_second with #optional_allocator_error
2022-09-12 13:08:32 +01:00
gingerBill
96be494730
Fix append_nothing
2022-08-26 22:21:19 +01:00
gingerBill
ffa87f55c4
Add a return value to append that states the number of elements that were returned
2022-08-26 16:20:47 +01:00
Jeroen van Rijn
8c1dfabb6b
Fix append for size_of(E) == 0
2022-08-23 16:00:14 +02:00
gingerBill
659c3c528d
Update delete to pass size in bytes to free when possible
2022-08-08 15:16:18 +01:00
gingerBill
576914aee1
Make unreachable() a built-in compiler-level procedure
2022-08-05 11:57:33 +01:00
gingerBill
e0ecdd4b24
Simplify logic of append of zero sized elements
2022-08-02 11:13:53 +01:00
gingerBill
08f5259d77
Replace insert_at with inject_at and assign_at
2022-07-24 23:07:35 +01:00
gingerBill
670f18ad1b
Minor change to shrink
2022-06-12 16:12:24 +01:00
Tetralux
fa2296a124
[runtime] Add builtin shrink for dynamic arrays and maps
...
Asks the allocator to shrink the backing allocation to the current __length__, or a capacity
of the user's choosing.
Returns `(did_shrink: bool, err: mem.Allocator_Error)`.
```
shrink(&array) // shrinks to len(array)
shrink(&array, N) // shrink to N capacity
shrink(&map) // shrinks down to len(map)
shrink(&map, N) // shrink to N capacity
```
2022-06-04 23:29:47 +00:00
gingerBill
63d6c08d90
Add raw_simd_data
2022-05-25 22:09:38 +01:00
gingerBill
3ec70c5517
Merge functionality of #maybe with the standard 'union' functionality
2022-05-23 12:04:19 +01:00
gingerBill
8c1499dbc2
Make raw_data return [^]T types
2022-05-23 11:48:05 +01:00
gingerBill
be8de4a1ff
Update arch enum
2022-05-01 23:52:55 +01:00
gingerBill
9349dfba8f
Add new builtin container_of
2022-04-27 12:39:45 +01:00
Jeroen van Rijn
19dc84e300
Reinstate NBC.
2022-03-15 19:37:04 +01:00
Jeroen van Rijn
a932168f50
[runtime] fix insert_at procedure group.
2022-03-15 19:35:00 +01:00
gingerBill
d269dbcd40
Add comment for the internals of assert
2022-01-23 22:01:54 +00:00
gingerBill
f57201bbd1
Remove unneeded semicolons from the core library
2021-08-31 22:32:53 +01:00
gingerBill
251da264ed
Remove unneeded semicolons from the core library
2021-08-31 22:21:13 +01:00
gingerBill
a5c31bbee0
Add map_insert which returns the pointer to inserted value
2021-08-29 11:45:11 +01:00
gingerBill
81623861c0
Correct mem.clone_slice
2021-08-23 14:33:54 +01:00
gingerBill
4ccf135892
Unify new/make the internal logic between runtime and mem
2021-08-23 12:35:29 +01:00
gingerBill
445ed9be2b
Use multi-pointers when appropriate
2021-08-22 12:54:04 +01:00
gingerBill
f0437a4242
Enforce core:builtin and core:intrinsics for imports
2021-08-21 13:44:16 +01:00
gingerBill
7bbc9a4634
Add #any_int directive to replace auto_cast uses on parameters.
2021-08-15 12:56:59 +01:00
gingerBill
a4be1a5e4c
delete_key now returns the deleted key and deleted value (if found)
2021-07-04 18:52:47 +01:00
gingerBill
3e7aabe6d8
Change uses for parapoly records to use $ always
2021-06-14 11:43:35 +01:00
gingerBill
f30e6f50bd
Reorganize code to improve code generation
2021-06-08 16:21:19 +01:00
gingerBill
46204ed7f0
Update core:runtime to use the new intrinsics
2021-05-30 13:22:15 +01:00
gingerBill
72aa0e6e38
Replace many foreign llvm calls with intrinsics
2021-04-25 20:22:26 +01:00
gingerBill
c3b3194a00
Update builtin procedures to support the new allocator features (without breaking other code)
2021-04-19 22:44:20 +01:00
gingerBill
f98c4d6837
Improve the Allocator interface to support returning Allocator_Error to allow for safer calls
...
Virtually all code (except for user-written custom allocators) should work as normal. Extra features will need to be added to make the current procedures support the `Allocator_Error` return value (akin to #optional_ok)
2021-04-19 12:31:31 +01:00