| Age | Commit message (Collapse) | Author |
|
And fix test cases to make them pass. This is in preparation for
starting to pass behavior tests with self-hosted.
|
|
|
|
The code would previously assume every function would start at addresses
being multiples of 16, this is not true beside some specific cases.
Moreover LLVM picks different alignment values depending on whether it's
trying to generate dense or fast code.
Let's use the minimum guaranteed alignment as base value, computed
according to how big the opcodes are.
The alignment of function pointers is always 1, a safe value that won't
cause any error at runtime. Note that this was already the case before
this commit, here we're making this choice explicit.
Let the 'alignment' field for TypeInfo of fn types reflect the ABI
alignment used by the compiler, make this field behave similarly to the
'alignment' one for pointers.
|
|
Closes #8603
|
|
Closes #7951
Closes #8574
|
|
Ensure everything's ok at comptime and runtime.
|
|
Happy LLVM 12 Release Day.
Please note that the llvm 12 tag does not include the latest commit in
the release/12.x branch, which is in fact a bug fix for a regression
that is causing a failure in Zig's test suite.
Zig master branch is tracking release/12.x, and will be enabling the
test that is fixed by that commit.
|
|
The code initializes twice `t` instead of `t1`, leaving the latter
uninitialized. The problem manifested itself by corrupting the LSBs of
the result in unpredictable ways.
|
|
|
|
|
|
stage1: allow async and resume inside nosuspend blocks
|
|
|
|
Beside handling NaNs and other non-numeric values better we finally
offer the same pair of testing predicates in math and testing.
|
|
- issue fixed in llvmorg-12.0.0-rc3
closes #8130
|
|
|
|
- consolidate into single code block
See #8130
See #8131
|
|
See #8130
|
|
|
|
|
|
Type coercion for pointers to anon literals
|
|
Related: #4917
|
|
Allow variable captures on multi-prong switch arms
|
|
|
|
No functional changes, remove some dead code.
|
|
Handle the multi-prong case as we do with range cases.
Closes #7188
|
|
|
|
|
|
array/struct/union/slice
|
|
|
|
Making the enum type share the scope with the parent union means every
declaration "bleeds" into the enum scope.
Let's mint a fresh empty scope for the enum type.
Thanks to @Vexu for the test case.
Closes #7532
|
|
|
|
Don't use the instantiation argument types to build the function
parameter array.
f416535768fc30195cad6cd481f73fd1e80082aa worked around the problem, this
commit solves it.
|
|
stage1: Fix crash in can_mutate_comptime_var_state
|
|
Don't cut any corner and properly run the type trough every single step
even though it has no fields (or, better, the sum of the size of all its
fields is zero).
Fix the logic to consider an explicit non-zero-sized tag enough to treat
the type as sized.
Closes #7451
|
|
Co-authored-with: Vexu <git@vexu.eu>
|
|
|
|
|
|
ZigTypeIdOptional types have a different way of specifying their payload
value depending on whether the child type is a pointer or not (plus some
other special cases).
Fixes #7251
|
|
Some types require this extra bitcast, eg. structs or unions with extra
padding fields inserted by the compiler.
Fixes #7250
|
|
Prevent the crash by not making the codegen try to access the
non-existing ptr field in the slice.
Closes #6951
|
|
Make gen_const_ptr_struct_recursive aware of the possible presence of
some trailing padding by always bitcasting the pointer to its expected
type.
Not an elegant solution but makes LLVM happy and is consistent with how
the other callsites are handling this case.
Fixes #5398
|
|
Make the PPC64 port usable
|
|
Closes #7176
|
|
As for aarch64 we're waiting for LLVM to emit calls to the specific
builtins that implement this conversion.
|
|
Cover more common and uncommon cases.
|
|
Add more tests for reduce
|
|
stage1: Compile error instead of falling back to C for unsupported cc
|
|
|
|
|
|
Prevents silent memory corruption.
Closes #7055
|