Commit Graph

4823 Commits

Author SHA1 Message Date
Feoramund
edb685f04b Add package core:flags 2024-06-07 13:16:13 -04:00
Jeroen van Rijn
678fdae966 Rebased. 2024-06-06 16:32:18 +02:00
gingerBill
3a9b86628a Add @(rodata) and @(static, rodata) where appropriate 2024-06-06 15:23:52 +01:00
gingerBill
a73741d3b7 Merge pull request #3690 from laytan/orcas
Runtime support for orca
2024-06-06 11:03:51 +01:00
Laytan Laats
8455e159f5 improve orca target 2024-06-05 20:57:39 +02:00
gingerBill
a747e47582 Merge pull request #3675 from Feoramund/fix-partial-infinity
Fix partial parsing of `infinity`
2024-06-05 12:48:44 +01:00
gingerBill
e7190aab41 Merge pull request #3681 from andreas-jonsson/netbsd-lwp-self
Proper thread identification on NetBSD
2024-06-05 12:47:23 +01:00
Andreas T Jonsson
929437c7bc Fixed broken import 2024-06-05 11:17:13 +02:00
Andreas T Jonsson
ed6667ebf2 Propper thread identification on NetBSD 2024-06-05 11:06:14 +02:00
Jeroen van Rijn
c406bbb6e3 Merge pull request #3679 from Feoramund/fix-typos
Fix some typos
2024-06-05 09:30:10 +02:00
Feoramund
b2f9f0af68 Fix some typos 2024-06-04 19:01:30 -04:00
Feoramund
25feff3eb4 Permit parsing of incomplete infinity but do not return true
To clarify, `parse_f64` will indeed take `infi` to mean `+Inf` and
return that as the value, but it will not return `ok = true`. It treats
it as `inf` followed by any other trailing character.

`parse_f64_prefix` is the lenient one which will return true so long as
it finds some meaningful value.
2024-06-04 18:55:13 -04:00
Jeroen van Rijn
f0a6fb4057 Merge pull request #3678 from Feoramund/fix-p-f64-p-doc
Strike incorrect note from `parse_f64_prefix` doc
2024-06-05 00:02:34 +02:00
Feoramund
b4cfae222c Strike incorrect note from parse_f64_prefix doc 2024-06-04 17:50:19 -04:00
Feoramund
265e6aa781 Add parse_complex/quaternion* to core:strconv 2024-06-04 17:12:55 -04:00
Feoramund
d33668fa91 Fix partial parsing of "infinity" in parse_f64_prefix
It was previously reporting an invalid number of characters parsed for
any string other than "inf", "+inf", or "-inf".
2024-06-04 13:24:46 -04:00
Jeroen van Rijn
f9d59ef6d4 Merge branch 'master' into fix-fmt-compquat-sign 2024-06-04 13:25:57 +02:00
Jeroen van Rijn
c3b94b9e1d Merge pull request #3646 from Feoramund/multi-test
Refactor the test runner
2024-06-04 13:23:52 +02:00
Jeroen van Rijn
50374d9396 Merge pull request #3640 from harold-b/fix-darwin-libc-open
Fix open() foreign libc signature on Darwin
2024-06-04 10:54:08 +02:00
Feoramund
eb93779f63 Fix duplicate sign printing of complex and quaternion types
Negative zero wasn't being detected (so it would appear as `+-0`), and
`+Inf` was appearing as `++Inf` when imaginary.
2024-06-03 19:51:17 -04:00
Jeroen van Rijn
36627d7d29 Merge pull request #3666 from Feoramund/add-missing-compquat
Add missing `Raw_*` complex and quaternion types
2024-06-04 01:28:18 +02:00
gingerBill
0ef0894213 Fix to bl.tok = path 2024-06-03 22:55:24 +01:00
gingerBill
4dac577caa Add attributes to Foreign_Import_Decl in clone 2024-06-03 22:21:54 +01:00
gingerBill
8e9716ea2f Add ast.Foreign_Import_Decl to ast.clone 2024-06-03 22:20:39 +01:00
Feoramund
d7f6def8ad Add aliases for Raw_* complex/quaternion types into core:mem 2024-06-03 17:18:27 -04:00
gingerBill
50b4a63fe1 Add ast.Foreign_Impot_Decl.fullpaths to walk.odin 2024-06-03 22:02:35 +01:00
Feoramund
88598c2c64 Make use of runtime.Raw_* types in core:math/linalg 2024-06-03 15:58:33 -04:00
Feoramund
4e1dd4ced2 Move Raw_Complex/Quaternion types to base:runtime 2024-06-03 15:40:28 -04:00
Laurent Dufresne
1617060f46 Fix type of two Win32 functions 2024-06-03 20:41:31 +02:00
Feoramund
0ff130d82b Fix ad hoc printf in test runner signal handler 2024-06-02 23:36:04 -04:00
Feoramund
fa29974dab Use Warning log level for reporting memory leaks
Works well with `-define:ODIN_TEST_LOG_LEVEL=warning`.
2024-06-02 23:21:44 -04:00
Feoramund
7764ab2ab0 Prevent test runner deadlock on NetBSD
Add `pthread_testcancel` to `core:sys/unix`
2024-06-02 21:27:36 -04:00
Feoramund
6a5633df2d Fix wrong PTHREAD_CANCEL_ASYNCHRONOUS on FreeBSD and OpenBSD
The test runner was deadlocking when a test raised a signal on FreeBSD.

This is untested on OpenBSD, but I have referenced this file:
https://github.com/openbsd/src/blob/master/include/pthread.h
2024-06-02 20:41:25 -04:00
Feoramund
ac9484206b Fix STDIN, STDOUT, STDERR handles for BSDs
Tested on FreeBSD 14.0 and NetBSD 10.0

OpenBSD is untested, but link names were sourced from:
https://github.com/openbsd/src/blob/master/include/stdio.h

According to this, OpenBSD shares the same layout as NetBSD.

FreeBSD has the same as Darwin in this regard.
2024-06-02 19:29:27 -04:00
Feoramund
f77ce359ce Be pedantic about not overwriting Odin errors
I was encountering bounds-check error messages being overwritten during
a test, if the test failed for another reason and sent a log message.

The original intent of having this check inside of the above `if` block
was that if a test sent an error message, then it was assumed an
overwrite would be safe, but it's completely possible for a test to fail
for a legitimate reason, then do an unrelated bounds check somewhere
else that would be buried under the animation.

This change will make sure that, no matter what, the progress display
will not trigger a clear if a signal was raised. There's still no
guarantee that bounds-check messages will be printed properly, and it's
best to redirect STDERR.

The only way that can be fixed is if they get a similar hook to
`context.assertion_failure_proc`.
2024-06-02 15:51:26 -04:00
Feoramund
3f1249c27e Tell user about ODIN_TEST_RANDOM_SEED option 2024-06-02 15:34:13 -04:00
Feoramund
d581dbbec5 Keep test runner main thread from using 100% of a CPU core 2024-06-02 14:54:32 -04:00
Feoramund
5e3e958574 Add -define:ODIN_TEST_LOG_LEVEL to set lowest log level 2024-06-02 14:54:32 -04:00
Feoramund
6a9203328b Log thread count at test run start
Provides a helpful info message about the option to change how many
threads are used per run.
2024-06-02 14:54:32 -04:00
Feoramund
5db65aa796 Make it easier to learn about ODIN_TEST_CLIPBOARD 2024-06-02 14:54:32 -04:00
Feoramund
cb00b8022b Add note about SIGSEGV edge case on UNIX-likes 2024-06-02 14:54:32 -04:00
Feoramund
4875f745c8 Remove Windows test runner in favor of libc implementation 2024-06-02 14:54:32 -04:00
Feoramund
ccdbd4b6ce Simplify casts in mem.Rollback_Stack procs 2024-06-02 14:54:32 -04:00
Feoramund
9dcf345795 Set thread pool is_running to false on shutdown 2024-06-02 14:54:32 -04:00
Feoramund
21064fbb60 Clear thread pool task data on restart 2024-06-02 14:54:32 -04:00
Feoramund
45fa9d8148 Expand documentation comment for ODIN_TEST_NAMES 2024-06-02 14:54:32 -04:00
Feoramund
6a5d51f0d6 Use more concise way of satisfying -vet 2024-06-02 14:54:31 -04:00
Feoramund
433ca538bf Be specific about platforms not implementing test runner signal handler 2024-06-02 14:54:31 -04:00
Feoramund
d1723664a7 Catch SIGILL, SIGFPE, SIGSEGV in the test runner 2024-06-02 14:54:31 -04:00
Feoramund
fb37572c4c Rename signal_handler.odin to signal_handler_libc.odin 2024-06-02 14:54:31 -04:00