Commit Graph

15268 Commits

Author SHA1 Message Date
Jeroen van Rijn deededfb0a Fix executable_path info on Linux 2025-05-04 00:21:20 +02:00
omark96 1b8a65c327 win/sys: Add GetWindowThreadProcessId 2025-05-03 23:44:55 +02:00
Barinzaya b0f53a6eaf Implemented suggestions on core:simd helpers.
Adjusted documentation, and renamed the reduce_*_split procs to
reduce_*_bisect.
2025-05-03 17:35:53 -04: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
Barinzaya 6ebd30033f Removed an extra character that slipped into a comment. 2025-05-03 13:24:22 -04:00
Harold Brenes be2e4dec7d Resolve other TODOs 2025-05-03 13:06:57 -04:00
Barinzaya 8b6436201e Fixed a reduce_add proc doing multiplication instead. 2025-05-03 13:04:11 -04:00
Barinzaya 7e34d707bb core:simd helpers: indices and reduce_add/mul
The indices proc simply creates a vector where each lane contains its
own lane index. This can be useful for use in generating masks for loads
and stores at the beginning/end of slices, among other things.

The new reduce_add/reduce_mul procs perform the corresponding arithmetic
reduction, in different orders than just "in sequential order". These
alternative orders can often be faster to calculate, as they can offer
better SIMD hardware utilization.

Two different orders are added for these: pair-wise (operating on
adjacent pairs of elements) or split-wise (operating element-wise on the
two halves of the vector).

This doesn't actually cover the *fastest* way for arbitrarily-sized
vectors. That would be an ordered reduction across the native vector
width, then reducing the resulting vector to a scalar in an appropriate
parallel fashion. I'd created an implementation of that, but it required
multiple procs and a fair bit more trickery than I was comfortable with
submitting to `core`, so it's not included yet. Maybe in the future.
2025-05-03 11:55:52 -04: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
Harold Brenes fc082f5ea5 Remove some TODO. Leave important note 2025-05-03 03:21:03 -04:00
Harold Brenes 6d18560ca3 Move unconditionally exporting Objective-C methods to the right location 2025-05-03 03:09:31 -04:00
Harold Brenes cf3830a6a8 Fix checker errors. 2025-05-03 03:09:31 -04:00
Harold Brenes 33d37c72f9 Register all classes unconditionally 2025-05-03 03:09:31 -04:00
Harold Brenes a00b91577d Prevent multiple uses of the same Objective-C class name 2025-05-03 03:09:30 -04:00
Harold Brenes 5f0b47c373 Implement all checker specification for Objective-C class implementations and objc_ivar_get intrinsic 2025-05-03 00:59:33 -04: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
Jeroen van Rijn 7027d37596 Merge pull request #5103 from jasonKercher/better-box2d-build
Make build_box2d.sh more flexible
2025-05-02 04:57:58 +02:00
jason 87f5b96fcc Make build_box2d.sh more flexible
Removed the `odin root` call.
Seperated the clean rule in wasm.Makefile to enable parallel builds.
2025-05-01 22:42:32 -04: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
Harold Brenes 0746127654 Minor fixes in data type usage and style. 2025-04-30 22:16:53 -04:00
Harold Brenes 1505edef01 Change ivar offsets from u32 to (odin base type) int/native pointer size. 2025-04-30 22:09:33 -04:00
Harold Brenes dc8692b504 Use correct alignment value for class_addIvar. 2025-04-30 21:52:29 -04:00
Harold Brenes 998ed79738 Go back to objc_ivar_get instead of ivar_get. 2025-04-30 20:43:05 -04:00
Harold Brenes c2dfc4b749 Cleanup ivar generation for selector expressions.
Cleanup ObjC superclass resolution.
2025-04-30 20:32:34 -04:00
Harold Brenes abfbb2f9ed Use basic name instead of raw_name for type encoding complex and quats. 2025-04-30 20:32:28 -04:00
Harold Brenes 668a9a89b0 Complete lb_get_objc_type_encoding() implementation 2025-04-30 20:32:14 -04:00
Harold Brenes 5097e98da2 Better Objective-C object superclass cycle check 2025-04-30 20:32:05 -04:00
Harold Brenes 2dc5653fd1 Name fixes 2025-04-30 20:31:54 -04:00
Jeroen van Rijn 2d8ae2d23c Merge pull request #5100 from herohiralal/patch-1
Convention-related changes in `file_windows.odin`
2025-04-30 22:27:59 +02:00
Rohan Jadav f50698b901 updated file_windows.odin to follow coding conventions 2025-05-01 00:56:31 +05:30
Laytan dd0b8d5757 Merge pull request #5099 from laytan/add-alias-issue-tests-to-ci
adds the cases of #5043 and #5097 to the CI
2025-04-30 20:20:43 +02:00
Laytan Laats d2f8cb1306 adds the cases of #5043 and #5097 to the CI 2025-04-30 20:13:21 +02:00
Laytan Laats 396a18efce fix variable NaN comparisons 2025-04-30 20:04:24 +02:00
Laytan c74f777b1b Merge pull request #5097 from laytan/fix-pointer-alias-type-check
fixes assigning null as a type if it's an alias but the base type is null
2025-04-30 19:54:48 +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
Vincent Billet 125b60aee0 First implementation of XAudio2 2025-04-30 17:32:11 +02:00
gingerBill e64bcc7709 Merge pull request #5088 from leecommamichael/master
vendor:wasm/WebGL: Fix incorrect parameter types
2025-04-30 13:24:00 +01:00
Jeroen van Rijn b04a83ce9f Merge pull request #5096 from jdennis9/master
os2: Fix reading directory on Windows sometimes failing to decode a file name following one with exotic unicode characters
2025-04-30 12:10:09 +02:00
Jamie Dennis ff0eac2a71 os2: Use win32_wstring_to_utf8 over win32_utf16_to_utf8 when converting FIND_DATAW to File_Info 2025-04-30 21:38:17 +12:00
Michael Lee 757ae5e270 Merge branch 'odin-lang:master' into master 2025-04-29 17:11:10 -05:00
gingerBill 0de802d388 All N-valued (N>=2) expressions in or_else expressions 2025-04-29 17:39:28 +01:00
Vincent Billet d24bac8a36 Adding windows keyboard scan codes 2025-04-29 18:00:41 +02:00
Michael Lee 9c5fa073df Update webgl.odin 2025-04-29 10:52:11 -05:00
Jeroen van Rijn 7c294a6e55 Merge pull request #5090 from Barinzaya/cbor-fix-unmarshal-slice-overflow
Fixed CBOR Slice Overflow
2025-04-29 14:34:16 +02:00
Barinzaya 3f5e09a0df Fixed an overflow when decoding a large CBOR slice.
The initial allocation for the slice is limited to prevent untrusted
data from forcing a huge allocation, but then the dynamic array was
created with a capacity of the unlimited length, rather than the actual
capacity of the allocation. This was causing a buffer overrun.
2025-04-29 08:19:43 -04:00
gingerBill 03dcff59e8 Merge pull request #5089 from Lperlind/asan-docs
Document base:sanitizer
2025-04-29 13:19:00 +01:00
Lucas Perlind 4763da4b0d Document base:sanitizer 2025-04-29 19:06:09 +10:00
Michael Lee 808eec8e23 Fix incorrect parameter types 2025-04-28 20:24:41 -05:00