aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/struct_llvm.zig
AgeCommit message (Collapse)Author
2022-02-12organize behavior testsAndrew Kelley
moving towards disabling failing tests on an individual basis
2022-02-01stage2: remove anytype fields from the languageAndrew Kelley
closes #10705
2022-01-26organize behavior testsAndrew Kelley
check the set of passing tests; move towards the disabling logic being inside each test rather than which files are included. this enables a few more passing tests.
2022-01-06Sema: const inferred alloc infers comptime-nessAndrew Kelley
const locals now detect if the value ends up being comptime known. In such case, it replaces the runtime AIR instructions with a decl_ref const. In the backends, some more sophisticated logic for marking decls as alive was needed to prevent Decls incorrectly being garbage collected that were indirectly referenced in such manner.
2021-12-27Sema: implement array coercionAndrew Kelley
2021-12-23stage2: initial implementation of packed structsAndrew Kelley
Layout algorithm: all `align(0)` fields are squished together as if they were a single integer with a number of bits equal to `@bitSizeOf` each field added together. Then the natural ABI alignment of that integer is used for that pseudo-field.
2021-12-22behavior tests: stage2 is not yet passing this testAndrew Kelley
Looks like I repeated the same mistake, which last time was addressed in 1e0addcf73ee71d23a41b744995848bcca38e8d3.
2021-12-22stage2: `Type.hasCodeGenBits` asserts structs and unions have fieldsAndrew Kelley
Previously, this function would return an incorrect result for structs and unions which did not have their fields resolved yet. This required introducing more logic in Sema to resolve types before doing certain things such as creating an anonmyous Decl and emitting function call AIR. As a result a couple more struct tests pass. Oh, and I implemented the language change to make sizeOf for pointers always return pointer size bytes even if the element type is 0 bits.
2021-12-21Sema: fix empty struct initAndrew Kelley
* Extract common logic between `zirStructInitEmpty` and `zirStructInit`. * `resolveTypeFields` additionally sets status to `have_layout` if the total number of fields is 0.
2021-11-30put the passing stage2 behavior tests backAndrew Kelley
This mostly reverts commit 692c254336da71cbe21aaf9fbc21240fd1269b95. The test "for loop over pointers to struct, getting field from struct pointer" is still failing on the CI so that one is not moved over.
2021-11-30Revert "I found some more passing behavior tests"Andrew Kelley
This reverts commit 0a9b4d092f58595888f9e4be8ef683b2ed8a0da1. Hm, these are all passing for me locally. I'll have to do some troubleshooting to figure out which one(s) are failing on the CI.
2021-11-29I found some more passing behavior testsAndrew Kelley
2021-11-09remove 2 duplicated behavior tests from struct_llvm.zigAndrew Kelley
2021-11-08C backend: while, struct tests, better undefined global handlingEmily Bellows
1. Function signatures that return a no member struct return void 2. Undefined var decls don't get a value generated for them 3. Don't generate bitcast code if the result isn't used, since bitcast is a pure function. Right now struct handling code generates some weird unused bitcast AIR, and this optimization side steps that issue.