| Age | Commit message (Collapse) | Author |
|
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
|
|
|
|
make `@call` compile errors match regular calls
|
|
|
|
|
|
|
|
Also remove an incorrect piece of logic which allowed fetching the 'len'
property on non-single-ptrs (e.g. many-ptrs) and add a corresponding
compile error test case.
Resolves: #4765
|
|
|
|
|
|
|
|
fixes `error(compilation): clang failed with stderr: error: array type 'uint32_t[10]' (aka 'unsigned int[10]') is not assignable`
|
|
|
|
|
|
Previously, if you had a pointer to multiple array elements and tried to
write to it at comptime, it was incorrectly treated as a pointer to one
specific array value, leading to an assertion down the line. If we try
to mutate a value at an elem_ptr larger than the element type, we need
to perform a modification to multiple array elements.
This solution isn't ideal, since it will result in storePtrVal
serializing the whole array, modifying the relevant parts, and storing
it back. Ideally, it would only take the required elements. However,
this change would have been more complex, and this is a fairly rare
operation (nobody ever ran into the bug before after all), so it doesn't
matter all that much.
|
|
|
|
Closes #4144
Closes #4255
Closes #4372
Closes #4375
Closes #4380
Closes #4417
Closes #4423
Closes #4476
Closes #4528
Closes #4562
Closes #4572
Closes #4597
Closes #4639
Closes #4672
Closes #4782
Closes #4955
Closes #4984
Closes #4997
Closes #5010
Closes #5114
Closes #5166
Closes #5173
Closes #5276
|
|
comptime `@ptrCast` a subset of an array, then write through it
closes #2444
|
|
|
|
Closes #14037
|
|
Closes #14041
|
|
|
|
Good riddance.
|
|
Closes #13425
|
|
|
|
Also fix C warnings triggered by these tests.
|
|
|
|
|
|
|
|
It did not handle properly when the dummy operand was a comptime_int; it
was crashing in coerce because comptime_int is supposed to be
comptime-known. So when calling coerceResultPtr, we pass the actual
operand, not a dummy operand, which means it will have the proper
comptime value when necessary.
|
|
|
|
|
|
|
|
|
|
|
|
Split big test into the two separate things it is testing.
Add missing checks to the test which revealed the test is not actually
passing yet for the C backend.
|
|
|
|
|
|
|
|
|
|
This enables the tests that now pass due to the changes to lower
parent pointers are lowered, as well as the additional features to unions.
|
|
|
|
stage2 ARM: misc improvements
|
|
Adds the sentinel element to the type name to avoid ambiguous
declarations, and outputs the sentinel element (if needed) even in what
would otherwise be empty arrays.
|
|
|
|
|
|
Introduce `Module.ensureFuncBodyAnalyzed` and corresponding `Sema`
function. This mirrors `ensureDeclAnalyzed` except also waits until the
function body has been semantically analyzed, meaning that inferred
error sets will have been populated.
Resolving error sets can now emit a "unable to resolve inferred error
set" error instead of producing an incorrect error set type. Resolving
error sets now calls `ensureFuncBodyAnalyzed`. Closes #11046.
`coerceInMemoryAllowedErrorSets` now does a lot more work to avoid
resolving an inferred error set if possible. Same with
`wrapErrorUnionSet`.
Inferred error set types no longer check the `func` field to determine if
they are equal. That was incorrect because an inline or comptime function
call produces a unique error set which has the same `*Module.Fn` value for
this field. Instead we use the `*Module.Fn.InferredErrorSet` pointers to
test equality of inferred error sets.
|
|
|
|
This involved an LLVM backend fix for the aggregate_init instruction.
|
|
Also reduces slice_elem_val to ptr_add, simplifying the implementation
|
|
* airSlice
* airArrayToSlice
* and initial support for airSlicePtr and co
|