Laytan Laats
f7d7d65bc0
fix open bindings
...
`open` specifies the `mode` argument as vararg (presumably to make it
optional). varargs actually have rules about casting, in this case the
rule that any integer arg of size <= 4 has to be casted to `i32` before
passing it.
Not doing that implicit cast makes the permissions wrong or not apply at
all.
2024-08-16 22:54:53 +02:00
gingerBill
e810c3eace
Merge pull request #4012 from laytan/posix
...
core:sys/posix and core:os/os2 based on it (for darwin, netbsd, freebsd and openbsd)
2024-08-14 15:10:31 +01:00
gingerBill
fd5376ba88
Allow @(require_results) on foreign blocks
2024-08-14 11:28:49 +01:00
Laytan Laats
efe68c2e24
posix: add package
2024-08-14 01:44:35 +02:00
Roland Kovacs
9eb7186cda
Fix alias handling of procedures
...
An incorrect memmove when overriding entities caused multiple ones to point to
the same procedure with incomplete variant data, resulting in later hiting a
compiler assertion.
Introduced delayed type checking for procedure aliases, as it was masked by
the previous error in the override logic.
2024-08-12 19:52:42 +02:00
gingerBill
e4ba786948
Remove use of mutex in single threaded code
2024-07-15 01:29:57 +01:00
gingerBill
6959554040
Calculate size and alignment, and reuse memory for all variadic calls within a procedure body
2024-07-14 13:44:47 +01:00
Laytan Laats
1a20b78633
remove misleading @(optimization_mode) values and make "none" inhibit optimizations
2024-07-08 21:06:57 +02:00
gingerBill
8b7c6a23ba
Restrict a bit more
2024-07-04 14:06:02 +01:00
gingerBill
87bccc8f3f
Remove import name cases
2024-07-04 13:53:52 +01:00
gingerBill
657bc88535
Allow x :: y when cond else proc(...){...}
2024-07-04 13:48:52 +01:00
Laytan Laats
6f1cc8071c
wasm: add foreign import and linking of wasm object files
2024-07-02 15:28:08 +02:00
Laytan Laats
b79d7e6917
disallow non-global foreign import of variables on wasm
2024-06-28 01:34:09 +02:00
Jeroen van Rijn
140ee036ce
wasm error is no longer relevant
2024-06-27 23:29:36 +02:00
Feoramund
0196cc46e3
Allow custom main when -no-entry-point is set
2024-06-18 01:49:55 -04:00
gingerBill
eaf1d88287
Merge pull request #3734 from Feoramund/fix-3730
...
Fix #3730
2024-06-11 12:50:41 +01:00
gingerBill
0b02c67cdf
Minor clean up for backend
2024-06-11 12:19:52 +01:00
Feoramund
61c630bbf8
Fix #3730
2024-06-11 05:23:43 -04: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
gingerBill
9ef43fc782
Add @(rodata)
2024-06-06 15:16:34 +01:00
gingerBill
8db87170a9
Clean up handle_link_name handling of link_suffix
2024-05-30 21:53:23 +01:00
gingerBill
66acbb7fed
Add @(link_suffix=<string>)
2024-05-30 21:48:23 +01:00
gingerBill
8e263de4aa
Fix error message handling
2024-05-11 13:59:06 +01:00
gingerBill
d85c8f0b2c
Fix #3555
2024-05-09 10:58:57 +01:00
Laytan Laats
25f1d0906d
compiler: improve target features support
2024-05-02 00:59:52 +02:00
gingerBill
517d7ae0b0
Add error block around error_line calls
2024-03-23 17:51:56 +00:00
gingerBill
5f001f6d51
Allow casting between a bit_field and its backing type
2024-02-22 18:15:13 +00:00
gingerBill
3c47503780
Improve foreign variable fuzzy type checking
2024-01-28 23:35:01 +00:00
gingerBill
67dcd916e8
Update instrumentation signature to support runtime.Source_Code_Location as last parameter.
2024-01-09 11:01:18 +00:00
gingerBill
f4782157d3
Implement instrumentation pass
2024-01-07 21:34:44 +00:00
gingerBill
aff8f06e3c
Add frontend stuff instrumentation tooling
...
//+no-instrumentation
@(no_instrumentation)
@(instrumentation_enter)
@(instrumentation_exit)
2024-01-07 19:56:00 +00:00
gingerBill
d7d23e65ea
Clean up error block usage
2024-01-05 13:47:00 +00:00
gingerBill
2820bbc269
Add @(entry_point_only) for procedures
2024-01-05 13:38:30 +00:00
gingerBill
963559676e
Fix build times for -o:<string> in LLVM-17
2023-09-21 16:48:00 +01:00
gingerBill
b72f009d87
Disallow aliasing of any and typeid
2023-08-08 15:10:57 +01:00
gingerBill
65206fe33e
Go through loads of TODOs
2023-08-01 11:39:04 +01:00
gingerBill
69e1f42aed
Replace a lot of warnings with errors; remove deprecated stuff
2023-08-01 11:11:15 +01:00
gingerBill
0de7df9eab
Improve //+vet; remove using in many places; add //+vet !using-stmt where necessary
2023-07-31 11:37:14 +01:00
gingerBill
60e509b1e0
Add separate -vet flags; -vet-using-* flags; //+vet file flags
2023-07-31 11:09:19 +01:00
gingerBill
921530dd01
Fix to allow procedure groups on objective-c types
2023-07-17 12:43:56 +01:00
gingerBill
1247d36a12
Fix #2562 caused by inlining of procedure call
2023-05-29 22:57:42 +01:00
gingerBill
8bf32ac697
Minor change to handling of propagation of errors with --- as a value
2023-05-22 12:53:29 +01:00
gingerBill
d5a8f2298e
Restrict --- to variable declarations only
2023-05-22 12:37:26 +01:00
gingerBill
56c0d32ea0
Fix #2526
2023-05-18 11:52:16 +01:00
gingerBill
e24315eed8
Improve grammar
2023-04-15 16:16:16 +01:00
gingerBill
5da76ae34b
Add struct #no_copy
2023-04-15 15:37:32 +01:00
bumbread
5134d6bc63
rename -no-tls to -no-thread-local
2023-03-14 16:32:42 +11:00
bumbread
5f3b6c9722
Added -no-tls flag
2023-03-13 20:25:13 +11:00
gingerBill
f5d507a9b9
Improve errors about conversions of constant integers
2023-02-22 11:30:08 +00:00
gingerBill
20eacc4a84
Fix issue that conflicts with constant parapoly procedures and deferred_* procedures
2023-02-19 12:10:28 +00:00