Commit Graph

11546 Commits

Author SHA1 Message Date
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
gingerBill
5637ed9ecd Merge pull request #3836 from laytan/run-wasi-demo-in-ci
wasi: make the demo run on wasi and run it in CI
2024-06-29 22:30:31 +01:00
Laytan Laats
604551eb2d wasi: make the demo run on wasi and run it in CI 2024-06-29 23:15:31 +02:00
Jeroen van Rijn
476d0087c8 Fix bug in div3 fast path. 2024-06-29 23:14:12 +02:00
gingerBill
34fce83d66 Improve -strict-style rules for if-else statements 2024-06-29 20:04:34 +01:00
gingerBill
b1a1da6618 Add -vet-tabs 2024-06-29 19:54:31 +01:00
gingerBill
e296d6fb90 Fix loads of indentation issues with mixing spaces and tabs 2024-06-29 19:50:51 +01:00
gingerBill
90244a0849 Fix accidental deletion in the -strict-style help comment 2024-06-29 19:41:45 +01:00
gingerBill
f4abdf716e Move microarch stuff to a separate file 2024-06-29 19:29:20 +01:00
gingerBill
f64d1df90b Add note regarding -strict-style 2024-06-29 19:27:26 +01:00
gingerBill
888bf28076 -strict-style implies -disallow-do 2024-06-29 19:26:11 +01:00
gingerBill
103eccf104 More style improvements 2024-06-29 19:23:58 +01:00
gingerBill
663661db53 Update core to -strict-style 2024-06-29 19:16:32 +01:00
gingerBill
835e8bf87a Update -strict-style 2024-06-29 19:15:33 +01:00
gingerBill
2187f3e7ff -strict-style enforce 1TBS (mostly) 2024-06-29 19:14:24 +01:00
gingerBill
5413a8b744 Even more style fixes 2024-06-29 19:11:36 +01:00
gingerBill
3f9a58808c More style improvements 2024-06-29 19:07:34 +01:00
gingerBill
e8517e2694 -strict-style: enforce case to be in the same column as switch 2024-06-29 18:56:45 +01:00
gingerBill
96330996a6 Fix indentation 2024-06-29 18:51:39 +01:00
gingerBill
b0cbda4ee0 Fix indentation of tests 2024-06-29 18:51:28 +01:00
gingerBill
930c929294 Indentation fixes 2024-06-29 18:49:57 +01:00
gingerBill
7f05b4caf2 Fix generation for unicode entities 2024-06-29 18:43:09 +01:00
gingerBill
6db748b4a4 Remove debug message 2024-06-29 16:18:43 +01:00
gingerBill
a935ade0d2 Keep -sanitize:address happy with bit_field loads 2024-06-29 16:18:07 +01:00
gingerBill
ff2d042313 Remove unneeded transmute 2024-06-29 13:54:15 +01:00
gingerBill
913c08a33e Add bit_field to demo.odin 2024-06-29 12:56:46 +01:00
gingerBill
c88a1bef91 Add another -vet-cast check 2024-06-29 12:40:04 +01:00
gingerBill
706adb1232 Update for transmute -vet-cast 2024-06-29 12:16:43 +01:00
gingerBill
b9861a0cf6 cast to transmute 2024-06-29 12:14:21 +01:00
gingerBill
e46d772b6d Add check for integer casts 2024-06-29 12:13:41 +01:00
gingerBill
c18c0a3364 Adhere to -vet-cast 2024-06-29 12:07:21 +01:00
gingerBill
d6b8544f50 Add internal flag for testing stuff 2024-06-29 12:04:31 +01:00
gingerBill
4b71c47fd5 Check for unneeded transmute with -vet-cast 2024-06-29 12:02:31 +01:00
gingerBill
704530497b Rename -vet-identical-cast to -vet-cast; with minor code clean up 2024-06-29 11:44:45 +01:00
gingerBill
4be0fc05bb Merge pull request #3832 from Feoramund/vet-identical-cast
Add `-vet-identical-cast`
2024-06-29 11:37:35 +01:00
gingerBill
52aa7085e4 Use f32 as the immediate type for addition and subtraction for complex32/quaternion64 2024-06-29 11:09:54 +01:00
gingerBill
9113f389d8 Merge pull request #3831 from Feoramund/fix-darwin-test-runner-cancel
Let Darwin safely panic in a test
2024-06-29 11:01:01 +01:00
gingerBill
55e9b8d994 Use explicit calling conventions 2024-06-29 10:48:41 +01:00
gingerBill
ee2a0c4010 Merge branch 'master' of https://github.com/odin-lang/Odin 2024-06-29 10:47:15 +01:00
gingerBill
f974002839 Use f32 operations rather than f16 in complex32 and quaternion64 to improve accuracy and performance 2024-06-29 10:47:09 +01:00
gingerBill
83b575aec2 Merge pull request #3833 from karl-zylinski/consistent-default-dynamic-array-capacity
Consistent dynamic array default capacity and avoid unnecessary dynamic array allocations
2024-06-29 10:38:22 +01:00
gingerBill
906afa4154 Allow for when x in y { (minor oversight in syntax) 2024-06-29 10:13:15 +01:00
Karl Zylinski
679f9b4e41 Made default capacity of dynamic arrays more consistent.
Before this if you do `arr: [dynamic]int` and then append to arr, then it will have capacity 8.
But if you did `arr := make([dynamic]int, context.temp_allocator)` then arr would have capacity 16.

Now both `arr: [dynamic]int` and `arr := make([dynamic]int, context.temp_allocator)` will resut in arr having zero 0. The only reason to use `make` without an explicit len or cap now is because you want to set it up for a non-default allocator. After the first call to `append` it will now in both cases have capacity 8.

I also updated the documentation on the strings builder, both to reflect this, and also to fix it incorrectly saying that len would be 'max(16,len)', which wasn't true even before these changes.
2024-06-29 08:57:21 +02:00
Feoramund
b3caae6db4 Keep -vet happy 2024-06-28 23:14:03 -04:00
Feoramund
6496432b80 Add -vet-identical-cast 2024-06-28 23:14:03 -04:00
Feoramund
0ea0fac2f9 Call pthread_cancel on Darwin, with advisory comment 2024-06-28 20:47:37 -04:00
Feoramund
13539d3be1 Catch SIGTRAP in the test runner
Fixes `panic` for Darwin.
2024-06-28 19:43:03 -04:00
Feoramund
929cc48703 Merge Darwin signals into other UNIX-likes
They're all the same.
2024-06-28 19:03:43 -04:00
Jeroen van Rijn
06652bebce Merge pull request #3829 from Feoramund/fix-vetted-test-name
Let `-vet` be used with `-define:ODIN_TEST_NAMES`
2024-06-28 23:06:25 +02:00