Commit Graph

354 Commits

Author SHA1 Message Date
jakubtomsu aff345f57f Allow fixed SOA structs 2024-01-31 21:38:05 +01:00
gingerBill 68df35b378 Add #field_align(N)
It sets the minimum alignment for the fields within a struct. This cannot be used with `#packed`, but can be used with `#align(N)`.
If `#align(N)` is less than `#field_align(N)`, then a warning will be printed.
2024-01-28 17:33:29 +00:00
gingerBill d7d23e65ea Clean up error block usage 2024-01-05 13:47:00 +00:00
Laytan Laats bc7972fbaf error when #c_vararg is not applied to the last parameter
Fixes #2981
2023-12-20 00:17:11 +01:00
jakubtomsu 394c12f68d Remove unnecessary check zero fields check 2023-10-01 13:13:09 +02:00
jakubtomsu 1a57ad233d Fix field count in enumerated array type info 2023-10-01 13:09:08 +02:00
jakubtomsu c268463413 Allow zero-length enumerated arrays 2023-10-01 12:21:44 +02:00
gingerBill acc29fbceb Merge branch 'master' into llvm-17 2023-09-27 11:38:11 +01:00
gingerBill d358ebd7e6 Potentially fix race condition #2463 #2814 2023-09-26 12:57:26 +01:00
gingerBill 963559676e Fix build times for -o:<string> in LLVM-17 2023-09-21 16:48:00 +01:00
gingerBill c91898a888 Remove #relative slices; Replace with #relative multi-pointers 2023-08-05 16:05:39 +01:00
gingerBill 44ea82f845 Clean up usage of using throughout core and vendor 2023-07-31 11:46:40 +01:00
gingerBill 60e509b1e0 Add separate -vet flags; -vet-using-* flags; //+vet file flags 2023-07-31 11:09:19 +01:00
gingerBill 735181dc0e Remove unnecessary indent 2023-06-21 01:33:37 +01:00
gingerBill 26e06ba6a6 Correct check_call_arguments_new_and_improved logic 2023-06-20 16:08:26 +01:00
finn ec32967daa [check-type] fix faulty #no_nil variants error
- when checking the variants of a union type we will skip adding
  the variants if we have an unspecialized polymorphic, hence our
  union_type variants will be empty and have a count of 0

- so when checking if we violate the #no_nil error, if we are in the
  unspecialized polymorphic case and there exists at least one variant
  in the original variants then we should not raise this error

- test checks that we do not raise the error anymore, and that we still
  detect the #no_nil error in the described circumstances
2023-06-13 22:07:01 +02:00
gingerBill 8bf32ac697 Minor change to handling of propagation of errors with --- as a value 2023-05-22 12:53:29 +01:00
gingerBill acd8a4bc95 Unify check_constant_parameter_value logic 2023-04-27 10:58:17 +01:00
gingerBill 5da76ae34b Add struct #no_copy 2023-04-15 15:37:32 +01:00
gingerBill bf91fcc6f7 Improve type checking on polymorphic unions 2023-03-12 12:39:31 +00:00
gingerBill a53bff5645 Fix typed #caller_location bug. 2023-02-26 13:52:02 +00:00
gingerBill 8a2a70a3c2 Fix overriding procedure information for literals 2023-02-17 13:00:37 +00:00
gingerBill 5d397804f7 Fix #2286 by printing an error correctly 2023-01-16 13:22:37 +00:00
gingerBill 2dca39b557 Remove auto_cast procedure field flag
Fixes #2285
2023-01-16 12:06:03 +00:00
gingerBill 518f30e523 Bring PtrMap inline with StringMap 2023-01-14 13:23:17 +00:00
gingerBill 34f9170189 Fix race condition with polymorphic record generation 2023-01-12 16:06:09 +00:00
gingerBill 5fa66ac6a8 Fix random race condition for poly records 2023-01-12 00:18:58 +00:00
gingerBill 7124d541a1 General optimizations 2023-01-11 18:10:27 +00:00
gingerBill faa735d0c7 Localize gen_types mutexes 2023-01-04 15:15:12 +00:00
gingerBill 69b075782b Use a package local mutex for add_type_and_value 2023-01-02 22:40:28 +00:00
gingerBill 9b278db993 Revert "Change tav to be a pointer internally"
This reverts commit e98f1a28e6.
2022-12-22 12:01:41 +00:00
gingerBill e98f1a28e6 Change tav to be a pointer internally 2022-12-22 11:53:13 +00:00
gingerBill 690666537c Add gb_internal to checker 2022-12-18 21:46:27 +00:00
gingerBill 34a048f7da Replace compiler for loops for the hash-table types to simplify code usage 2022-12-09 11:29:28 +00:00
gingerBill 4c40495742 Fix #2188 2022-11-21 11:23:10 +00:00
gingerBill 27d56d0da4 Fix #2125 2022-11-21 10:25:34 +00:00
gingerBill 3edb3d8d8c Simplify the handling of the hashing calls for maps 2022-11-13 23:24:08 +00:00
gingerBill 810a1eee41 Remove the need for type->Map.internal_type and replace with the definition of runtime.Raw_Map 2022-11-08 11:13:46 +00:00
gingerBill da774e3fd2 General modifications 2022-11-08 00:38:31 +00:00
gingerBill c96e0afbf1 Begin work on implementing the new map internals 2022-11-07 23:02:21 +00:00
gingerBill 8c3f01fbfa Correct parapoly determination of generated internal type of a map 2022-09-22 00:05:11 +01:00
gingerBill ef372bd861 Replace #optional_second with #optional_allocator_error 2022-09-12 13:08:32 +01:00
Phil 86b6d01242 fix polymorphic proc parameters error handling 2022-09-06 11:04:18 -07:00
gingerBill 5e3cf45df3 Add #soa pointer type to aid with refactoring to #soa data types
a: #soa[16]Foo
p := &a[6]
#assert(type_of(p) == #soa^#soa[16]Foo)
p^.x = 123
p.x = 123
2022-08-08 15:07:00 +01:00
gingerBill 5168cf03a9 Remove dead #maybe code 2022-08-01 15:38:50 +01:00
gingerBill c8ab1b7ee1 Add #by_ptr procedure attribute to enforce a parameter to be passed by pointer internally 2022-07-24 13:11:48 +01:00
gingerBill 3db3047f47 Minor improvements 2022-07-19 16:17:23 +01:00
gingerBill 37d04198ab Add improved error message when doing ^x instead of &x for addressable variables 2022-07-11 12:31:01 +01:00
gingerBill f8744d87b0 Add shorthand flag to determine_type_from_polymorphic 2022-06-24 15:12:15 +01:00
gingerBill c23274adb0 Remove useless check 2022-05-27 12:11:58 +01:00