| Age | Commit message (Collapse) | Author | |
|---|---|---|---|
| 2022-09-12 | remove pointless discards | Andrew Kelley | |
| 2022-09-12 | stage2: change how defers are stored in Zir | Veikka Tuominen | |
| Storing defers this way has the benefits that the defer doesn't get analyzed multiple times in AstGen, it takes up less space, and it makes Sema aware of defers allowing for 'unreachable else prong' error on error sets in generic code. The disadvantage is that it is a bit more complex and errdefers with payloads now emit a placeholder instruction (but those are rare). Sema.zig before: Total ZIR bytes: 3.7794370651245117MiB Instructions: 238996 (2.051319122314453MiB) String Table Bytes: 89.2802734375KiB Extra Data Items: 430144 (1.640869140625MiB) Sema.zig after: Total ZIR bytes: 3.3344192504882812MiB Instructions: 211829 (1.8181428909301758MiB) String Table Bytes: 89.2802734375KiB Extra Data Items: 374611 (1.4290275573730469MiB) | |||
| 2022-09-02 | AstGen: use reachableExpr for try operand | Veikka Tuominen | |
| Closes #12248 | |||
| 2022-08-30 | Sema: shift of comptime int with runtime value | Veikka Tuominen | |
| Closes #12290 | |||
| 2022-08-28 | AstGen: add error for named function type | Veikka Tuominen | |
| Closes #12660 | |||
| 2022-08-24 | Merge pull request #12623 from Vexu/stage2-fixes | Andrew Kelley | |
| Stage2 fixes | |||
| 2022-08-24 | AstGen: make root decls relative to beginning of file | Veikka Tuominen | |
| Closes #12610 | |||
| 2022-08-22 | stage2+stage1: remove type parameter from bit builtins | Veikka Tuominen | |
| Closes #12529 Closes #12511 Closes #6835 | |||
| 2022-08-18 | AstGen: disallow leading zeroes in int literals and int types | zooster | |
| This makes `0123` and `u0123` etc. illegal. I'm now confident that this is a good change because I actually caught two C header translation mistakes in `haiku.zig` with this. Clearly, `0123` being octal in C (TIL) can cause confusion, and we make this easier to read by requiring `0o` as the prefix and now also disallowing leading zeroes in integers. For consistency and because it looks weird, we disallow it for integer types too (e.g. `u0123`). Fixes #11963 Fixes #12417 | |||
| 2022-08-17 | Sema: allow empty enums and unions | Veikka Tuominen | |
| 2022-08-16 | AstGen: detect declarations shadowing locals | Veikka Tuominen | |
| Closes #9355 | |||
| 2022-08-13 | stage2 astgen: Use `rl` semantics for `@Type` | Cody Tapscott | |
| Resolves #12430. | |||
| 2022-08-10 | stage2: Implement explicit backing integers for packed structs | Isaac Freund | |
| Now the backing integer of a packed struct type may be explicitly specified with e.g. `packed struct(u32) { ... }`. | |||
| 2022-08-09 | stage2: generate call arguments in separate blocks | Veikka Tuominen | |
| 2022-08-09 | Merge pull request #12383 from ziglang/stage2-stack-traces | Andrew Kelley | |
| several improvements to error return tracing in the self-hosted compiler | |||
| 2022-08-09 | stage2: correct node offset of nested declarations | Veikka Tuominen | |
| 2022-08-08 | AstGen: emit debug stmt for try | Andrew Kelley | |
| This improves the following test case: ```zig pub fn main() !void { try foo(); } fn foo() !void { return error.Bad; } ``` The error return trace now points to the `try` token instead of pointing to the foo() function call, matching stage1. Closes #12308. | |||
| 2022-08-08 | AstGen: avoid multiple dbg_stmt instructions in a row | Andrew Kelley | |
| This is purely an optimization to emit fewer ZIR instructions. | |||
| 2022-08-08 | stage2: error return tracing handles ret better | Andrew Kelley | |
| Sema: insert an error return trace frame when appropriate when analyzing ret_load. Also optimize the instructions to avoid an unnecessary block sent to the backends. AstGen: always emit a dbg_stmt for return expressions, in between the defer instructions and the return instruction. This improves the following test case: ```zig pub fn main() !void { return foo(); } fn foo() !void { return error.Bad; } ``` The error return trace now points to the return token instead of pointing to the foo() function call, matching stage1. | |||
| 2022-08-08 | stage2: pass anon name strategy to reify | Veikka Tuominen | |
| 2022-08-06 | stage2: add a helpful error for when async is used | Veikka Tuominen | |
| 2022-08-03 | AstGen: better source location for if/while condition unwrapping | Veikka Tuominen | |
| 2022-08-03 | AstGen: check loop bodies and else branches for unused result | Veikka Tuominen | |
| 2022-08-03 | AstGen: add error for break/continue out of defer expression | Veikka Tuominen | |
| 2022-08-01 | stage2: better source location for var decls | Veikka Tuominen | |
| 2022-07-29 | stage2: handle tuple init edge cases | Veikka Tuominen | |
| 2022-07-29 | stage2: add error for comptime control flow in runtime block | Veikka Tuominen | |
| 2022-07-27 | AstGen: fix ref instruction injection for functions | Andrew Kelley | |
| For the expressions regarding return type, alignment, parameter type, etc. | |||
| 2022-07-27 | AstGen: add `dbg_stmt`s for `unreachable` and `@panic` | Veikka Tuominen | |
| Closes #12249 | |||
| 2022-07-26 | AstGen: disable null bytes and empty stings in some places | Veikka Tuominen | |
| Namely: * test names * identifiers * library names * import strings | |||
| 2022-07-24 | stage2: implement `noinline fn` | Meghan | |
| 2022-07-23 | Sema: validate duplicate fields in anon structs | Veikka Tuominen | |
| 2022-07-23 | AstGen: make comptime fields in packed and extern structs compile errors | Veikka Tuominen | |
| 2022-07-23 | Sema: bad union field access safety | Veikka Tuominen | |
| 2022-07-23 | move passing safety tests to stage2 | Veikka Tuominen | |
| 2022-07-21 | AstGen: add error for fields in opaque types | Veikka Tuominen | |
| 2022-07-21 | Sema: more union and enum tag type validation | Veikka Tuominen | |
| 2022-07-21 | stage2: better pointer source location | Veikka Tuominen | |
| 2022-07-13 | AstGen: fix loop control flow applying to wrong loop | Andrew Kelley | |
| In the case of 'continue' or 'break' inside the 'else' block of a 'while' or 'for' loop. Closes #12109 | |||
| 2022-07-13 | stage2: lower each struct field type, align, init separately | Andrew Kelley | |
| Previously, struct types, alignment values, and initialization expressions were all lowered into the same ZIR body, which caused false positive "depends on itself" errors when the initialization expression depended on the size of the struct. This also uses ResultLoc.coerced_ty for struct field alignment and initialization values. The resulting ZIR encoding ends up being roughly the same, neither smaller nor larger than previously. Closes #12029 | |||
| 2022-07-07 | Merge pull request #12016 from Vexu/stage2-compile-errors | Andrew Kelley | |
| Stage2 compile error improvements | |||
| 2022-07-07 | AstGen: fix catch payoad not checking for shadowing | emma | |
| 2022-07-07 | stage2: move C pointer allowzero error to AstGen | Veikka Tuominen | |
| 2022-07-07 | Sema: improve array source location | Veikka Tuominen | |
| 2022-07-07 | Module: add `.node_offset_un_op` | Veikka Tuominen | |
| 2022-07-07 | Sema: panic at comptime + misc error message improvements | Veikka Tuominen | |
| 2022-07-07 | AstGen: move error_to_int, int_to_error and select to extended | Veikka Tuominen | |
| 2022-07-01 | AstGen: use elem_{ptr,val}_node for array access syntax | Veikka Tuominen | |
| 2022-07-01 | Sema: validate deref operator type and value | Veikka Tuominen | |
| 2022-06-30 | Sema: add source location to coerce result ptr, fix negation error | Veikka Tuominen | |
