Commit Graph

14331 Commits

Author SHA1 Message Date
Yawning Angel 1f3107e693 core/crypto/chacha20: Use 128-bit/256-bit SIMD 2024-08-10 18:32:37 +09:00
Yawning Angel 708f053fe6 core/crypto/aes: Use NIST terminology for the IV 2024-08-10 18:32:37 +09:00
Yawning Angel ac7f44b1b8 core/crypto/aes: Slightly tweak GHASH to look less spooky 2024-08-10 18:32:37 +09:00
Yawning Angel b1d6e4139e core/crypto/aes: Disable bounds checking for the CTR loops 2024-08-10 18:32:37 +09:00
Yawning Angel dfc4df9807 core/crypto/_aes/hw_intel: Use a constant for the PSHUFB indicies 2024-08-10 18:32:37 +09:00
Yawning Angel b9293334ca core/crypto/ed25519: Rename a member for clarity
This better matches the spec.
2024-08-10 18:32:37 +09:00
Yawning Angel b68311d777 core/crypto/hash: Make the _to_buffer routines return the hash slice
Quality of life improvement.
2024-08-10 18:32:37 +09:00
Yawning Angel c0f9655ec4 test/core/crypto: Minor changes to AES related tests
- Test against the non-standard GCM nonce length vectors
- Fix the CTR mode test to match the comment

Correctness was fine without this change.
2024-08-10 18:32:37 +09:00
IllusionMan1212 7875e4a1ab vendor/egl: added a few more egl procedures and constants 2024-08-10 10:21:03 +02:00
Jeroen van Rijn be7a1f671c Revert "Add time.precise_clock_from_time + time.precise_clock_from_duration"
This reverts commit c9ca192f33.
2024-08-10 03:26:09 +02:00
Jeroen van Rijn c9ca192f33 Add time.precise_clock_from_time + time.precise_clock_from_duration 2024-08-10 03:23:08 +02:00
Feoramund e7e7fe766a Add test for misaligned data to core:simd/util suite 2024-08-09 18:54:04 -04:00
Feoramund 0d29cc3375 Use for x in y construct for bytes iteration
This cannot be applied to the `strings` version, as that would cause a
rune-by-rune iteration, not a byte-by-byte one.
2024-08-09 18:54:04 -04:00
Feoramund c8a62ee4ec Make simd_util index procs contextless where applicable 2024-08-09 18:54:04 -04:00
Feoramund 12dd0cb72a Simplify and make simd_util cross-platform
This new algorithm uses a Scalar->Vector->Scalar iteration loop which
requires no masking off of any incomplete data chunks.

Also, the width was reduced to 32 bytes instead of 64, as I found this
to be about as fast as the previous 64-byte x86 version.
2024-08-09 18:54:04 -04:00
Laytan Laats 912f99abc8 encoding/cbor: various fixes
- "null" is the proper way to represent the nil value in the diagnostic
  format
- hex encoding in diagnostic format was wrong
- struct keys weren't sorted the right deterministic way
2024-08-09 21:56:54 +02:00
jason baacc512e3 fix child pipe in process_start 2024-08-09 15:21:11 -04:00
Jeroen van Rijn c5ed7083d2 Disable NetBSD CI 2024-08-09 19:44:51 +02:00
Jeroen van Rijn d69e0bfa00 NetBSD vm fix. 2024-08-09 19:37:26 +02:00
Jeroen van Rijn fa6f343261 Remove unused import. 2024-08-09 19:06:50 +02:00
jason c4d43bbab0 os2 linux process_wait rework; add Sig_Child_Code to sys/linux bits 2024-08-09 09:16:44 -04:00
Jeroen van Rijn cc24d2de3e Merge pull request #3810 from Feoramund/freebsd-core-net
Port `core:net` to FreeBSD
2024-08-09 09:50:05 +02:00
Jeroen van Rijn bc6deab175 echo -> printf for build_odin.sh message 2024-08-09 09:46:45 +02:00
Laytan b5a612202f Merge pull request #4036 from laytan/master
add debug build message and align more with build.bat
2024-08-08 22:21:17 +02:00
Jeroen van Rijn 1e09ff3b2e Merge pull request #4043 from Kelimion/expect_leak_or_bad_free
Allow testing for intentional leaks in test runner
2024-08-08 21:40:17 +02:00
Jeroen van Rijn 933f9f9bd1 Enable test leak = fatal on CI. 2024-08-08 21:31:30 +02:00
Jeroen van Rijn b82cfc5f15 Fix shoco heisenleak 2024-08-08 21:15:59 +02:00
Jeroen van Rijn a05b73c632 Keep -vet happy when mem tracking is disabled. 2024-08-08 21:02:35 +02:00
Jeroen van Rijn 4d27898418 Use test runner's own tracking allocator. 2024-08-08 20:58:25 +02:00
Jeroen van Rijn 80d1e1ba82 Allow testing for intentional leaks in test runner
Adds `expect_leak_or_bad_free :: proc(t: ^T, client_test: proc(t: ^T), verifier: Memory_Verifier_Proc)`.

It sets up its own `Tracking_Allocator`, runs the `client_test`, and then calls the `verifier` procedure.
The verifier can then inspect the contents of the tracking allocator and call `testing.expect*` as sensible for the test in question.

Any allocations are then cleared so that the test runner doesn't itself complain about leaks.

Additionally, `ODIN_TEST_LOG_LEVEL_MEMORY` has been added as a define to set the severity of the test runner's memory tracker. You can use `-define:ODIN_TEST_LOG_LEVEL_MEMORY=error` to make tests fail rather than warn if leaks or bad frees have been found.
2024-08-08 20:41:32 +02:00
Roland Kovacs dda89a69bf Check if procedure parameter type declares polymorphic args
When a procedure parameter's type was declared in an imported package the type
checker correctly resolved to the parametric type, but it did not check if the
expression that refers to that type conforms to a polymorphic type declaration.

This error was not detected if the procedure was unused, since it was marked as
polymorphic, where further type check is done on instantiation.
2024-08-08 19:50:05 +02:00
Jeroen van Rijn f328929939 Merge pull request #4038 from Hyrtwol/core-sys-windows-rawinput-code
Core sys windows rawinput code
2024-08-08 18:23:02 +02:00
Thomas la Cour 3d0519fe6c trim whitespace 2024-08-08 18:05:41 +02:00
Thomas la Cour a4eeb6ed02 rawinput code 2024-08-08 18:03:59 +02:00
Jeroen van Rijn 94c62fb630 Fix typo. 2024-08-08 18:01:09 +02:00
Jeroen van Rijn a7fe9eec73 Merge pull request #4037 from Kelimion/symlink_test
Allow symlink test to work irrespective of git settings.
2024-08-08 17:56:05 +02:00
Jeroen van Rijn d93f3c63d8 Rename package to test_core_os to fit with the rest of test_* 2024-08-08 17:49:08 +02:00
Jeroen van Rijn ada3df303e Allow symlink test to work irrespective of git settings. 2024-08-08 17:46:00 +02:00
Laytan Laats 8b98fff98e add debug build message and align more with build.bat
1. if ran without choosing a build type (just `make` or
   `build_odin.sh`), print out a message about it being a debug build
2. Add `make release-native` alongside `make release_native` to align
   with `build_odin.sh release-native`
3. Only run the demo if it is a debug build (just like `build.bat`)
2024-08-08 15:33:40 +02:00
jason c3ba8fbd09 add child pipe for reporting post-fork errors 2024-08-08 08:56:29 -04:00
Jeroen van Rijn 4b9ca39522 Merge pull request #4035 from karl-zylinski/build-release-hint
Added a hint at end of build.bat about release mode when building in debug mode
2024-08-08 14:48:48 +02:00
Karl Zylinski 26633bbce6 Added a hint at end of build.bat about release mode when building in debug mode. 2024-08-08 14:15:32 +02:00
jason 9625798513 merge commit 2024-08-07 23:27:45 -04:00
Jeroen van Rijn 796feeead9 Remove LLVM copy from nightly. 2024-08-07 22:12:23 +02:00
Jeroen van Rijn 2bf055ec6e Delete empty file after access check. 2024-08-07 19:38:36 +02:00
Laytan Laats c9b69d76b0 text/edit: fix undo_state_push wrong builder check 2024-08-07 17:21:56 +02:00
Jeroen van Rijn 69a15ca5b6 Don't copy LLVM shared object on Linux
We copy the LLVM shared object when building Odin on Linux. Contrary the comment in `build_odin.sh`,
this is unnecessary, and Odin can be compiled and itself compile things just fine without this step.

This is then packaged up at release and leads to #4019 and #4033. The Linux release builds are built
on Ubuntu and not strictly supported on other Linux distributions. Building from source is preferred.
2024-08-07 14:50:45 +02:00
Laytan Laats 6fe938b946 darwin: add setAllowedFileTypes binding for open panels 2024-08-06 21:42:33 +02:00
Laytan Laats e5a478d393 wgpu: fix examples after changing color to an array 2024-08-06 21:42:33 +02:00
Feoramund 793811b219 Add simd_util to examples/all 2024-08-06 15:19:05 -04:00