Commit Graph

5221 Commits

Author SHA1 Message Date
gingerBill a2a0a2c8d8 Merge pull request #4611 from tf2spi/4491-max-field-align-pack
Add packing + aligned access w/ field_align
2025-01-01 18:03:44 +00:00
gingerBill 4882eefaf8 Merge pull request #4616 from flga/master
make -export-dependencies emit valid json
2025-01-01 17:46:25 +00:00
gingerBill bfbcc02aff Merge pull request #4608 from zen3ger/assignment-of-non-specialized-parapoly
Fix crash on assignment of parapoly proc to variable
2025-01-01 17:40:40 +00:00
gingerBill 8d400f43fd Merge pull request #4607 from zen3ger/parapoly-proc-fixes
Fix crash when proc return type is undeclared parapoly variable
2025-01-01 17:40:04 +00:00
gingerBill 7b334d2bd9 Add #branch_location 2025-01-01 17:26:15 +00:00
gingerBill c8ad2a4245 Support multiple paths for wasm in foreign import 2025-01-01 15:12:54 +00:00
fleandro 6ff81b6e4c make -export-dependencies:json emit valid json 2024-12-23 01:03:51 +00:00
misomosi fdf510b7b3 Pack struct when needed, use field_align metadata 2024-12-22 10:05:13 -05:00
Roland Kovacs 9f77f7c417 Fix crash on assignment of parapoly proc to variable 2024-12-22 12:38:37 +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
gingerBill 0a29d36aa3 Fix bug with comparisons with big endian types 2024-12-12 15:44:49 +00:00
Laytan Laats c8f0d27cee compiler: remove viral #force(_no)_inline
If a procedure was marked `#force_no_inline`, any procedure calls within
it would also implicitly be. This is not expected for multiple reasons:

1. `#force(_no)_inline` on a call expr works differently than on a procedure literal.
2. Adding the attribute on it and every called proc blows up the amount
   of work for the inliner pass and may increase the time it takes.
3. Putting `#force_no_inline` on a procedure to keep executable size
   down (like we do for some map procedures), benchmark it, or find it in
   asm/ir has the added effect of slowing those procedures down significantly
   and not representing truth.
2024-12-09 19:12:42 +01:00
Laytan Laats 676fe34863 fix #4547 - wasm -out without file extension 2024-12-06 19:38:53 +01:00
gingerBill e3b1646490 Fix #4552 2024-12-05 15:46:35 +00:00
gingerBill dd8e6e884c Try to fix #4553 2024-12-05 15:45:01 +00:00
gingerBill f5b16aa42a Fix #4561 2024-12-05 15:27:41 +00:00
gingerBill b36a81ef53 ABI change: for indirect parameters size_of <= 16, do callee stack copy 2024-12-05 10:49:39 +00:00
gingerBill b942479886 Minor improvement to type handing on failures 2024-12-02 15:57:20 +00:00
gingerBill 65de0256ce Fix #4535 2024-12-02 15:57:08 +00:00
gingerBill e2ba8ff6e6 Fix #4530 2024-12-02 11:23:55 +00:00
Jeroen van Rijn 6d83755e92 Fix assert when return value expected. 2024-11-28 20:44:57 +01:00
gingerBill 44124cb639 Merge pull request #4440 from 0dminnimda/support_llvm19
Add support for llvm version 19
2024-11-27 21:15:59 +00:00
Laytan Laats fa39d87f88 properly keep track of current scope for debugging
Fixes #4519
2024-11-27 20:55:48 +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
Laytan Laats ad80aa6d28 sys/info & odin report: rework macos version retrieval 2024-11-26 22:28:21 +01:00
Laytan Laats 767daf4a9c add macos 15.1.1 to odin report and sys/info 2024-11-26 18:46:27 +01:00
gingerBill 9115c7aa13 Convert mutex guard to "try lock" 2024-11-26 16:14:13 +00:00
Jeroen van Rijn 7c3ce334d6 Fix #4508 for abs, min, max (#4516)
* Fix #4508 for abs, min, max and the rest of the builtins.

None of these segfault now:
```odin
package bug

main :: proc() {
	p :: proc() {}

	// _ = len(p())
	// _ = cap(p())

	// _ = size_of(p())
	// _ = align_of(p())

	// T :: struct {}
	// _ = offset_of(p())
	// _ = offset_of(T, p())
	// _ = offset_of(p(), foo)
	// _ = offset_of(p(), "")

	// _ = type_of(p())
	// _ = type_info_of(p())
	// _ = typeid_of(p())

	// A: [4]int
	// _ = swizzle(p())    //  :: proc(x: [N]T, indices: ..int) -> [len(indices)]T ---
	// _ = swizzle(A, p()) //  :: proc(x: [N]T, indices: ..int) -> [len(indices)]T ---

	// _ = complex(p(), p())
	// _ = quaternion(p(), p(), p(), p())
	// _ = quaternion(w=p(), x=p(), y=p(), z=p())

	// _ = real(p())
	// _ = imag(p())
	// _ = jmag(p())
	// _ = kmag(p())
	// _ = conj(p())

	// _ = expand_values(p())

	// _ = min(p())
	// _ = max(p())
	// _ = abs(p())
	// _ = clamp(p(), p(), p())

	// _ = soa_zip(p())
	// _ = soa_unzip(p())
}
```
2024-11-25 15:27:35 +01:00
gingerBill f213b8e5cf Allow for odin help build etc 2024-11-25 14:04:17 +00:00
Laytan Laats 83bf0c6ab8 checker: only error with -vet-cast when it is actually castable 2024-11-21 19:18:17 +01:00
gingerBill 3229f4668d Improve odin help -foo usage 2024-11-18 23:35:10 +00:00
jakubtomsu 71880eb1ff report error when builtin min/max has 1 (non-type) param 2024-11-17 21:02:30 +01:00
Laytan Laats 8f2766c4dc add missing macos version 2024-11-16 15:42:13 +01:00
gingerBill 2af014b960 Make lowercase 2024-11-14 17:42:21 +00:00
gingerBill 7adb4c91d4 Fix typo 2024-11-14 17:05:34 +00:00
gingerBill b9886dfcc7 Add -linker:<string> to replace -lld and -radlink 2024-11-14 17:04:45 +00:00
gingerBill 8de6909198 Disallow -lld and -radlink to be used together 2024-11-14 16:35:48 +00:00
gingerBill 21a25bddde Add -radlink 2024-11-14 16:32:26 +00:00
gingerBill e38a08013e Remove #relative types from the compiler 2024-11-14 16:17:24 +00:00
gingerBill b3d1d7b835 Make #relative types an error in parsing 2024-11-14 16:08:53 +00:00
gingerBill 89a5decc33 Keep ASAN happy on type assertions 2024-11-13 18:32:50 +00:00
bayo-code 8585fdf25f Added support for odin build -target:? 2024-11-11 04:16:01 +01:00
bayo-code d5b221f972 Revert "List the supported targets using odin targets"
This reverts commit b589e3c499.
2024-11-11 04:09:53 +01:00
bayo-code b589e3c499 List the supported targets using odin targets 2024-11-10 07:16:13 +01:00
gingerBill 20a8c97d68 Remove duplicates in -defineables 2024-11-08 11:24:00 +00:00
Jeroen van Rijn 3bfe675a68 && 2024-11-07 15:02:19 +01:00
Jeroen van Rijn deb562613f Phrasing! 2024-11-07 13:13:58 +01:00
Jeroen van Rijn 925d8749e0 Suggest -microarch:native if popcnt instruction is missing.
Fixes #4453.
2024-11-07 12:56:49 +01:00
gingerBill f02d621a8e Merge pull request #4394 from seventh-chord/errormessages
Suggestion when assigning enum to bit_set
2024-11-06 13:10:17 +00:00
gingerBill e8f231ee72 Merge pull request #4437 from dpoetzschke/fix/windows-args-escaping
fix windows args parser problem from issue #4393
2024-11-06 13:08:55 +00:00