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
f76316f889
Merge branch 'master' into allocator-mode-alloc-non-zeroed
2022-11-03 12:47:11 +00:00
gingerBill
6a14c3edb4
Make raw_data an intrinsic rather a @(builtin) runtime procedure
2022-10-30 22:05:29 +00:00
Julian Ceipek
2242178d96
Fix signature for objc_allocateClassPair
2022-10-20 21:07:14 -04:00
gingerBill
c4d19dfa92
Use uint instead of int to improve code generation for bounds checking
2022-09-27 22:31:46 +01:00
gingerBill
83ffb68bb7
Fix typo in map_insert
2022-09-23 12:09:46 +01:00
gingerBill
7f601c9535
Add Allocator_Mode.Alloc_Non_Zerored
2022-09-22 12:12:57 +01:00
gingerBill
0380601bb4
Fix map_insert
2022-09-21 23:47:33 +01: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
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
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
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
b3e3b6c656
Fix #1965
2022-08-20 11:17:47 +01:00
gingerBill
659c3c528d
Update delete to pass size in bytes to free when possible
2022-08-08 15:16:18 +01:00
gingerBill
5e3cf45df3
Add #soa pointer type to aid with refactoring to #soa data types
...
a: #soa[16]Foo
p := &a[6]
#assert(type_of(p) == #soa^#soa[16]Foo)
p^.x = 123
p.x = 123
2022-08-08 15:07:00 +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
gingerBill
576914aee1
Make unreachable() a built-in compiler-level procedure
2022-08-05 11:57:33 +01:00
Atanas Dimitrov
28ec50d567
Fix string orderings to account for prefix-equal strings
2022-08-03 16:09:36 +03: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
Jeroen van Rijn
888913c739
Add runtime.dll_forward_reason for Windows DLLs.
2022-06-21 17:29:55 +02:00
gingerBill
c53426fcb4
Merge pull request #1818 from IanLilleyT/reserve_exceed
...
Dynamic array append reserves more space when it exceeds capacity
2022-06-12 17:19:08 +01:00
gingerBill
ca1f419dc2
Merge pull request #1819 from IanLilleyT/no_query_info
...
Allocator: tidying up Query_Info return values when not part of Query_Features
2022-06-12 17:15:08 +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
Ian Lilley
dda2ed290a
tidying up Query_Info return value when not in query features
2022-06-01 22:40:39 -04:00