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
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
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
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
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
gingerBill
39d557bcb4
Merge pull request #4032 from Feoramund/fix-intrinsic-wording
...
Fix SIMD intrinsics wording
2024-08-06 20:13:10 +01:00
Feoramund
e27a424f4d
Swap reduce_any and reduce_all
...
`llvm.vector.reduce.or` will return true if any lane is true.
`llvm.vector.reduce.and` will return true if all lanes are true.
2024-08-06 14:50:34 -04:00
Feoramund
7a367c9c08
Fix documented names of a few SIMD procedures
2024-08-06 14:49:56 -04:00
Laytan
4423aac3de
Merge pull request #4031 from RilleP/bit-field-closing-brace-fix
...
Fix missing closing brace for Bit_Field in core:odin/parser
2024-08-06 20:49:49 +02:00
gingerBill
94ded29b5f
Merge pull request #4030 from Kelimion/struct_field_count
...
Add `reflect.struct_field_count` that returns the number of fields in a struct type
2024-08-06 18:56:24 +01:00
Rikard Petré
6a6f078186
Fix missing closing brace for Bit_Field in core:odin/parser
2024-08-06 19:48:38 +02:00
gingerBill
bed18a17e6
Bodge: Improve aligned_resize logic
2024-08-06 11:22:34 +01:00
Jeroen van Rijn
17ebaffce8
Update comment.
2024-08-05 22:12:22 +02:00
Jeroen van Rijn
4902288a5a
Add reflect.struct_field_count that returns the number of fields in a struct type
...
Example:
```odin
package struct_count_example
import "core:fmt"
import "core:reflect"
import "core:dynlib"
Foo :: struct{
one: int,
two: f32,
}
Bar :: struct {
three: int,
four: bool,
five: f64,
}
Game_Api :: struct {
init: proc(api: ^Game_Api),
update: proc(api: ^Game_Api),
using foo: Foo,
bar: Bar,
// Private stuff
reload_count: int,
__handle: rawptr,
}
API_PRIVATE_COUNT :: 2
game_api: Game_Api
main :: proc() {
fmt.printfln("Game_Api, .Top: %v", reflect.struct_field_count(Game_Api)) // 6
fmt.printfln("Game_Api, .Using: %v", reflect.struct_field_count(Game_Api, .Using)) // 8
fmt.printfln("Game_Api, .Recursive: %v", reflect.struct_field_count(Game_Api, .Recursive)) // 11
symbols_loaded, _ := dynlib.initialize_symbols(&game_api, "game.dll")
symbols_expected := reflect.struct_field_count(Game_Api) - API_PRIVATE_COUNT
if symbols_loaded == -1 {
fmt.eprintln("Couldn't load game.dll")
return
} else if symbols_loaded != symbols_expected {
fmt.eprintfln("Expected %v symbols, got %v", symbols_expected, symbols_loaded)
return
}
}
```
2024-08-05 22:04:16 +02:00
Laytan
a1c3c38f04
Merge pull request #4029 from Feoramund/fix-darwin-sigpipe-send
...
Prevent `SIGPIPE` on Darwin when writing to a closed `core:net` socket
2024-08-05 19:26:16 +02:00
Feoramund
4c0ab09c9a
Handle EPIPE in Darwin core:net
2024-08-05 13:15:08 -04:00
Feoramund
6cc7f3b451
Add FreeBSD Accept_Error.Would_Block alias
2024-08-05 13:00:44 -04:00
Feoramund
3512d7c672
Move Darwin MSG_NOSIGNAL to core:os
2024-08-05 12:49:12 -04:00
Feoramund
eba0774bf3
Prevent SIGPIPE on Darwin when writing to a closed core:net socket
...
Mimics behavior found on Linux implementation.
2024-08-05 12:23:09 -04:00
gingerBill
7c3461b0df
Merge pull request #4028 from Kelimion/fix-4026
...
Fix crash if referencing import "aliased" in other file.
2024-08-05 16:57:58 +01:00
Jeroen van Rijn
2cc3795686
Merge pull request #4027 from karl-zylinski/blend-pixel-compile-fix
...
Fix for blend_pixel.odin in core/image/common.odin not compiling
2024-08-05 17:38:30 +02:00
Karl Zylinski
b63657d293
Fix for blend_pixel.odin in core/image/common.odin not compiling
2024-08-05 17:23:58 +02:00
Jeroen van Rijn
6175efde3d
Fix crash if referencing import "aliased" in other file.
...
Fixes #4026
2024-08-05 17:23:50 +02:00
Jeroen van Rijn
030220eb22
Merge pull request #4025 from karl-zylinski/patch-2
...
core/image/common.odin compile fix
2024-08-05 16:42:09 +02:00
Karl Zylinski
2d32b819dc
common.odin compile fix
...
Fix for "Error: Prefer to separate 'where' clauses with a comma rather than '&&'"
2024-08-05 16:32:34 +02:00
gingerBill
f56abf3780
Add intrinsics.masked_expand_load and intrinsics.masked_compress_store
2024-08-05 14:54:09 +01:00
gingerBill
78919f8524
Fix typos
2024-08-05 14:48:55 +01:00
gingerBill
80ea4e0aeb
Remove dead code
2024-08-05 14:25:33 +01:00