Commit Graph

5453 Commits

Author SHA1 Message Date
Lucas Perlind 46e0c7ad74 Cleanup 2025-05-07 11:30:58 +10:00
Lucas Perlind 83bc2d3c4a Add asan support for various allocators 2025-05-06 14:55:50 +10:00
Jeroen van Rijn 2224911aca Fix type_union_tag_offset when all members are zero sized 2025-05-05 18:09:54 +02:00
gingerBill 36945079f8 Add intrinsics.simd_indices 2025-05-05 11:41:54 +01:00
Jeroen van Rijn c96d8237ba Clarify error messages for types that aren't simply comparable.
Previously, it implied that these are different types:
```
W:/Scratch/scratch.odin(17:5) Error: Cannot compare expression, operator '==' not defined between the types 'Handle_Map($T=u32, $HT=u32, $Max=10000)' and 'Handle_Map($T=u32, $HT=u32, $Max=10000)'
    if m == {} {
       ^~~~~~^
```
Now:
```
W:/Scratch/scratch.odin(20:5) Error: Cannot compare expression. Type 'Handle_Map($T=u32, $HT=u32, $Max=10000)' is not simply comparable, so operator '==' is not defined for it.
	if m == {} {
	   ^~~~~~^
```
2025-05-03 22:31:01 +02:00
Jeroen van Rijn 9681d88cd3 Fix #5107
Fixes #5107 by checking whether `result_count` is non-zero before indexing `type->Proc.results->Tuple.variables`.
2025-05-03 14:42:20 +02:00
Jeroen van Rijn 30c6fea9e9 Allow polymorphic #simd array as return type 2025-05-02 15:38:43 +02:00
gingerBill 19fe75f020 Merge pull request #5098 from laytan/fix-nan-comparisons
fix variable NaN comparisons
2025-05-02 13:00:42 +01:00
gingerBill 777c33a9a1 Merge pull request #5102 from Lperlind/attribute-no-sanitize-address
Add attribute @(no_sanitize_address)
2025-05-01 12:16:10 +01:00
Lucas Perlind 5c73b4ef58 Add attribute @(no_sanitize_address)
The purposes of this attribute is to let procedures opt-out of being
instrumented with asan. Typically an allocator that includes 'in-band'
meta-data will be accessing poisoned values (such as tlsf).

Making asan work with these allocators becomes very challenging so
just being to ignore asan within specific allocator procedures
makes it easier to reason and removes the need to temporarily
poison and unpoison allocator data.
2025-05-01 20:42:21 +10:00
Laytan Laats 396a18efce fix variable NaN comparisons 2025-04-30 20:04:24 +02:00
Laytan Laats 9fb9382449 fixes assigning null as a type if it's an alias but the base type isn't resolved yet
It's a bit of a band aid fix because the field will get the type of the
alias, not the base type, but that was already the case before #5045 so
it's forward progression.

Closes #5092
Fixes #5061
2025-04-30 19:39:38 +02:00
gingerBill 0de802d388 All N-valued (N>=2) expressions in or_else expressions 2025-04-29 17:39:28 +01:00
Jeroen van Rijn d463aba7d1 Warn if someone imports the same case-folded path twice 2025-04-27 14:32:26 +02:00
Barinzaya 9284ebb5e8 Add missing cast to global/static var alignments. 2025-04-24 14:35:00 -04:00
Barinzaya b41a776027 Correctly align global and static variables.
This can be important if matrices or SIMD vectors are being used in
global or static variables, as otherwise it may result in crashes due to
aligned instructions accessing misaligned variables.
2025-04-24 14:21:21 -04:00
Laytan 8efeaef40b fix not resolving to alias in a recursive declaration 2025-04-16 22:55:25 +02:00
gingerBill 3dcc22fa6d Change hashing rules for float-like types to make 0 == -0 2025-04-16 10:52:35 +01:00
gingerBill 6045955c88 More improvements doc writer name canonicalization 2025-04-15 12:35:20 +01:00
gingerBill b2ca76a76a Improve name canonicalization rules for the doc writer 2025-04-15 12:07:58 +01:00
gingerBill cfb8cc709c Merge branch 'master' of https://github.com/odin-lang/Odin 2025-04-15 11:51:05 +01:00
gingerBill 39363c4018 Improve name canonization rules for doc writer 2025-04-15 11:50:59 +01:00
Jeroen van Rijn 2d5b85f9f9 Merge pull request #5038 from mtarik34b/noteq-comparison-for-nan-must-be-true
Ensure `NaN != any_float_value` evaluates to true for constant NaN values
2025-04-15 12:29:17 +02:00
gingerBill 2d4cb79baa Fix SysV ABI bug 2025-04-15 11:26:41 +01:00
mtarik34b 1d2adbb3c6 Remove reference to git issue 2025-04-15 05:26:36 +02:00
mtarik34b 313d7d84bc Ensure NaN != any_float_value evaluates to true for constant NaN values 2025-04-15 05:00:36 +02:00
Jeroen van Rijn 32c9f6d13a Remove bit_field -> bit_set warning.
The "This 'bit_field' might be better expressed as a 'bit_set' since all of the fields are booleans, of 1-bit in size, and the backing type is an integer" warning is imperfect. Disable it for now.
2025-04-12 14:01:18 +02:00
Jeroen van Rijn 04807309b7 Allow intrinsics.type_elem_type(simd_vector) to return the element type.
Make `type_elem_type(#simd[4]f32)` return `f32`, same as it would for `[4]f32`.
2025-04-11 21:49:48 +02:00
Feoramund 840c863786 Fix Darwin version reporting for older macOS 2025-04-10 16:25:08 -04:00
Jeroen van Rijn b27008e0f9 Simplify condition, op = Token_Sub was trivially true 2025-04-10 17:58:54 +02:00
Jeroen van Rijn 3a7691c714 Fixes #5026 2025-04-10 17:54:58 +02:00
gingerBill 1f814c33dc Support subtargets in build tags: #build darwin:generic and #build linux:android, darwin:ios 2025-04-10 11:36:03 +01:00
gingerBill 5e63388de2 Fix init_android_values SDK check for odin check 2025-04-10 11:07:44 +01:00
Jeroen van Rijn 5912718002 Merge pull request #5023 from justgook/master
add quotes for absolute path
2025-04-09 14:39:31 +02:00
gingerBill 2548fc2431 Actually maybe fix #5015 2025-04-09 13:33:06 +01:00
Romāns Potašovs dc75ee72ae add quotes for absolute path 2025-04-09 15:31:34 +03:00
gingerBill a15b367921 Fix #5015 2025-04-09 13:29:56 +01:00
gingerBill 377e4e11ed Merge branch 'master' of https://github.com/odin-lang/Odin 2025-04-09 13:23:21 +01:00
gingerBill a66ea9bf4a Remove warning on struct field parameters being too big for the stack 2025-04-09 13:23:15 +01:00
IllusionMan1212 640325512b gb.h: fix buffer overflow when printing long strings. fix #4831 2025-04-09 00:31:54 +02:00
gingerBill fbd29dd409 Merge pull request #5013 from IllusionMan1212/one-last-android-fix-maybe
fix: use the clang binary that's provided by the android NDK
2025-04-08 13:14:20 +01:00
gingerBill b07387321a Merge branch 'master' of https://github.com/odin-lang/Odin 2025-04-08 11:37:42 +01:00
gingerBill fe040d1bbd Propagate @(link_section=<string>) to nested declarations 2025-04-08 11:36:53 +01:00
Jeroen van Rijn eeb8b8dcc4 Fix #5020 2025-04-08 10:13:45 +02:00
IllusionMan1212 af91dd7c7a android: always link liblog 2025-04-08 01:30:55 +02:00
IllusionMan1212 7d2a8dc8ee fix: use the clang binary that's provided by the android NDK
always link against libandroid because it's needed by the glue code.
2025-04-07 13:02:14 +02:00
gingerBill 77b5eebf8c Add trivial sanity check for assigning to return values within defer #5011 2025-04-07 11:57:55 +01:00
Feoramund e13b05168c Fix syscall_bsd on NetBSD ARM64 2025-04-06 19:58:23 -04:00
gingerBill eecc6c1f18 Merge pull request #5003 from IllusionMan1212/more-android-fixes
Android bundling improvements
2025-04-06 09:28:13 +01:00
Hisham Aburaqibah 106427b127 fix(android): pass --sysroot when compiling the android glue code
This prevents a `function-like macro '__GLIBC_USE' is not defined`
compilation error from happening with newer NDK versions (I tried r28)
2025-04-05 15:18:27 +02:00