ed
68c809c659
Merge remote-tracking branch 'offical/master'
2025-10-12 00:52:35 -04:00
gingerBill
d343afbad5
Improve core_builtin.odin docs
2025-10-07 10:34:48 +01:00
ed
0a820a9f71
Merge remote-tracking branch 'offical/master'
2025-10-04 10:05:37 -04:00
gingerBill
9b4c0ea492
Type erase the internals of runtime.copy_*
2025-09-29 15:12:55 +01:00
gingerBill
286e3eafe6
Change inlining semantics for some builtin calls
2025-09-25 08:55:03 +01:00
gingerBill
4d2854f561
Merge pull request #5632 from kalsprite/x386
...
windows i386 support
2025-09-18 22:01:14 +01:00
gingerBill
9cf69576ab
More improvements to minimize code gen size
2025-09-18 20:58:24 +01:00
gingerBill
3954491393
Type erasure to minimize code generation size
2025-09-18 15:54:05 +01:00
ed
00bc86993c
Merge tag 'dev-2025-09'
2025-09-14 10:09:53 -04:00
Jon Lipstate
57bc45ae30
revert to working build
2025-09-03 22:51:28 -07:00
Jon Lipstate
e0c4c53362
add tls when we have crt
2025-09-03 22:32:33 -07:00
Jon Lipstate
231ce2da59
windows i386 support
2025-08-29 12:41:38 -07:00
Harold Brenes
9d8e15b3af
Implementes the block ABI.2010.3.16 natively via the objc_block intrinsic and the Objc_Block builtin type.
...
See: https://clang.llvm.org/docs/Block-ABI-Apple.html
2025-08-06 20:27:31 -04:00
gingerBill
2561427dd3
Add string16 and cstring16 (UTF-16 based strings)
2025-08-02 11:00:15 +01:00
ed
c3da99eac5
Merge tag 'dev-2025-07'
2025-07-12 22:38:51 -04:00
Feoramund
61f9fb7232
runtime: Remove unneeded max(0, ...)
...
`len` never returns negative numbers, so this was an overcautious
expression.
2025-06-13 12:09:10 -04:00
Feoramund
91111937a7
Guard against negative index in inject_at
...
Fixes #4595
2025-06-04 13:58:06 -04:00
ed
ca2d0f81f0
Set allocator in base:runtime/core_builtin: make_map_cap & base:runtime/core_builtin_soa: make_soa_dynamic_array_len
2025-01-12 21:58:57 -05:00
ed
5a7b8b463b
Removed implicit assignments for container allocators in the Base and Core packages
2025-01-12 21:41:15 -05:00
gingerBill
98efb03934
Merge pull request #4599 from Barinzaya/fix_dynamic_resize_zeroing_on_grow
...
Fix dynamic array not zeroing when growing
2025-01-06 12:37:05 +00:00
gingerBill
a6f1046fc0
Merge pull request #4533 from laytan/map-entry
...
add `map_entry` procedure
2025-01-06 12:36:27 +00:00
Yawning Angel
3a5440e4ed
base/runtime: Add ensure and ensure_contextless
...
This provides an equivalent to `assert` and `assert_contextless` that
are always evaluated, ignoring `ODIN_DISABLE_ASSERT`, which is useful
for enforcing API contracts or "asserting" on conditionals with
side-effects.
2024-12-25 00:08:09 +09:00
Barinzaya
5f46b5ca50
Fixed zeroing in resize_dynamic_array.
...
When a dynamic array has unused capacity and is resized to a size
greater than its capacity, the unused part of its capacity wasn't being
zeroed.
2024-12-19 17:52:09 -05:00
Laytan Laats
8050622fe6
add map_entry procedure
2024-11-28 20:07:54 +01:00
Tetralux
2f85257bad
[runtime] make(map[K]V) should not allocate any capacity
...
`make(map[K]V)` was resolving to `make_map_cap()` which allocates initial capacity when it wasn't intended to.
It now calls `make_map()` which doesn't allocate any capacity.
Both `make(map[K]V)` and `make(map[K]V, allocator)` will NOT allocate initial capacity now.
2024-11-16 06:13:12 +00:00
Laytan Laats
10c2f8dbeb
math/rand: add choice_bit_set
2024-10-26 13:50:28 +02:00
Karl Zylinski
fd05d94789
Add make_map that just takes an allocator and no capacity, similar to make_dynamic_array. This renames the old make_map to make_map_cap.
2024-10-02 17:47:04 +02:00
mtarik34b
82aefd4203
Add documentation to runtime.container_of
2024-09-29 16:04:39 +02:00
Laytan Laats
603efa860a
add '#caller_expression'
2024-09-14 22:13:37 +02:00
Franz Hoeltermann
02da1ac9af
Added #any_int directive to some more builtin slice/dynamic array
...
procedures
2024-09-03 12:36:32 +02:00
gingerBill
78fa675c1a
Add assert_contextless, panic_contextless, unimplemented_contextless
2024-08-14 11:18:24 +01:00
Laytan Laats
26fa3aca44
fix copy-paste error in make docs
2024-08-11 17:09:26 +02:00
gingerBill
196ac7e6d6
Type erase _make_dynamic_array_len_cap
2024-07-15 00:01:26 +01:00
gingerBill
26a9416a41
Minor clean ups
2024-07-14 23:33:35 +01:00
gingerBill
e768bddaeb
Inline _append_elem_string further
2024-07-14 23:22:22 +01:00
gingerBill
83b7dd122a
Type erase for append_elems
2024-07-14 23:20:50 +01:00
gingerBill
b0fbaf24a0
Type erase append_elem
2024-07-14 23:16:11 +01:00
gingerBill
15fb4ded2a
type erase resize and reserve internals
2024-07-14 23:09:10 +01:00
gingerBill
8642d719f0
Imply #no_capture to all variadic parameters
2024-07-14 12:19:47 +01:00
gingerBill
c7bd954752
Add more uses of #no_capture
2024-07-14 11:56:04 +01:00
gingerBill
942f3f5220
Add non_zero_* variants for #soa dynamic array
2024-07-01 12:04:29 +01:00
gingerBill
8ddfcf174d
Add #soa support to append directly
2024-07-01 11:51:28 +01:00
gingerBill
7f6fe91896
Add #soa forms to reserve, clear, and resize
2024-07-01 11:37:21 +01:00
gingerBill
11617af8f5
Add support for make(#soa[]T) etc
2024-07-01 11:34:50 +01:00
Karl Zylinski
679f9b4e41
Made default capacity of dynamic arrays more consistent.
...
Before this if you do `arr: [dynamic]int` and then append to arr, then it will have capacity 8.
But if you did `arr := make([dynamic]int, context.temp_allocator)` then arr would have capacity 16.
Now both `arr: [dynamic]int` and `arr := make([dynamic]int, context.temp_allocator)` will resut in arr having zero 0. The only reason to use `make` without an explicit len or cap now is because you want to set it up for a non-default allocator. After the first call to `append` it will now in both cases have capacity 8.
I also updated the documentation on the strings builder, both to reflect this, and also to fix it incorrectly saying that len would be 'max(16,len)', which wasn't true even before these changes.
2024-06-29 08:57:21 +02:00
gingerBill
a1ae6f161b
Merge pull request #3502 from ARtemachka/master
...
Fix typo in core_builtin
2024-06-28 12:00:10 +01:00
Karl Zylinski
f227a40652
Replace max(8, 1) in _append_elem with just 8 and a comment.
2024-06-25 22:48:14 +02:00
Feoramund
50464bdce3
Use #any_int for reserve_* and resize_* procs
...
Resolves #3088
2024-06-10 20:51:58 -04:00
Artsiom Babukh
805bb69c6c
Fix typo in core_builtin
2024-04-28 15:27:34 +00:00
Chris
6dcf38b85b
Correct copy_from_string docs
2024-04-16 21:36:54 +01:00