gingerBill
5c106abe3f
Make map_alloc_dynamic handle the nil_allocator()
2022-11-10 12:01:40 +00:00
gingerBill
db748b7a05
Correct logic for __dynamic_map_set
2022-11-09 23:10:18 +00:00
gingerBill
b035ee2bcd
Swap hashes
2022-11-09 22:05:28 +00:00
gingerBill
0424fb486b
Rewrite map_insert_hash_dynamic
2022-11-09 21:00:17 +00:00
gingerBill
d4f343751e
Inline __dynamic_map_set code where possible
2022-11-08 21:57:18 +00:00
gingerBill
bcf437dc11
Check for existence before setting
...
Test code
2022-11-08 21:21:19 +00:00
gingerBill
503eb470a7
Do an extra check before insertion for pre-existing keys
...
This is test code
2022-11-08 21:10:38 +00:00
gingerBill
667af1be58
Correct map_insert_hash_dynamic and map_insert_dynamic
2022-11-08 20:44:52 +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
2f29894b45
Minor change to map_cell_index_static
2022-11-08 15:15:00 +00:00
gingerBill
a71daee545
Allow for -use-static-map-calls which generates a get procedure per map; add runtime.map_get
2022-11-08 14:58:05 +00:00
gingerBill
046dd55032
Change __dynamic_map_get signature
2022-11-08 13:02:32 +00:00
gingerBill
2fc3da3fde
Change Raw_Map.len to int from uintptr
2022-11-08 12:29:20 +00:00
gingerBill
a74093784c
Add intrinsics.map_cell_info and intrinsics.map_info
2022-11-08 12:24:00 +00:00
gingerBill
ed58374964
Make Map_Info store pointers to cell info rather than inline
2022-11-08 12:18:36 +00:00
gingerBill
ea263b8cc5
Add runtime.map_exists_dynamic
2022-11-08 11:29:09 +00:00
gingerBill
45f0c812af
Correct reflect.map_entry_info_slice
2022-11-08 11:21:45 +00:00
gingerBill
50e10ceb3b
Correct hashing for map types
2022-11-08 01:20:08 +00:00
gingerBill
da774e3fd2
General modifications
2022-11-08 00:38:31 +00:00
gingerBill
bce62b98d4
Basic fmt printing for map
2022-11-07 23:32:59 +00:00
gingerBill
e914a8710d
Basic get and set support for new map
2022-11-07 23:17:37 +00:00
gingerBill
c96e0afbf1
Begin work on implementing the new map internals
2022-11-07 23:02:21 +00:00
gingerBill
831620bfc4
Remove header cache code
2022-09-21 13:06:02 +01:00
gingerBill
ff97a73152
Reduce unnecessary map gets
2022-09-21 13:03:13 +01:00
gingerBill
769d8dd038
Simplify __get_map_header stuff
2022-09-21 12:13:05 +01:00
gingerBill
1d793ea338
Split header table data and the map pointer
2022-09-21 12:09:05 +01:00
gingerBill
3fb69d59bb
Minor correction to __get_map_header
2022-09-17 17:48:38 +01:00
gingerBill
cd484979a8
General clean up minor with rearrangements and removing unneeded procedures
2022-09-17 15:09:39 +01:00
gingerBill
9e3ea92829
Inline many calls and delete unused procedures
2022-09-17 14:59:16 +01:00
gingerBill
c37de9459e
Minor refactor of the dynamic_map_internal.odin stuff
2022-09-17 14:46:52 +01:00
gingerBill
fbf036a654
Wrap __dynamic_map_find for certain cases
2022-09-17 13:11:29 +01:00
gingerBill
bfe0ffd6e6
Minor clean up
2022-09-17 13:02:06 +01:00
gingerBill
8ee6bb5d4b
Add contextless where possible in dynamic_map_internal.odin
2022-09-17 13:00:19 +01:00
gingerBill
7840c1b89f
Change __dynamic_map_get and __dynamic_map_set to use separate parameters rather than take a singular struct
2022-09-17 12:48:12 +01:00
gingerBill
0428d5ae2e
Catch missing areas of Map_Index usage
2022-09-17 12:27:34 +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
a903e5024c
Chnage next_pow2 to ceil_to_pow2
2022-09-17 11:18:26 +01:00
gingerBill
0ff5ff6ff2
Use pow of two capacity for hash maps to allow for & (n-1) instead of % n
2022-09-12 21:22:45 +01:00
gingerBill
c97a8418dc
Clean-up and unification for the allocation procedures
2022-08-08 12:23:19 +01:00
gingerBill
4aca9372a6
Improve resize call
2022-08-08 12:11:30 +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
802df73183
Remove unneeded call
2021-10-26 14:47:59 +01:00
gingerBill
c64674c39e
Remove unnecessary asserts
2021-10-26 13:38:48 +01:00
gingerBill
d386563344
Correct issue with the generated map type internals; Simplify map rehash logic to utilize resize
2021-10-07 21:23:37 +01:00
gingerBill
e6d8fbf194
Add runtime.__get_map_header_runtime
2021-09-25 17:30:18 +01:00
gingerBill
868c923770
Make map internals more robust when using mem.nil_allocator()
2021-09-25 15:55:27 +01:00
gingerBill
720884e0f1
Strip even more semicolons if followed by a } or ) on the same line
2021-08-31 23:47:57 +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