Commit Graph

15401 Commits

Author SHA1 Message Date
gingerBill
b4fe9677a1 Change ARM64 ABI for integer-like parameters 2024-03-20 16:06:50 +00:00
gingerBill
1951bc45a6 Fix #3133 by show the line of the syntax error 2024-03-20 13:55:47 +00:00
gingerBill
ba77a9464c Add suggestion for x: ^T; y = x to be x^ 2024-03-20 13:36:14 +00:00
gingerBill
b1dae2d59a Add x: T; y: ^T = x suggestion to do &x 2024-03-20 13:28:17 +00:00
gingerBill
1514d64964 Update ARM64 ABI return type 2024-03-20 11:12:43 +00:00
gingerBill
e4c502e79b Add offset (in bytes) field to -json-errors 2024-03-20 11:06:02 +00:00
gingerBill
553a244fec Fix bounds checking 2024-03-20 10:24:39 +00:00
gingerBill
3bff922b6f m[i] on #row_major matrices will reduce the i-th row-vector 2024-03-20 10:23:57 +00:00
gingerBill
56004c56fc Merge pull request #3295 from kavalee/parser-newline-fix
Fixed issue #3264 regarding `core:odin/parser` compound literal not allowing a newline
2024-03-20 10:09:55 +00:00
gingerBill
863ee0b8d1 Merge pull request #3297 from laytan/linker-improvements
linker improvements
2024-03-20 10:09:45 +00:00
Jeroen van Rijn
89ba8b4139 Merge pull request #3298 from laytan/update-macos-releases
update macOS releases for `core:sys/info` and `odin report`
2024-03-20 00:23:53 +01:00
Laytan Laats
d0b3b18e26 update macOS releases for core:sys/info and odin report 2024-03-20 00:14:01 +01:00
gingerBill
cd7137af60 Update raylib to use #row_major matrices 2024-03-19 21:16:04 +00:00
gingerBill
18fb665bf6 Correct matrix builtins for #row_major 2024-03-19 21:15:47 +00:00
gingerBill
a750fc0ba6 Add #row_major matrix[R, C]T
As well as `#column_major matrix[R, C]T` as an alias for just `matrix[R, C]T`.
This is because some libraries require a row_major internal layout but still want to be used with row or major oriented vectors.
2024-03-19 21:05:23 +00:00
Laytan Laats
a555862522 linker improvements
`path_to_fullpath` did different things on Windows&Unix, an attempt to
bring them closer together was made here.
This was prompted by the compiler completely ignoring
`foreign import "foo.dylib"` when `foo.dylib` does not exist (because
`path_to_fullpath` returns an empty string).
Causing just unresolved symbol errors, when on Windows it would pass
along the path to the linker and actually say it doesn't exist, which
is now also the case for Unix.
This also fixes some checker errors that relied on the Windows
behaviour, for example: `Error: File name, , cannot be as a library name
as it is not a valid identifier`.

Made `-no-crt` require either `-default-to-nil-allocator` or
`-default-to-panic-allocator` on Unix, the current default allocators
rely on libc and this was not obvious and would immediately bring up
unresolved symbol errors for the linked memory management functions, or
just link with libc anyways because it was foreign imported.

Added a suggestion to install `nasm` with the user's package manager
when assembling using `nasm` fails on Unix, I saw some confusion about
it in the Discord.

Ignore explicit foreign imports of libc. It is already linked in later
on in the linking process and would otherwise (at least on macOS) cause
linker warnings for duplicate libraries. This also makes it so when
using `-no-crt` and importing something that requires libc, linker
errors are given (like I would expect), instead of silently still
linking with libc because it was foreign imported.
2024-03-19 19:57:35 +01:00
gingerBill
433109ff52 Replace gb_exit(1) with exit_with_errors() where appropriate 2024-03-19 16:29:45 +00:00
gingerBill
ba428fecdb Add -json-errors 2024-03-19 16:25:09 +00:00
gingerBill
17cc7a2c5e General clean-up for error.cpp 2024-03-19 15:42:59 +00:00
Beau McCartney
43e8da2e06 shm_open: comment with notes abt permissions 2024-03-19 09:36:49 -06:00
gingerBill
9a2fc6cf4c Serialize errors to make them sortable, deterministic, and generally more control 2024-03-19 15:34:29 +00:00
gingerBill
8ff788f4ff Add better suggestion for [?]T mistake 2024-03-19 13:38:13 +00:00
gingerBill
80ecf5b68a On x: [?]T = {...}, minimize errors by using the [?]T expression as a kind of hint 2024-03-19 13:32:37 +00:00
gingerBill
5159f30c9c Fix error block handling 2024-03-19 13:10:35 +00:00
gingerBill
d5daa9fda5 Minimize error propagation of bad array syntax by treating this like a type 2024-03-19 13:05:28 +00:00
gingerBill
89315986d4 Add suggestion when mistyping an array backwards e.g. T[] 2024-03-19 12:37:11 +00:00
Aaron Kavaler
096b4f5454 fixed issue #3264 regarding core:odin/parser not allowing a newline at the end of a compound literal 2024-03-18 20:33:02 -07:00
Laytan Laats
65e68f11f8 glfw: update from 3.3.8 to 3.4 2024-03-18 23:54:26 +01:00
gingerBill
ec9ac59323 Unify "Did you mean" strings 2024-03-18 21:37:40 +00:00
gingerBill
97be7feb99 Add list of C identifier suggestions (types and keywords) 2024-03-18 17:32:26 +00:00
gingerBill
00344e1323 Add check to people trying to foreign import C files. 2024-03-18 16:56:01 +00:00
Laytan Laats
dd92d3054d add ODIN_ prefix to the new constant 2024-03-18 17:22:58 +01:00
Jeroen van Rijn
07ef969546 Fix test label. 2024-03-18 17:05:40 +01:00
Jeroen van Rijn
72c15d7699 Add WiP datetime package and tests.
A new package `core:time/datetime` has been added which can represent moments much further in the past and future than `core:time`.
It is based on *the* reference work on the subject, Calendrical Calculations Ultimate Edition, Reingold & Dershowitz.

More procedures will be added to it in the future, to for example calculate the 3rd Thursday in March to figure out holidays.
The package has been tested for more than a year and can handle dates 25 quadrillion years into the past and future with 64-bit day ordinals, or 5 million with 32-bit ones.

This also fixes a longstanding bug where converting between YYYY-MM:DD hh:mm:ss and `time.Time` and back could result in a mismatch.

RFC 3339 timestamps can now also be parsed using the `core:time` package.
2024-03-18 16:47:16 +01:00
gingerBill
009b6f44e3 Add loads of checks for common mistakes for C programmer 2024-03-18 15:18:10 +00:00
gingerBill
ebd3065aa2 Add error message for C programmers which do Foo{.x = 123} rather than Foo{x = 123} 2024-03-18 14:17:13 +00:00
gingerBill
6cb74b63ec Fix #3286 2024-03-18 12:39:34 +00:00
gingerBill
effc71ca43 Fix case: bug with by-ref unions 2024-03-18 12:20:53 +00:00
gingerBill
43d695a990 Fix for x in y where y is an "optional ok" value, but ignores #optional_allocator_error values 2024-03-18 11:21:06 +00:00
gingerBill
19eb2a8890 Fix #3282 2024-03-16 22:24:34 +00:00
gingerBill
3875fb08e8 Fix #3284 2024-03-16 22:12:17 +00:00
Beau McCartney
1758bd683e sys_shm_open: fchmod the returned descriptor to get correct perms
this doesn't happen by default
2024-03-16 12:13:00 -06:00
Laytan Laats
9c455b2213 darwin: use new wait on address API if possible 2024-03-15 21:43:16 +01:00
Eric Johnson
4b7f32c287 Update mem doc example formatting 2024-03-15 12:26:01 -07:00
Beau McCartney
24f9e16dfd sys_open() calls _sys_open_mode() to get a permission flags integer
_sys_open_mode() does exactly what sys_open() was originally doing
inline, I simply factored it into a separate function so that other
wrappers could call it (similar to _sys_permission_mode())
2024-03-15 08:32:25 -06:00
Beau McCartney
56a29685b4 darwin: sys_shm_open() helper
wraps syscall_shm_open() in the same way that sys_open() wraps
syscall_open()
2024-03-15 08:27:27 -06:00
Beau McCartney
cf949e541f helper function to convert Open_Flags bitset to a u32
- analagous to _sys_permission_mode()
- uses the already-existing conversion logic in sys_open()
2024-03-15 08:26:25 -06:00
Beau McCartney
44167800ad darwin: syscall wrappers for shm_open() and shm_unlink() 2024-03-15 08:26:03 -06:00
gingerBill
04f0fbf23a Merge pull request #3272 from iansimonson/add_getrusage_darwin
Add getrusage syscall for mac/darwin
2024-03-14 19:45:25 +00:00
gingerBill
51d6a254cf Merge pull request #3277 from kavalee/slice-unique-fixes
fixed slice.unique and slice.unique_proc
2024-03-14 19:40:18 +00:00