Commit Graph

525 Commits

Author SHA1 Message Date
gingerBill
c38842ecb2 Merge pull request #2535 from jasonKercher/fix2515
Fix #2515 - Implement backward shift on `map` on insert and reseed hashes on resize
2023-05-29 22:41:46 +01:00
gingerBill
1e17f44991 Improve error handling for resize and reserve procedures 2023-05-22 11:47:36 +01:00
gingerBill
7298054974 Add require_results to make builtin procedures 2023-05-22 11:19:13 +01:00
gingerBill
535c64c318 Merge pull request #2534 from Tetralux/fix-append-nothing-loc
[runtime] Pass along #caller_location in append_nothing()
2023-05-18 11:23:46 +01:00
jason
b2645b3201 add rehash to map_shrink_dynamic 2023-05-17 00:06:31 -04:00
jason
a9936d1570 implement random map seed 2023-05-16 23:49:55 -04:00
jason
3032a4274d implement backward shift during map insertion 2023-05-16 16:56:32 -04:00
Tetralux
1c5ce75d9f [runtime] Pass along #caller_location in append_nothing() 2023-05-12 23:05:28 +00:00
jason
f9c600a760 add nil check to heap_alloc calls (issue 2530) 2023-05-11 14:04:09 -04:00
gingerBill
2d699fd13b Fix again append on zero sized types 2023-04-19 15:34:40 +01:00
gingerBill
13c321b8fb Fix missing cast in array_elems 2023-04-19 15:31:51 +01:00
gingerBill
5da76ae34b Add struct #no_copy 2023-04-15 15:37:32 +01:00
Fabian Sperber
830d2007a6 Remove usage of global_default_temp_allocator_data when there is no default allocator (freestanding, JS or --default-to-nil-allocator) 2023-03-13 20:12:54 +01:00
gingerBill
eea92a3371 Add booleans to print_any_single 2023-03-06 13:33:29 +00:00
gingerBill
9afd9f9bea Merge branch 'master' into new-temp-allocator 2023-02-28 12:15:54 +00:00
gingerBill
c36dc91849 Minor changes in runtime 2023-02-21 16:24:28 +00:00
gingerBill
806f56ca38 Remove debug string 2023-02-17 13:04:09 +00:00
gingerBill
94c1331c07 Implement @(fini) (opposite of @(init)) 2023-02-15 11:31:51 +00:00
gingerBill
9a81071687 Merge branch 'master' into new-temp-allocator 2023-02-14 23:59:49 +00:00
gingerBill
8ddb493b96 Add #optional_allocator_error to make_map 2023-02-14 10:28:04 +00:00
gingerBill
986cba584e Add runtime.DEFAULT_TEMP_ALLOCATOR_TEMP_GUARD where appropriate 2023-02-10 16:23:33 +00:00
gingerBill
b427a4c8c9 Minor change to arena_temp_end 2023-02-10 14:44:46 +00:00
gingerBill
133ee70a5b Add default_temp_allocator_temp_begin and default_temp_allocator_temp_end 2023-02-10 14:36:57 +00:00
gingerBill
494612827a Add Arena_Temp 2023-02-10 14:30:41 +00:00
gingerBill
1113f23475 Remove unused variable 2023-02-10 14:10:06 +00:00
gingerBill
8626f58773 Replace current default context.temp_allocator to use a growing arena rather than a ring buffer 2023-02-10 13:18:33 +00:00
gingerBill
6179d4feb1 Rename to Type_Info_Parameters 2023-02-08 11:23:21 +00:00
gingerBill
c45ca1bfcc Correct arena_temp_end usage when no allocation ever happens for that arena 2023-01-28 12:09:24 +00:00
gingerBill
2dca39b557 Remove auto_cast procedure field flag
Fixes #2285
2023-01-16 12:06:03 +00:00
hikari
d904ae5191 Replaced opaque bit-shifts with readable constants for memory units 2022-12-24 08:27:15 +02:00
Tetralux
588c52a854 [runtime] Fix typo in shrink_dynamic_array() 2022-12-11 09:10:17 +00:00
gingerBill
521ed28632 Keep -vet happy 2022-12-06 19:57:41 +00:00
gingerBill
27130259cc Coalesce tombstones on delete_key to reduce all map slots from being filled on insertion
This is a bodge and will need to be replaced with an actual solution involving backward shift deletion rather than relying on tombstone slots in the first place.
2022-12-06 19:55:17 +00:00
gingerBill
e59e34d334 Change order of map_free_dynamic in usage 2022-11-29 12:27:32 +00:00
gingerBill
4fd97c3ba6 Remove panic 2022-11-29 12:22:37 +00:00
gingerBill
107c7a36d0 Treat .Mode_Not_Implemented as not an error when doing runtime.map_free_dynamic 2022-11-29 12:20:01 +00:00
gingerBill
bbe44b49bc Correct map_insert 2022-11-14 11:47:56 +00:00
gingerBill
489e8dc592 Add @(require_results) to map procedures where possible 2022-11-13 23:47:00 +00:00
gingerBill
3edb3d8d8c Simplify the handling of the hashing calls for maps 2022-11-13 23:24:08 +00:00
gingerBill
ad0f11668b Correct map_reserve_dynamic caused by an bizarre code generation bug 2022-11-13 14:53:58 +00:00
gingerBill
04a1e7d638 Correct json/unmarshal.odin 2022-11-11 16:15:21 +00:00
gingerBill
16fc961010 Begin work on map static set 2022-11-11 14:45:22 +00:00
gingerBill
a0bd31646b Make map get internal calls take the hash value rather than compute it internally 2022-11-11 13:02:23 +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
8852d090b6 Correct static map get; make get take a pointer to simplify compiler internals 2022-11-10 12:46:53 +00:00
gingerBill
ac259ac790 Unify reserve and grow code 2022-11-10 12:34:01 +00:00
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