Commit Graph

11233 Commits

Author SHA1 Message Date
Feoramund
1128bd1d7f Use syscall_bsd on NetBSD 2024-06-12 13:34:36 -04:00
Feoramund
20c32c807d Fix info.init_os_version on FreeBSD
It's possible for the return string to be longer than 128 characters
these days, so I've increased it to 1024, same as the other BSDs.

SYSCTL was otherwise erring out due to lack of buffer space.
2024-06-12 13:10:19 -04:00
Feoramund
5b5402fb23 Add intrinsics.syscall_bsd
This is a BSD-style syscall that checks for a high Carry Flag as the
error state. If the CF is high, the boolean return value is false, and
if it is low (no errors) then the boolean return value is true.
2024-06-12 13:07:13 -04:00
gingerBill
35a845b93f Fix indentation 2024-06-11 13:12:41 +01:00
gingerBill
3ff8952813 Replace panic(fmt.tprintf( antipattern with fmt.panicf 2024-06-11 13:11:14 +01:00
gingerBill
56c5e93fd1 Merge pull request #3728 from Feoramund/mem-any-int
Use `#any_int` for `reserve_*` and `resize_*` procs
2024-06-11 12:52:50 +01:00
gingerBill
39b166edd3 Merge pull request #3733 from Feoramund/ci-freebsd
Add FreeBSD to the CI
2024-06-11 12:51:42 +01:00
gingerBill
eaf1d88287 Merge pull request #3734 from Feoramund/fix-3730
Fix #3730
2024-06-11 12:50:41 +01:00
gingerBill
1dc90103bd Make verification ignorable with a define flag 2024-06-11 12:30:24 +01:00
gingerBill
0b02c67cdf Minor clean up for backend 2024-06-11 12:19:52 +01:00
gingerBill
9b0e87544a Unify LLVMVerifyFunction invocations into on place 2024-06-11 12:07:22 +01:00
Feoramund
61c630bbf8 Fix #3730 2024-06-11 05:23:43 -04:00
Feoramund
0e6bcd0dbb Add FreeBSD to CI 2024-06-11 04:16:42 -04:00
Feoramund
fc88de12c2 Implement absolute_path_from_handle for FreeBSD 2024-06-11 04:16:42 -04:00
Feoramund
a3da796d54 Fix file_size on FreeBSD
It was using the generic UNIX `fstat` implemented in Odin, which is more
than what is needed here.

This also avoids the issue of needing a proper
`absolute_path_from_handle` implementation for it to work without error.
2024-06-11 03:55:41 -04:00
Feoramund
40e99ebb10 Fix file open O_* flags on FreeBSD 2024-06-11 03:55:41 -04:00
Feoramund
c68560c573 Use correct __error link name for FreeBSD 2024-06-11 03:55:41 -04:00
Feoramund
76292c8ed5 Forbid all BSDs from running core:net tests
`net` is not yet implemented on them.
2024-06-11 03:55:41 -04:00
Feoramund
50464bdce3 Use #any_int for reserve_* and resize_* procs
Resolves #3088
2024-06-10 20:51:58 -04:00
gingerBill
f1779c85de Fix #3727 2024-06-10 18:50:53 +01:00
gingerBill
903e254e36 Merge pull request #3725 from laytan/add-forced-shutdown-to-test-runner
add forced shutdown to new test runner
2024-06-10 15:08:09 +01:00
gingerBill
eef2aef021 Fix #3724 2024-06-10 15:07:45 +01:00
gingerBill
c1e81dc14d Fix #3726 2024-06-10 15:05:24 +01:00
gingerBill
fa3cae2bb0 Add intrinsics.procedure_of
```odin
foo :: proc(x: $T) { fmt.println(x) }
bar :: intrinsics.procedure_of(foo(int(123))) // parameters are never ran at compile time, similar to `size_of`
bar(333) // prints 333
```
2024-06-10 15:02:34 +01: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
gingerBill
1945218f6d Improve parsing for label: #reverse for and label: #partial switch 2024-06-10 14:18:33 +01:00
Jeroen van Rijn
bedeaa34d9 Merge pull request #3723 from Feoramund/use-final-march
Use `get_final_microarchitecture()` for `ODIN_MICROARCH_STRING`
2024-06-10 11:40:01 +02:00
Feoramund
71a812e7fe Use get_final_microarchitecture() for ODIN_MICROARCH_STRING 2024-06-10 05:30:16 -04:00
Jeroen van Rijn
741ee00b64 Merge pull request #3721 from Feoramund/add-tuning-consts
Add compilation-related constants
2024-06-10 10:31:12 +02:00
Jeroen van Rijn
d3ae70264e Merge pull request #3720 from Feoramund/fix-force-inline-err-typo
Fix typo in a `#force_inline` error message
2024-06-10 10:25:09 +02:00
Jeroen van Rijn
c8b376f07f Merge pull request #3719 from Feoramund/fix-orbranch-error
Fix `or_or_<branch>` error message
2024-06-10 10:21:05 +02:00
Feoramund
ff7fcb6d38 Add compilation-related constants
`ODIN_VERSION_HASH` is the `git` SHA hash of the commit the Odin
compiler was built with.

`ODIN_MICROARCH_STRING` is the string passed to `-microarch` when
the program was built.

`ODIN_OPTIMIZATION_MODE` is an enum value of which optimization mode was
used to build the program.
2024-06-10 03:47:20 -04:00
Feoramund
45d1328a85 Fix typo in a #force_inline error message 2024-06-10 00:50:16 -04:00
Feoramund
8702bf00d5 Remove _ in Syntax_Error verbose message 2024-06-09 22:47:43 -04:00
Feoramund
9d28f2e18c Fix or_or_<branch> error messages 2024-06-09 22:46:45 -04:00
Jeroen van Rijn
5985c6e3df Merge pull request #3718 from Feoramund/add-missing-big-atoi-alias
Add missing `string_to_int` alias in `core:math/big`
2024-06-10 03:58:56 +02:00
Jeroen van Rijn
82e2d1916f Merge pull request #3717 from Feoramund/big-combo
Add permutation & combination procs to `core:math/big`
2024-06-10 03:47:55 +02:00
Feoramund
70820c2c40 Add missing string_to_int alias in core:math/big 2024-06-09 21:42:31 -04:00
Feoramund
fe5c278fca Add test for core:math/big permutation & combination procs 2024-06-09 20:42:09 -04:00
Feoramund
f0d65112b8 Rename math/big test package
This is in line with the other tests, and it does not seem to affect
building the library.
2024-06-09 20:42:07 -04:00
Feoramund
5fbd876db1 Add permutation & combination procedures to core:math/big 2024-06-09 20:42:04 -04:00
Jeroen van Rijn
4ea593bde0 Merge pull request #3716 from Feoramund/slice-permute
Add in-place permutation iterator to `core:slice`
2024-06-09 22:42:43 +02:00
Feoramund
047b505836 Add test for slice.permute 2024-06-09 16:15:43 -04:00
Feoramund
1f64d8d5bd Add slice.permute 2024-06-09 16:15:41 -04:00
gingerBill
7c529e990d Add -target:freestanding_arm32 (experimental) 2024-06-09 17:48:46 +01:00
gingerBill
828870004b Change indentation 2024-06-09 17:15:08 +01:00
Jeroen van Rijn
7e60e21934 Merge pull request #3714 from Kelimion/png_cleanup
PNG cleanup
2024-06-09 18:09:17 +02:00
Jeroen van Rijn
5be7d8e32d Clean up PNG code. 2024-06-09 17:59:59 +02:00
Jeroen van Rijn
fc2ba81be0 Merge branch 'master' into png_cleanup 2024-06-09 17:13:43 +02:00
gingerBill
edcbca51c3 Merge pull request #3684 from odin-lang/tlsf-allocator
`core:mem/tlsf` - "Two-Level Segregated Fit" memory allocator
2024-06-09 15:54:46 +01:00