Commit Graph

770 Commits

Author SHA1 Message Date
Laytan Laats
7f3d8e115f remove comma 2024-08-31 02:45:17 +02:00
Laytan Laats
7624ecf4ba fix some issues with the "bad import name" errors
There was so much wrong here:
- The `if` statement was never entered because even on invalid import
  names `path_to_entity_name` returns "_"
- Two errors were shown where one doesn't make sense, need to choose one
  based on context
- Structure of the messages were different from other error messages
- Suggestion was using the wrong import path
2024-08-31 02:30:32 +02:00
gingerBill
a4e865f90b Fix #4166 2024-08-30 11:01:06 +01:00
avanspector
47f423c123 Set a flag for delayed checking 2024-08-30 01:32:06 +02:00
avanspector
9866c83d61 Add missing checker delaying 2024-08-29 23:43:01 +02:00
avanspector
43ec2b9253 checker: delay foreign block checking
if file scope, otherwise as before
2024-08-26 20:59:16 +02:00
avanspector
d7e977069a Update checker.cpp 2024-08-26 19:59:15 +02:00
gingerBill
8c952878fb Allow empty strings in link_prefix and link_suffix 2024-08-25 14:03:14 +01:00
Laytan
ca6ef95b03 add support for linux_riscv64 and freestanding_riscv64 2024-08-20 14:06:40 +02:00
Laytan Laats
b2e64b7ce0 implement lshrti3 on wasm 2024-08-18 17:09:57 +02:00
gingerBill
fd5376ba88 Allow @(require_results) on foreign blocks 2024-08-14 11:28:49 +01:00
gingerBill
2584c6bcd7 Merge pull request #4069 from zen3ger/1738-aliased-procedure-resolution
Fix alias handling of procedures
2024-08-13 14:07:51 +01: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
Laytan Laats
6918d8aaa6 possibly fix init_core_type_info race condition 2024-08-10 21:03:40 +02:00
gingerBill
84ac56f778 Add intrinsics.simd_masked_load and intrinsics.simd_masked_store 2024-08-05 14:08:41 +01:00
gingerBill
1b0e98116d Revert changes to in_single_threaded_checker_stage 2024-07-15 01:47:52 +01:00
gingerBill
eb6805ef40 Disable the need for mutexes in single threaded checker stage 2024-07-15 01:44:23 +01:00
gingerBill
e4ba786948 Remove use of mutex in single threaded code 2024-07-15 01:29:57 +01:00
gingerBill
3311ea1c76 Keep MSVC happy with secure versions of C calls 2024-07-15 00:38:10 +01:00
gingerBill
018026d844 Use gb_zero_* calls 2024-07-15 00:36:00 +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
gingerBill
3dff83f3dc Mock out #no_capture for future use 2024-07-14 12:39:30 +01:00
gingerBill
edc793d7c1 Add #no_capture args: ..T to reuse the backing array stack memory 2024-07-14 11:39:05 +01:00
Laytan Laats
1a20b78633 remove misleading @(optimization_mode) values and make "none" inhibit optimizations 2024-07-08 21:06:57 +02:00
gingerBill
0f664893dd Add sort for global types and procedures 2024-07-08 13:59:25 +01:00
gingerBill
657bc88535 Allow x :: y when cond else proc(...){...} 2024-07-04 13:48:52 +01:00
gingerBill
52c219690a Ff @(disabled=true), do not add that entity's dependencies to the set 2024-07-04 13:09:31 +01:00
Laytan Laats
6f1cc8071c wasm: add foreign import and linking of wasm object files 2024-07-02 15:28:08 +02:00
gingerBill
17efb87eef Add -custom-attribute 2024-06-28 11:44:39 +01:00
gingerBill
ec38215842 Fix #3803 2024-06-28 10:09:46 +01:00
gingerBill
c098739484 Remove @(warning) and #warning(...) 2024-06-25 09:36:59 +01:00
gingerBill
23351ca8be Merge pull request #3137 from laytan/show-defineable
Add flags to show/export defineable values and warn if a -define is unused in the project
2024-06-20 11:45:52 +01:00
Feoramund
eb5a66c944 Forbid private test cases 2024-06-18 01:28:05 -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
Feoramund
71a812e7fe Use get_final_microarchitecture() for ODIN_MICROARCH_STRING 2024-06-10 05:30:16 -04: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
gingerBill
68781f8dd3 Remove unnecessary Wait_Signal checks 2024-06-07 00:11:00 +01:00
gingerBill
7044a7d776 Try to fix a possible race condition with polymorphic record parameters 2024-06-06 23:55:48 +01:00
Laytan Laats
9a95049393 -show-defineables and -export-defineables 2024-06-06 19:44:54 +02:00
gingerBill
9ef43fc782 Add @(rodata) 2024-06-06 15:16:34 +01:00
Feoramund
cb8faf5b74 Remove -test-name in favor of test runner option
`-define:ODIN_TEST_NAMES=...` is capable of selecting test by package
and name or name only, with the ability to access packages included by
`-all-packages`.
2024-06-02 14:54:32 -04:00
gingerBill
e737122ce8 Add experimental target orca_wasm32 2024-05-30 21:58:27 +01:00
gingerBill
66acbb7fed Add @(link_suffix=<string>) 2024-05-30 21:48:23 +01:00
gingerBill
a1b8749e74 Delay checking foreign import paths until after global scope is checked 2024-05-28 00:23:23 +01:00
gingerBill
38fffff06a Begin moving foreign import import paths to be evaluated in the semantic phase rather than parsing. 2024-05-27 23:51:43 +01:00
gingerBill
8dec4f6ed3 Merge pull request #3570 from jasonKercher/linux-arm32
Get the compiler to build and work on arm32 Linux
2024-05-20 00:05:57 +01:00
gingerBill
e71cd871c4 Reimplement -build-mode:static/-build-mode:lib 2024-05-16 14:27:05 +01:00
jasonkercher
2183140e71 arm32 now compiles and runs demo 2024-05-10 13:24:43 -04:00
Andreas T Jonsson
7feff1c113 Merged with master 2024-05-02 09:27:46 +02:00
Feoramund
a573161abd Allow @(init) procs to be @(disabled) 2024-04-28 14:42:04 -04:00