0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/test
Andrew Kelley a3104a4a78 stage2: fix comptime stores and sentinel-terminated arrays
* ZIR: the `array_type_sentinel` now has a source node attached to it
   for proper error reporting.
 * Refactor: move `Module.arrayType` to `Type.array`
 * Value: the `bytes` and `array` tags now include the sentinel, if the
   type has one. This simplifies comptime evaluation logic.
 * Sema: fix `zirStructInitEmpty` to properly handle when the type is
   void or a sentinel-terminated array. This handles the syntax `void{}`
   and `[0:X]T{}`.
 * Sema: fix the logic for reporting "cannot store runtime value in
   compile time variable" as well as for emitting a runtime store when a
   pointer value is comptime known but it is a global variable.
 * Sema: implement elemVal for double pointer to array. This can happen
   with this code for example: `var a: *[1]u8 = undefined; _ = a[0];`
 * Sema: Rework the `storePtrVal` function to properly handle nested
   structs and arrays.
   - Also it now handles comptime stores through a bitcasted pointer.
     When the pointer element type and the type according to the Decl
     don't match, the element value is bitcasted before storage.
History 2021-10-12 21:38:46 -07:00
..
behavior stage2: fix comptime stores and sentinel-terminated arrays 2021-10-12 21:38:46 -07:00
src migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
stage1/c_abi stage1: Expand SysV C ABI support for small structs 2021-07-28 18:13:17 -04:00
stage2 stage2: add astgen errors for untyped union fields and union field values without inferred tag type 2021-10-09 20:39:50 -04:00
standalone migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
assemble_and_link.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
behavior.zig stage2: support nested structs and arrays and sret 2021-10-11 11:39:12 -07:00
cases.zig Fix failing tests and windows link dependencies 2021-09-22 14:39:02 -05:00
cli.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
compare_output.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
compile_errors.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
gen_h.zig run zig fmt on src/ and test/ 2020-10-31 12:21:49 +02:00
run_translated_c.zig Spelling corrections (#9833) 2021-09-24 13:39:20 -04:00
runtime_safety.zig fix unused variable errors in runtime safety test cases 2021-06-23 10:44:46 -07:00
stack_traces.zig overhaul elf csu (c-runtime startup) logic 2021-05-23 15:38:57 -04:00
standalone.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
tests.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
translate_c.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00