Laytan Laats
27f9f0ba17
fix OLS #431 , #393
2024-07-18 21:06:37 +02:00
Laytan Laats
2b6a926bb6
fix OLS #52
2024-07-18 21:06:37 +02:00
Laytan and GitHub
b3d798cb76
Merge pull request #3941 from laytan/wgpu-wayland-improvements
...
improve WGPU / GLFW / Wayland story by weak linking and adjusting docs
2024-07-18 20:20:01 +02:00
Laytan
7134015f56
improve WGPU / GLFW / Wayland story by weak linking and adjusting docs
2024-07-18 19:28:15 +02:00
Laytan and GitHub
cb16d2ddaf
Merge pull request #3934 from laytan/fix-saturating-intrinsics
...
fix `add_sat` and `sub_sat` intrinsics
2024-07-16 22:30:06 +02:00
Laytan Laats
a6d1a2e46c
add #optional_ok to docs file for intrinsics
2024-07-16 22:22:06 +02:00
Laytan Laats
47f14dd9ea
type is never a tuple here
2024-07-16 22:11:54 +02:00
Laytan Laats
853487e86c
fix add_sat and sub_sat intrinsics
2024-07-16 22:07:49 +02:00
Laytan Laats
28fac62a02
fix some bugs with -disable-assert
2024-07-16 18:44:18 +02:00
Laytan Laats
03426175ae
add workaround for kernel panics on MacOS
2024-07-15 22:45:16 +02:00
Laytan Laats
f362e0fa20
add test for leaking struct tag into elems
2024-07-15 19:27:48 +02:00
Laytan Laats
d4d910bcfc
fmt: fix optional_len or use_nul_termination being used by both array and elems
...
```odin
My_Struct :: struct {
names: [^]string `fmt:"v,name_count"`,
name_count: int,
}
main :: proc() {
name := "hello?"
foo := My_Struct {
names = &name,
name_count = 1,
}
fmt.println(foo)
}
```
Before: `My_Struct{names = ["h"], name_count = 1}`
After: `My_Struct{names = ["hello?"], name_count = 1}`
2024-07-15 18:51:18 +02:00
Laytan Laats
55e0f97cc4
help fmt with Type_Info_Struct and Type_Info_Bit_Field changes
2024-07-15 18:29:06 +02:00
Laytan Laats
d90d7ed002
Fix off-by-one in queue back and back_ptr procs
2024-07-14 16:00:55 +02:00
Laytan Laats
65ca03a930
make instrumentation "work" on wasm
...
Using instrumentation on WASM causes it to complain about the
llvm.returnaddress instrinsic. This PR could be considered a "hack" but
makes this work by just passing `nil` instead of the return address.
2024-07-11 01:57:00 +02:00
Laytan Laats
0dfc660c71
allow core:mem/virtual import on more targets by expanding the other implementation
2024-07-11 01:55:59 +02:00
Laytan Laats
40625b24e2
fix optimization mode, cold, and disabled not being applied to poly procs
2024-07-09 19:49:12 +02:00
Laytan Laats
1fce5791a1
fix require/enable target feature attribute on poly procs
2024-07-09 19:33:25 +02:00
Laytan Laats
2d8d0dd851
fix @(optimization_mode) usage in builtin collections
2024-07-08 21:07:53 +02:00
Laytan Laats
1a20b78633
remove misleading @(optimization_mode) values and make "none" inhibit optimizations
2024-07-08 21:06:57 +02:00
Laytan Laats
9ff77397c6
implement temporary_directory on non-windows
2024-07-08 18:58:17 +02:00
Laytan Laats
5dd89a29e6
ci: make releases use LLVM 18
...
Since we updated to LLVM 18 on Windows now, we should make the releases
for non-windows use LLVM 18 too, this way all releases use the same version.
2024-07-08 15:49:37 +02:00
Laytan Laats
ddad2011e2
darwin: remove syscall usage (without -no-crt) to comply to Apple guidelines
2024-07-08 15:39:23 +02:00
Laytan Laats
6ab559437a
encoding/cbor: add a custom tag to the example
2024-07-08 01:01:11 +02:00
Laytan Laats
db3b4ceb4a
encoding/cbor: improve perf of marshalling array-like types
2024-07-08 00:37:40 +02:00
Laytan Laats
39e9b65c59
encoding/cbor: fix umarshal of big fixed arrays
2024-07-08 00:35:19 +02:00
Laytan Laats
56856b6307
io: remove dead code in io.write_at_least
2024-07-08 00:33:50 +02:00
Laytan Laats
f66b7021a6
Fix not detecting duplicate proc cases
...
Fixes #3864
2024-07-05 00:50:52 +02:00
Laytan Laats
1bd9fe04c4
Fix assertion false positive
...
Assertion was added in #3855 - https://github.com/odin-lang/Odin/pull/3855/commits/723314909679b89e159cb4cb05d250d12ac64436
to mimic LLVM's own internal assertion for this, turns out their
assertion is more sophisticated than an `==` so lets just remove it.
To be clear their internal assertion is not hit while this one is, which
defeats the purpose of ours.
2024-07-04 23:55:21 +02:00
Laytan Laats
bcdb202639
vendor/fontstash: fix 'AddFont' proc group for JS target
2024-07-04 16:50:58 +02:00
Laytan Laats
761a50e145
vendor/wgpu: fix linker errors with empty project
2024-07-02 22:37:02 +02:00
Laytan Laats
5399093050
make preopens a slice and remove bad current_dir
2024-07-02 20:17:24 +02:00
Laytan Laats
0ef5191540
use slice.ptr_swap instead of alloca
2024-07-02 20:11:44 +02:00
Laytan Laats
10c68a8951
wasm: support vendor:stb/truetype and vendor:fontstash
2024-07-02 16:03:42 +02:00
Laytan Laats
4e18e1b191
wasi: make os.open work with absolute paths
2024-07-02 15:29:24 +02:00
Laytan Laats
6f1cc8071c
wasm: add foreign import and linking of wasm object files
2024-07-02 15:28:08 +02:00
Laytan Laats
7233149096
fix llvm assertion failure when const initializer is not the same type
2024-07-02 01:25:52 +02:00
Laytan Laats
c822f0b8c8
fix llvm assertion about metadata on non-instruction
2024-07-02 01:14:50 +02:00
Laytan Laats
ef6a73c7ef
fix not setting cc before using it in abi computations
2024-07-01 01:30:44 +02:00
Laytan Laats
e3dde8caf8
make structs with multiple fields always return indirect in wasm c abi
2024-07-01 00:50:10 +02:00
Laytan Laats
604551eb2d
wasi: make the demo run on wasi and run it in CI
2024-06-29 23:15:31 +02:00
Laytan Laats
fa5be93da2
re-raise signals from the odin run binary
2024-06-28 19:33:34 +02:00
Laytan Laats
b79d7e6917
disallow non-global foreign import of variables on wasm
2024-06-28 01:34:09 +02:00
Laytan Laats
1c199f52d6
tlsf: destroy first pool & properly zero memory
2024-06-27 19:27:07 +02:00
Laytan Laats
108b8feb35
Add vendor:wgpu
2024-06-12 17:22:02 +02:00
Laytan Laats
71929f737b
add forced shutdown to new test runner
...
Currently, a Ctrl+c starts a graceful shutdown of the tests and runner.
Sometimes tests get stuck and this would never complete.
This simply adds an extra step, if Ctrl+c is given for the second time,
just `os.exit` right away.
2024-06-10 15:35:23 +02:00
Laytan Laats
6d862cc4e5
fix unreachable hit when param and/or return have complex inits
...
Fixes #3630
2024-06-09 04:43:19 +02:00
Laytan Laats
3628154849
fix swizzle crash due to wrong alignment
...
Fixes #3691
2024-06-09 03:33:23 +02:00
Laytan Laats
9ad9236c3b
fix large ints amd64 sysv abi
...
Fixes #3707
2024-06-09 02:47:05 +02:00
Laytan Laats
00dfff7ee0
core/thread: fix a deadlock situation on unix
2024-06-07 20:28:09 +02:00
Laytan Laats
b35e72c82b
core/sync: fix wrong timeout calculation, time.Duration is ns already
2024-06-07 20:27:33 +02:00
Laytan Laats
072825ac5a
add MacOS 14.5 to 'core:sys/info' and 'odin report'
2024-06-07 17:42:41 +02:00
Laytan Laats
e627fcb0e6
fix not printing Error: when terminal has no color support
2024-06-07 16:58:23 +02:00
Laytan Laats
29250f2657
fix regression in test_issue_2395
2024-06-07 16:33:38 +02:00
Laytan Laats
9122c20d4b
update actions/checkout
2024-06-07 15:57:09 +02:00
Laytan Laats
0a528777e8
utilize odin test -all-packages instead of (make/bat) scripts for running tests
2024-06-07 15:50:00 +02:00
Laytan Laats
f2be35f1f0
remove caught unused define
2024-06-07 15:22:14 +02:00
Laytan Laats
ee93d7c05e
add error message for unknown test log level
...
It would previously just be a compilation error about a missing
return statement.
2024-06-07 15:13:09 +02:00
Laytan Laats
315695b4f8
collect and show docs of defineables
2024-06-07 15:08:41 +02:00
Laytan Laats
fa08690686
explicit integer conversions
2024-06-06 19:49:51 +02:00
Laytan Laats
b818a77131
check if -define is actually used
2024-06-06 19:46:01 +02:00
Laytan Laats
9a95049393
-show-defineables and -export-defineables
2024-06-06 19:44:54 +02:00
Laytan
e2eb3cdd8a
fix linking on weird linuxes
2024-06-06 19:23:36 +02:00
laytan
08382cb05d
orca windows
2024-06-05 19:28:40 +02:00
Laytan Laats
8455e159f5
improve orca target
2024-06-05 20:57:39 +02:00
Laytan Laats
dbaf1a1ce0
compile stb_vorbis
2024-06-04 20:26:21 +02:00
Laytan Laats
cd99625dd3
ci: compile needed libraries
2024-06-04 20:21:52 +02:00
laytan
2a526058b3
fix passing pointer to constant in non-odin cc
2024-06-04 20:15:47 +02:00
Laytan Laats
3e159736cd
use #exists to provide good errors for common missing libraries
2024-06-04 20:13:51 +02:00
Laytan Laats
b47a15733d
implement #exists(path)
2024-06-04 19:06:13 +02:00
Laytan Laats
4f5b2bd127
fix crash when you have 2 #load_directory calls with the same path
2024-06-04 19:01:50 +02:00
Laytan Laats
7d29389834
fix debug info IR error on LLVM < 13
2024-06-04 14:41:42 +02:00
Laytan Laats
8a521648b9
wasm: fix runtime.js even more for wasm64p32
...
- make the int size configurable in the `runWasm` call, no more
constants to hunt down and change
- make storeU64 and storeI64 handle bigints, this is needed in the
odin_dom library
- fix alignment issues within init_event_raw
2024-05-31 20:57:15 +02:00
Laytan Laats
3a0ec3d6a8
wasm: fix target wasm64p32 runtime procs
...
LLVM generates calls with `i32` regardless of target, so if a call to
any of these procs was generated this failed to compile.
I opted to fix by changing from `int` to `i32` on wasm64p32 and adding
`#any_int` so existing code keeps working.
2024-05-31 16:32:27 +02:00
Laytan Laats
6bbe7d88b8
microui: make clipboard optional during init
...
Clipboard is an optional addition to the microui functionality, but the
init function makes it look like it is required. Additionally, a bunch of
the examples both on the Odin-Lang/examples repo and others are now
"broken".
2024-05-30 16:19:33 +02:00
Laytan Laats
eeb057b76d
darwin: fix sysroot retrieval for some systems
...
Got a report on Discord that the current way didn't work for a user,
this change did work and I confirmed with @harold-b (who initially added
this) that it also works for them and is actually a better way.
2024-05-30 01:53:38 +02:00
Laytan Laats
692ca13ffd
wasm: fix the WheelEvent not storing data properly
...
A `WheelEvent` is also an instanceof `MouseEvent` so it was never
hitting the if statement for the `WheelEvent`.
2024-05-30 01:49:30 +02:00
Laytan Laats
5027cfb618
revert $(llvm-config --bindir)/clang++ to get the cpp compiler
...
A few reports of either people not having this clang++ or having it but
it not finding system headers. On top of that, the reason we added this
in the first place was a bug that surfaced on clang-18 which we've since
fixed.
Order will now be clang++ from path, then the llvm bindir clang++, then an
error.
This can all still be overwritten with `CXX=blah make` like before.
2024-05-26 20:11:07 +02:00
Laytan Laats
aa72050586
wasm: enable default temp allocator
...
After #3592 I think it makes sense to also enable the temp allocator by default
2024-05-24 15:01:02 +02:00
Laytan Laats
e08b51ed73
correctly load/store uint&int in the runtime.js for wasm64p32
2024-05-17 16:32:34 +02:00
Laytan Laats
f42b1c4973
add a default heap/general purpose allocator for wasm to base:runtime
2024-05-16 23:08:40 +02:00
Laytan
d7fdccb08c
fix a couple of -vet-style failures after f54977336b
2024-05-09 19:39:48 +02:00
Laytan
98827c867d
fix duplicate suggestions and add missing newline
2024-05-09 19:21:39 +02:00
Laytan Laats
9d1db48549
remove is_packed bodge
2024-05-07 17:25:17 +02:00
Laytan
b0b60fe7ed
fix segfault in release builds of the compiler with clang++-18
2024-05-07 16:52:46 +02:00
Laytan
87b099b5aa
fix merge conflict
2024-05-07 16:52:46 +02:00
Laytan Laats
77efdcd899
fix packed gep loads with wrong alignment
2024-05-07 16:52:46 +02:00
Laytan Laats
58c0abb98d
revert wrong approach in fixing the load alignment
2024-05-07 16:52:46 +02:00
Laytan
d93cc18dac
fix packed gep loads with wrong alignment
2024-05-07 16:52:46 +02:00
Laytan Laats
ecddf3b7f1
llvm-18: cleanup
2024-05-07 16:52:46 +02:00
Laytan Laats
a3821615dc
llvm-18: fix windows build error because of include
2024-05-07 16:52:46 +02:00
Laytan Laats
f9a7d2bf04
llvm-18: enable static map calls on non amd64sysv targets
2024-05-07 16:52:46 +02:00
Laytan
c219ca5b1b
llvm-18: fix undocumented breaking change on i128 alignment
2024-05-07 16:52:46 +02:00
Laytan Laats
f64e8ffd64
llvm-18: fix linking the compiler with clang-18
2024-05-07 16:52:46 +02:00
Laytan Laats
e3e04ffa22
llvm-18: enable sroa and static map calls
2024-05-07 16:52:46 +02:00
Laytan
043dd98e91
fix demo out of bounds error
2024-05-07 16:52:46 +02:00
Laytan
b91e7f5c51
llvm-18: linux (amd64)
2024-05-07 16:52:46 +02:00
Laytan Laats
bb58926b7a
llvm 18: general unix and darwin specifics
2024-05-07 16:52:46 +02:00
Laytan Laats
eaab17f8fb
sys/linux: fix open bits
2024-05-05 14:16:21 +02:00
Laytan Laats
ee818304f3
fix invalid JSON when an error does not have a position
2024-05-05 00:01:14 +02:00