Commit Graph

455 Commits

Author SHA1 Message Date
gingerBill 01c10f3f5e Use RecursiveMutex to fix a race condition with parapoly records 2025-09-26 10:18:46 +01:00
gingerBill 549edcc0f9 Use a RwMutex instead of BlockingMutex 2025-09-10 21:00:43 +01:00
gingerBill 0476d33a6c Remove global PtrMap<Type *, GenTypesData *> and store on the TypeNamed directly 2025-09-10 20:45:26 +01:00
gingerBill a36a8722dc Minimize more thread contention 2025-09-10 19:30:32 +01:00
gingerBill 21b1173076 Minor clean up of permanent/temporary arena usage 2025-09-10 18:20:20 +01:00
A1029384756 3074146784 skip errors on polymorphic procs when in a proc group with other options 2025-08-28 11:30:47 -04:00
gingerBill b6944b8acb Fix instantiation of package for parapoly records 2025-08-07 17:54:17 +01:00
gingerBill 7057fc8dfc Remove the semantics of #no_copy, keep the grammar 2025-07-30 23:14:29 +01:00
Laytan 62c5805c91 Merge pull request #5150 from wishfoundry/patch-1
spelling in compilation errors
2025-06-20 22:37:03 +02:00
Laytan Laats 478c923e2c fix another type alias issue with mini cycle 2025-05-26 19:48:28 +02:00
Ben 0be7639c0a spelling in compilation errors 2025-05-11 22:10:16 -05:00
bogwi af6b763449 CHECK 3 done
Enhance support for polymorphic procedures in type checking

1. In src/check_type.cpp, added special handling for polymorphic procedures used as default parameter values. We now allow a polymorphic procedure to be used as a default parameter value, even when its type parameters can't be immediately determined.

2. In src/check_expr.cpp, we modified the check_is_assignable_to_with_score function to handle the special case of assigning a polymorphic procedure as a default parameter. The function now allows a polymorphic procedure to be assigned to a concrete procedure type in this specific context.
2025-05-05 17:53:32 +09:00
Jeroen van Rijn 30c6fea9e9 Allow polymorphic #simd array as return type 2025-05-02 15:38:43 +02:00
gingerBill 3dcc22fa6d Change hashing rules for float-like types to make 0 == -0 2025-04-16 10:52:35 +01:00
Jeroen van Rijn 32c9f6d13a Remove bit_field -> bit_set warning.
The "This 'bit_field' might be better expressed as a 'bit_set' since all of the fields are booleans, of 1-bit in size, and the backing type is an integer" warning is imperfect. Disable it for now.
2025-04-12 14:01:18 +02:00
gingerBill 2548fc2431 Actually maybe fix #5015 2025-04-09 13:33:06 +01:00
gingerBill a15b367921 Fix #5015 2025-04-09 13:29:56 +01:00
Jeroen van Rijn eeb8b8dcc4 Fix #5020 2025-04-08 10:13:45 +02:00
gingerBill 5bd43b94ec Improve error message for matrices with no rows or columns 2025-02-22 17:50:37 +00:00
Laytan Laats aa3f0b86c1 compiler: fix align error check 2025-01-15 20:18:50 +01:00
Roland Kovacs f2f952b344 Fix crash when proc return type is undeclared parapoly variable
Disallow the declaration of new parapoly variables in return types, when
the procedure's parapoly scope is itself. This happens if e.g.:
`foo :: proc() -> $T`.

Closes #3949, #4294, #4563
2024-12-22 02:31:25 +01:00
Jeroen van Rijn c7dec10100 Check type_expr in check_procedure_param_polymorphic_type
Fixes #4523 assert.
2024-11-27 15:26:33 +01:00
gingerBill e38a08013e Remove #relative types from the compiler 2024-11-14 16:17:24 +00:00
gingerBill a7d7c92a53 #min_field_align & #max_field_align; deprecate #field_align in favour of #min_field_align 2024-09-30 13:05:28 +01:00
Laytan Laats 603efa860a add '#caller_expression' 2024-09-14 22:13:37 +02:00
Laytan 63cd9a031a fix variadic parameter with default value error check 2024-08-21 15:11:16 +02:00
Jeroen van Rijn ebbb70f11d Error if missing map key type
Fixes #4096
2024-08-17 17:12:27 +02:00
Laytan 29a6959a56 Merge pull request #2977 from jakubtomsu/disallow-variadic-param-default
Report error when a variadic procedure parameter has a default value
2024-08-14 11:55:09 +02:00
Roland Kovacs dda89a69bf Check if procedure parameter type declares polymorphic args
When a procedure parameter's type was declared in an imported package the type
checker correctly resolved to the parametric type, but it did not check if the
expression that refers to that type conforms to a polymorphic type declaration.

This error was not detected if the procedure was unused, since it was marked as
polymorphic, where further type check is done on instantiation.
2024-08-08 19:50:05 +02:00
gingerBill a06cb8ba46 Add #simd[N]rawptr support 2024-08-05 12:04:36 +01:00
gingerBill ef84382f23 Add suggestion for #3961 2024-07-22 20:11:23 +01:00
gingerBill fcaa47986a Improve error handling for invalid syntax doing [*]T 2024-07-22 16:29:29 +01:00
gingerBill 1e37eaf54d Begin work for bit_set[...; [N]T] (not working) 2024-07-15 14:49:20 +01:00
gingerBill 0a530b5ce8 Add error for #no_capture being reserved for future use 2024-07-14 13:20:12 +01:00
gingerBill 3533094cc2 Restrict #no_capture to pointer-like types only 2024-07-14 12:44:13 +01:00
gingerBill 3dff83f3dc Mock out #no_capture for future use 2024-07-14 12:39:30 +01:00
gingerBill 8642d719f0 Imply #no_capture to all variadic parameters 2024-07-14 12:19:47 +01:00
gingerBill edc793d7c1 Add #no_capture args: ..T to reuse the backing array stack memory 2024-07-14 11:39:05 +01:00
gingerBill c83307f26f Give error message suggestion when doing ^x instead of x^ if x is an r-value 2024-07-10 12:39:42 +01:00
gingerBill f85f6b338a Change .. variadic logic; comment out unneeded error message 2024-07-10 12:28:15 +01:00
gingerBill ae2f16edea Fix #3894 2024-07-09 15:29:36 +01:00
Laytan Laats f66b7021a6 Fix not detecting duplicate proc cases
Fixes #3864
2024-07-05 00:50:52 +02:00
gingerBill ec38215842 Fix #3803 2024-06-28 10:09:46 +01:00
Laytan Laats 29250f2657 fix regression in test_issue_2395 2024-06-07 16:33:38 +02: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
gingerBill 64bdb3a097 Fix #3630 (first part) 2024-05-26 12:17:03 +01:00
gingerBill 32245e93a1 Fix #3514 along with soa.a[i] bounds checking 2024-05-16 16:18:21 +01:00
gingerBill 8fa20fb875 Extra check for field being nullptr 2024-05-13 14:44:53 +01:00
gingerBill 7905f0533f Fix #3582 by disallowing it 2024-05-13 12:01:16 +01:00