Commit Graph

347 Commits

Author SHA1 Message Date
gingerBill
3dc7016a4e Merge pull request #7290 from corleypc/soa-add-pop
Adds the pop family of procedures for soa arrays
2026-08-12 13:46:26 +02:00
Mihail Moskov
639606ae63 fixes non_zero_append_elem_fixed_capacity_string 2026-08-12 14:06:21 +03:00
Mihail Moskov
8c23c01c71 minor wording tweaks 2026-08-11 15:30:00 +03:00
Mihail Moskov
9e73c20197 adds the pop procedure family for soa arrays 2026-08-11 15:21:23 +03:00
Simon Branch
8f4f92db8f Fix runtime quaternion division
The runtime implementations of quaternion division are incorrect when
calculating q/r with nonzero jmag(r) and either nonzero imag(q) or
kmag(q).  Notably, the inverse 1/r is still calculated correctly
because imag(1) = kmag(1) = 0.

The mistake can be verified by calculating (a/b)*b which will be very
different from both a and a * (1/b) * b.

The compile-time constant folding is correct, see exact_value.cpp
in function exact_binary_operator_value -> ExactValue_Quaternion ->
Token_Quo.

    quo256 :: proc(q, r: quaternion256) -> quaternion256 { return q/r }
    a: quaternion256 : 3 + 5i + 7j + 11k
    b: quaternion256 : 2 + 7i + 3j + 5k
    c: quaternion256 : a/b
    fmt.println("comp", abs((c*b) - a))
    fmt.println("run ", abs(quo256(a,b)*b - a))
    // both values should be very close to zero;
    // without fix, only the first is
2026-08-05 20:43:50 -07:00
Jeroen van Rijn
9caff6370f Typo 2026-08-05 19:02:35 +02:00
Jeroen van Rijn
c24708defc Fix typo in chacha8rand_refill_simd128 2026-08-05 00:14:53 +02:00
corley
478ecf130f another useless comment removed 2026-08-03 23:45:44 +03:00
corley
c720ee5353 cleans up obsolete comments 2026-08-03 23:26:44 +03:00
gingerBill
23b45391d2 Merge pull request #7149 from corleypc/no-alias-dyn-arrays
Annotates the array parameter of dynamic array builtins with #no_alias
2026-08-03 15:43:03 +02:00
gingerBill
319143e4b7 Minor style cleanup 2026-08-03 14:42:44 +01:00
gingerBill
9914a57fc7 Add intrinsics.soa_copy_from_slice and use it within _append_soa_elems replacing the old handwritten unrolled approach 2026-08-03 14:41:04 +01:00
corley
439edc5fa8 make soa builtins go vroom 2026-08-03 02:32:09 +03:00
Sylphrena
64f27153cc Follow up fix of map shrink 2026-08-01 13:30:34 +02:00
Sylphrena
17e23a8bcf Shrink map to minimum capacity with shrink 2026-07-29 15:20:50 +02:00
corley
75335afd04 #no_alias added to the array parameter of dynamic array builtins 2026-07-29 03:00:29 +03:00
corley
e8ab8455dc fixes growth check for soa dynamic arrays 2026-07-27 22:46:22 +03:00
corley
b821619325 fixes soa dynamic arrays not zeroing all elements after shrink + grow 2026-07-21 23:47:03 +03:00
corley
d1fd585b55 fix for map reported capacity incorrect after shrinking 2026-07-20 21:33:46 +03:00
zippylolz
05b42e518a docs: closes markdown table header for runtime package overview documentation 2026-07-18 10:31:17 -04:00
DerTee
78c04ca65d fix assign_at_elems_fixed_capacity_dynamic_array & co
copy-paste error: the fixed cap version of resize doesn't take a location
2026-07-10 06:25:17 +02:00
gingerBill
ca3ef41dcf Fix typo 2026-06-28 13:34:29 +01:00
gingerBill
7da5608121 Add _append_elem_ptr to optimize for append when the element is internally pointer-like 2026-06-28 13:31:49 +01:00
gingerBill
3e3fc1c906 Remove duplicated code 2026-06-24 11:11:16 +01:00
gingerBill
40e54a97ed Merge branch 'master' into bill/bedrock 2026-06-24 11:07:02 +01:00
gingerBill
c843f3bb65 Optimize append_elem for different optimization levels
* For `-o:size` and below, uses the type erased approach
* For `-o:speed` and above, the inlined form is used

This is necessary because a generic `mem_copy_non_overlapping` cannot be optimized when type erasure is used, meaning in a hot path where `append_elem` is used a lot; thus `mem_copy_non_overlapping` becomes a bottleneck.
2026-06-22 12:57:00 +01:00
gingerBill
233242f4ea Remove __copy_bits 2026-06-22 12:55:56 +01:00
gingerBill
588a8148f2 Remove the now defunct __write_bits and __read_bits 2026-06-22 12:55:33 +01:00
gingerBill
900ebd6b5b Heavily improve reading and writing to bit fields 2026-06-22 12:55:29 +01:00
Sylphrena
0aa85a035f Added optional allocator error to map_insert 2026-06-13 20:00:02 +02:00
juaumjuaumjuaum
bf2d33f0e5 Swap panic_contextless and unimplemented_contexless documentation
They were swaped
2026-06-02 00:00:45 +02:00
gingerBill
1e1f37fcef n -> num_appended for append return values 2026-05-18 14:33:35 +01:00
gingerBill
d4508e39de Merge pull request #6677 from BigBoyBarney/builtin-fix
Fix `make_aligned` and `new_aligned` to be builtin
2026-05-12 14:31:26 +01:00
Sylphrena
b603e7400f Fix make_aligned and new_aligned to be builtin 2026-05-11 21:54:31 +02:00
gingerBill
b0ee0bb635 Add @(fast_math={...}) + intrinsics.Fast_Math_Flags 2026-05-11 11:55:07 +01:00
gingerBill
d21fea404b Merge pull request #6631 from heavyrain266/deprecate-haiku
removed Haiku from supported targets
2026-05-06 15:52:36 +01:00
gingerBill
8ffcdf172a Odin_Calling_Convention defined in compiler; Allow for main :: proc "contextless" () {} with -bedrock; intrinsics.type_proc_calling_convention 2026-05-05 15:07:42 +01:00
gingerBill
942c1bff17 Merge branch 'master' into bill/bedrock 2026-05-05 13:57:14 +01:00
gingerBill
09c7b75f79 Remove Odin_Endian_Type.Unknown 2026-05-05 10:18:19 +01:00
gingerBill
44e44911c8 Disable startup and cleanup calls in main with -bedrock 2026-05-04 11:55:00 +01:00
gingerBill
83dab63dcd Fix when 2026-05-04 10:58:16 +01:00
gingerBill
ea00291519 Begin work on -bedrock mode
Currently disables 128-bit integers, `map` type, and RTTI
2026-05-02 15:06:01 +01:00
Ignacy Koper
183a4c2d7f removed Haiku from base:runtime package
Signed-off-by: Ignacy Koper <ignacy423@gmail.com>
2026-04-28 19:27:24 +02:00
Ignacy Koper
3e64a72bad removed Essence from supported targets
Signed-off-by: Ignacy Koper <ignacy423@gmail.com>
2026-04-27 11:10:48 +02:00
jakubtomsu
c55797356f default NATIVE_SIMD_BIT_WIDTH to 128 2026-04-10 16:30:44 +02:00
jakubtomsu
0475456ac0 add native SIMD bit width constant 2026-04-09 20:43:14 +02:00
Tejas Hegde
d27f34f233 Updated delete_key doc to mention iteration behaviour 2026-03-30 19:29:52 +10:30
jakubtomsu
382ca331be runtime align_forward procs as source of truth 2026-03-26 19:38:49 +01:00
WojtaZam
1f9f2dc0da fix Error: Missing return statement at the end of the procedure pop_fixed_capacity_dynamic_array 2026-03-17 20:19:46 +01:00
Shane Shrybman
af2d8ca679 FCD array proc group add _elems 2026-03-15 21:45:44 -04:00