aboutsummaryrefslogtreecommitdiff
path: root/src/check_builtin.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix #4949gingerBill2025-03-241-0/+7
|
* Fix #4962gingerBill2025-03-241-5/+9
|
* Added simd_extract_lsbs intrinsic as well.Barinzaya2025-02-241-0/+1
| | | | | Equivalent to the simd_extract_msbs intrinsic, except it extracts the least significant bit of each element instead.
* Added simd_extract_msbs intrinsic.Barinzaya2025-02-241-0/+32
|
* Merge pull request #4797 from laytan/improve-abs-of-floatgingerBill2025-02-081-2/+5
|\ | | | | improve abs() on floats for more correct and faster results
| * apply abs fix to constant system tooLaytan Laats2025-02-061-2/+5
| |
* | Preserve `#no_nil` in `intrinsics.type_convert_variants_to_pointers`korvahkh2025-02-031-0/+3
|/ | | | | | Previously the newly returned type would not be marked as `#no_nil`. This caused `reflect.get_union_as_ptr_variants` to break on `#no_nil` unions.
* Fix #4508 for abs, min, max (#4516)Jeroen van Rijn2024-11-251-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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()) } ```
* report error when builtin min/max has 1 (non-type) paramjakubtomsu2024-11-171-0/+9
|
* Merge pull request #4427 from laytan/posix-additionsgingerBill2024-10-301-0/+4
|\ | | | | Finish sys/posix with Linux and partial Windows support & clean up other packages as a result
| * fix `#load_directory` including nested directoriesLaytan2024-10-281-0/+4
| |
* | Fixes #4395 by not assuming simd returns valMisomosi2024-10-201-1/+1
|/
* `a ordered` to `an ordered`gingerBill2024-10-021-7/+7
|
* Specify integer-like only for some `atomic_*` intrinsicsFeoramund2024-09-181-13/+8
| | | | Fixes #4256
* add '#caller_expression'Laytan Laats2024-09-141-0/+16
|
* add fixed point sign extend to 128 int depsLaytan Laats2024-09-051-0/+10
|
* Simplified #assert checkJeroen van Rijn2024-08-311-7/+0
|
* Check for `#assert` condition to be a constant boolJeroen van Rijn2024-08-311-1/+11
| | | | Fixes #4170
* riscv: add an error when atomics are used without the atomics extensionLaytan2024-08-251-0/+8
|
* Add `intrinsics.type_has_shared_fields`gingerBill2024-08-241-0/+53
|
* add support for linux_riscv64 and freestanding_riscv64Laytan2024-08-201-0/+5
|
* posix: add packageLaytan Laats2024-08-141-0/+17
|
* Add `intrinsics.masked_expand_load` and `intrinsics.masked_compress_store`gingerBill2024-08-051-1/+6
|
* Add `intrinsics.simd_masked_load` and `intrinsics.simd_masked_store`gingerBill2024-08-051-18/+44
|
* Add `intrinsics.simd_gather` and ``intrinsics.simd_scatter`gingerBill2024-08-051-0/+54
|
* Rename `add_sat` -> `saturating_add`gingerBill2024-08-051-6/+6
|
* Add `simd_reduce_any` and `simd_reduce_all`gingerBill2024-08-051-0/+23
|
* Allow `swizzle` to take more arguments than the original array lengthgingerBill2024-08-051-1/+1
|
* fix `add_sat` and `sub_sat` intrinsicsLaytan Laats2024-07-161-1/+42
|
* Add intrinsics `add_sat` and `sub_sat`gingerBill2024-07-161-0/+2
|
* Minimize mutex lock for `#load_directory`gingerBill2024-07-151-3/+7
|
* Add #load cache files to `-export-dependencies:json`gingerBill2024-07-081-0/+3
|
* error on type_of(value of untyped type)Karl Zylinski2024-07-031-0/+8
|
* Add `intrinsics.type_struct_has_implicit_padding` #3844gingerBill2024-07-011-0/+25
|
* Add internal flag for testing stuffgingerBill2024-06-291-5/+7
|
* Remove `@(warning)` and `#warning(...)`gingerBill2024-06-251-20/+0
|
* Add `#warning(<string>)` builtin compile time proceduregingerBill2024-06-201-0/+20
|
* Merge pull request #3524 from Feoramund/freebsd-amd64-syscall-errnogingerBill2024-06-201-6/+52
|\ | | | | Add `intrinsics.syscall_bsd`
| * Add `intrinsics.syscall_bsd`Feoramund2024-06-121-6/+52
| | | | | | | | | | | | This is a BSD-style syscall that checks for a high Carry Flag as the error state. If the CF is high, the boolean return value is false, and if it is low (no errors) then the boolean return value is true.
* | Merge pull request #3137 from laytan/show-defineablegingerBill2024-06-201-1/+27
|\ \ | |/ |/| Add flags to show/export defineable values and warn if a -define is unused in the project
| * collect and show docs of defineablesLaytan Laats2024-06-071-1/+7
| |
| * check if -define is actually usedLaytan Laats2024-06-061-2/+13
| |
| * -show-defineables and -export-defineablesLaytan Laats2024-06-061-1/+10
| |
* | Add `intrinsics.procedure_of`gingerBill2024-06-101-0/+46
| | | | | | | | | | | | | | | | ```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 ```
* | Prevent panic when `swizzle` called with < 2 indicesFeoramund2024-06-081-0/+3
| | | | | | | | | | | | The requirement for at least 2 indices has been sourced from `lb_addr_swizzle` in `llvm_backend_general.cpp`, where there is an assert to ensure the swizzle_count is `1 < n <= 4`.
* | Try to fix a possible race condition with polymorphic record parametersgingerBill2024-06-061-23/+8
|/
* implement `#exists(path)`Laytan Laats2024-06-041-24/+70
|
* fix crash when you have 2 `#load_directory` calls with the same pathLaytan Laats2024-06-041-0/+2
|
* Initial hash directive implementationDudejoe8702024-05-281-49/+118
|
* Fix #3603gingerBill2024-05-201-1/+7
|