0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/test/behavior
Andrew Kelley a5c7742ba6 stage2: fix Decl garbage collection not marking enough
It is the job of codegen backends to mark Decls that are referenced as
alive so that the frontend does not sweep them with the garbage. This
commit unifies the code between the backends with an added method on
Decl.

The implementation is more complete than before, switching on the Decl
val tag and recursing into sub-values.

As a result, two more array tests are passing.
History 2022-01-15 00:17:25 -07:00
..
bugs compiler_rt: move more functions to the stage2 section 2021-12-29 00:39:25 -07:00
hasdecl move behavior tests from test/stage1/ to test/ 2021-04-29 15:54:04 -07:00
import move behavior tests from test/stage1/ to test/ 2021-04-29 15:54:04 -07:00
namespace_depends_on_compile_var move behavior tests from test/stage1/ to test/ 2021-04-29 15:54:04 -07:00
pub_enum move behavior tests from test/stage1/ to test/ 2021-04-29 15:54:04 -07:00
usingnamespace std: fix regressions from this branch 2021-09-01 17:54:07 -07:00
align.zig compiler_rt: move more functions to the stage2 section 2021-12-29 00:39:25 -07:00
align_llvm.zig Sema: fix alignment of type-inferred locals 2021-11-22 20:30:20 -07:00
align_stage1.zig compiler_rt: move more functions to the stage2 section 2021-12-29 00:39:25 -07:00
alignof.zig Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen 2021-05-08 14:45:21 -07:00
array.zig stage2: detection of comptime array literals 2022-01-13 22:13:44 -07:00
array_llvm.zig stage2: fix Decl garbage collection not marking enough 2022-01-15 00:17:25 -07:00
array_stage1.zig stage2: fix Decl garbage collection not marking enough 2022-01-15 00:17:25 -07:00
asm.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
async_fn.zig stage1, stage2: rename c_void to anyopaque (#10316) 2021-12-19 00:24:45 -05:00
atomics.zig stage2: remove use of builtin.stage2_arch workaround 2021-10-13 18:43:43 -07:00
await_struct.zig std, src, doc, test: remove unused variables 2021-06-21 17:03:03 -07:00
basic.zig C backend: Improve lowering of Zig types to C types 2021-11-10 12:39:47 -05:00
basic_llvm.zig C backend: implement trunc for unsigned non-pow2 ints 2021-10-28 18:33:13 -07:00
bit_shifting.zig bit_shifting.zig now passes stage2 llvm backend 2022-01-07 22:10:36 +01:00
bitcast.zig stage2 LLVM backend: fix bitcast 2021-10-26 16:43:18 -07:00
bitcast_stage1.zig stage2 LLVM backend: fix bitcast 2021-10-26 16:43:18 -07:00
bitreverse.zig Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen 2021-05-08 14:45:21 -07:00
bool.zig C backend: fix @boolToInt 2021-10-28 17:33:05 -07:00
byteswap.zig re-enable mips behavior tests for vectors 2021-09-01 15:41:29 -07:00
byval_arg_var.zig Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen 2021-05-08 14:45:21 -07:00
call.zig AstGen: fix while and for with unreachable bodies 2021-10-02 20:15:03 -07:00
call_stage1.zig AstGen: fix while and for with unreachable bodies 2021-10-02 20:15:03 -07:00
cast.zig wasm: Implement float_to_int 2022-01-10 21:01:00 +01:00
cast_int.zig wasm: Implement float_to_int 2022-01-10 21:01:00 +01:00
cast_llvm.zig compiler_rt: move more functions to the stage2 section 2021-12-29 00:39:25 -07:00
cast_stage1.zig Sema: implement peer type resolution of signed and unsigned ints 2022-01-02 14:11:37 -07:00
comptime_memory.zig Add comptime memory tests 2021-08-30 18:50:07 -04:00
const_slice_child.zig AstGen: fix while and for with unreachable bodies 2021-10-02 20:15:03 -07:00
defer.zig compiler_rt: move more functions to the stage2 section 2021-12-29 00:39:25 -07:00
defer_stage1.zig compiler_rt: move more functions to the stage2 section 2021-12-29 00:39:25 -07:00
enum.zig Sema: fix anytype parameters whose types require comptime 2021-12-27 19:39:28 -07:00
enum_llvm.zig Sema: fix anytype parameters whose types require comptime 2021-12-27 19:39:28 -07:00
enum_stage1.zig lint: duplicate import (#10519) 2022-01-07 00:06:06 -05:00
error.zig sema: error union in-memory coercion 2021-11-22 03:21:31 +01:00
error_llvm.zig stage2: @errorName sema+llvm 2022-01-08 14:30:11 -05:00
error_stage1.zig stage2: @errorName sema+llvm 2022-01-08 14:30:11 -05:00
eval.zig compiler_rt: move more functions to the stage2 section 2021-12-29 00:39:25 -07:00
eval_stage1.zig compiler_rt: move more functions to the stage2 section 2021-12-29 00:39:25 -07:00
field_parent_ptr.zig Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen 2021-05-08 14:45:21 -07:00
floatop.zig stage1: fix bigint_init_bigfloat for single-limb negative floats 2022-01-14 13:29:58 -05:00
floatop_stage1.zig AstGen: make the index variable of inline for a alloc_comptime 2021-10-20 15:34:10 -07:00
fn.zig stage2: implement @typeName 2021-11-27 00:27:52 -07:00
fn_delegation.zig Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen 2021-05-08 14:45:21 -07:00
fn_in_struct_in_comptime.zig Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen 2021-05-08 14:45:21 -07:00
fn_stage1.zig stage2: implement @typeName 2021-11-27 00:27:52 -07:00
for.zig stage2: detection of comptime array literals 2022-01-13 22:13:44 -07:00
for_stage1.zig AstGen: fix loop result locations 2021-12-27 15:30:31 -07:00
generics.zig stage2: move some tests which are now passing 2021-11-22 04:36:57 +01:00
generics_llvm.zig stage2: move some tests which are now passing 2021-11-22 04:36:57 +01:00
hasdecl.zig Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen 2021-05-08 14:45:21 -07:00
hasfield.zig Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen 2021-05-08 14:45:21 -07:00
if.zig C backend: fix crash when number of Decls passes a threshold 2021-10-28 17:23:02 -07:00
if_stage1.zig AstGen: fix while and for with unreachable bodies 2021-10-02 20:15:03 -07:00
import.zig lint: duplicate import (#10519) 2022-01-07 00:06:06 -05:00
incomplete_struct_param_tld.zig Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen 2021-05-08 14:45:21 -07:00
int128.zig lint: duplicate import (#10519) 2022-01-07 00:06:06 -05:00
inttoptr.zig std, src, doc, test: remove unused variables 2021-06-21 17:03:03 -07:00
ir_block_deps.zig std, src, doc, test: remove unused variables 2021-06-21 17:03:03 -07:00
math.zig stage2: implement @ctz and @clz including SIMD 2022-01-12 23:53:26 -07:00
math_stage1.zig stage2: implement @ctz and @clz including SIMD 2022-01-12 23:53:26 -07:00
maximum_minimum.zig stage2: implement @minimum and @maximum, including vectors 2021-10-14 21:17:30 -07:00
member_func.zig Stage 2: Support inst.func() syntax (#9827) 2021-09-28 12:00:35 -05:00
merge_error_sets.zig move behavior tests from test/stage1/ to test/ 2021-04-29 15:54:04 -07:00
misc.zig Sema: fix anytype parameters whose types require comptime 2021-12-27 19:39:28 -07:00
muladd.zig disable failing @mulAdd behavior test for aarch64-macos 2021-12-01 17:30:41 -08:00
namespace_depends_on_compile_var.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
null.zig stage2: implement @typeName 2021-11-27 00:27:52 -07:00
null_llvm.zig C backend: implement ?void, and other zero sized types 2021-11-02 12:45:29 -04:00
null_stage1.zig stage2: LLVM backend: lower constant field/elem ptrs 2021-10-17 17:02:20 -07:00
optional.zig Sema: fix analyzeBlockBody logic 2021-11-26 23:17:01 -07:00
optional_llvm.zig C backend: errors and optionals 2021-11-23 13:46:56 -07:00
optional_stage1.zig Sema: fix analyzeBlockBody logic 2021-11-26 23:17:01 -07:00
pointers.zig C backend: basic big ints, fix airPtrToInt, array references, pointer arithmetic UB with NULL, implement airPtrElemPtr/Val, fix redundant indirection/references with arrays 2021-11-16 16:51:31 -07:00
pointers_stage1.zig std lib API deprecations for the upcoming 0.9.0 release 2021-11-30 00:13:07 -07:00
popcount.zig stage2: implement @ctz and @clz including SIMD 2022-01-12 23:53:26 -07:00
popcount_stage1.zig stage2: implement @popCount for non-vectors 2021-10-29 17:49:02 -07:00
prefetch.zig stage1: implement @prefetch() builtin 2021-12-11 00:29:31 +01:00
ptrcast.zig stage2: implement comptime loads through casted pointers 2021-10-21 22:56:11 -07:00
ptrcast_stage1.zig stage1, stage2: rename c_void to anyopaque (#10316) 2021-12-19 00:24:45 -05:00
pub_enum.zig Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen 2021-05-08 14:45:21 -07:00
ref_var_in_if_after_if_2nd_switch_prong.zig lint: duplicate import (#10519) 2022-01-07 00:06:06 -05:00
reflection.zig lint: duplicate import (#10519) 2022-01-07 00:06:06 -05:00
saturating_arithmetic.zig stage2: fix Decl addrspace being undefined 2021-10-22 15:53:59 -07:00
saturating_arithmetic_stage1.zig stage1: saturating shl operates using LHS type 2021-12-08 15:25:31 -07:00
select.zig Add @select 2021-07-26 20:05:48 -04:00
shuffle.zig re-enable mips behavior tests for vectors 2021-09-01 15:41:29 -07:00
sizeof_and_typeof.zig Implement bitOffsetOf 2022-01-08 14:01:28 +01:00
sizeof_and_typeof_stage1.zig Implement bitOffsetOf 2022-01-08 14:01:28 +01:00
slice.zig stage2: generate correct constants for zero-sized arrays 2021-10-25 20:41:15 +02:00
slice_sentinel_comptime.zig std, src, doc, test: remove unused variables 2021-06-21 17:03:03 -07:00
slice_stage1.zig stage1: fix access of slice sentinel at comptime 2021-12-28 14:44:46 +02:00
slice_stage2.zig stage2: comptime slice of pointer to hardcoded address 2021-10-25 20:41:15 +02:00
src.zig Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen 2021-05-08 14:45:21 -07:00
struct.zig compiler_rt: move more functions to the stage2 section 2021-12-29 00:39:25 -07:00
struct_contains_null_ptr_itself.zig Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen 2021-05-08 14:45:21 -07:00
struct_contains_slice_of_itself.zig Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen 2021-05-08 14:45:21 -07:00
struct_llvm.zig Sema: const inferred alloc infers comptime-ness 2022-01-06 00:52:10 -07:00
struct_stage1.zig Sema: const inferred alloc infers comptime-ness 2022-01-06 00:52:10 -07:00
switch.zig Sema: more union fixes 2021-12-28 23:22:09 -07:00
switch_prong_err_enum.zig Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen 2021-05-08 14:45:21 -07:00
switch_prong_implicit_cast.zig Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen 2021-05-08 14:45:21 -07:00
switch_stage1.zig Sema: more union fixes 2021-12-28 23:22:09 -07:00
this.zig Stage2: Implement comptime closures and the This builtin (#9823) 2021-09-23 13:17:06 -04:00
translate_c_macros.h translate-c: handle macros that cast to cv void 2021-08-06 09:10:50 +03:00
translate_c_macros.zig lint: duplicate import (#10519) 2022-01-07 00:06:06 -05:00
translate_c_macros_stage1.zig lint: duplicate import (#10519) 2022-01-07 00:06:06 -05:00
truncate.zig Fix unexpected truncation behavior with comptime_int larger than u64 range (#9303) 2021-07-06 12:42:18 +03:00
truncate_stage1.zig stage1: saturating shl operates using LHS type 2021-12-08 15:25:31 -07:00
try.zig Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen 2021-05-08 14:45:21 -07:00
tuple.zig std, src, doc, test: remove unused variables 2021-06-21 17:03:03 -07:00
type.zig stage2: move some more tests 2022-01-03 02:09:54 +01:00
type_info.zig stage2: move some more tests 2022-01-03 02:09:54 +01:00
type_info_stage1.zig stage2: move some more tests 2022-01-03 02:09:54 +01:00
type_stage1.zig stage2: move some more tests 2022-01-03 02:09:54 +01:00
typename.zig stage1: fix anon struct naming in certain cases 2021-07-28 18:17:11 -04:00
undefined.zig stage2: implement @typeName 2021-11-27 00:27:52 -07:00
underscore.zig AstGen: fix while and for with unreachable bodies 2021-10-02 20:15:03 -07:00
union.zig compiler_rt: move more functions to the stage2 section 2021-12-29 00:39:25 -07:00
union_stage1.zig Sema: more union fixes 2021-12-28 23:22:09 -07:00
union_with_members.zig Sema: improve union support 2021-12-28 20:20:30 -07:00
usingnamespace.zig put the passing stage2 behavior tests back 2021-11-30 16:15:42 -07:00
var_args.zig fix code broken from previous commit 2021-06-21 17:03:03 -07:00
vector.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
void.zig std, src, doc, test: remove unused variables 2021-06-21 17:03:03 -07:00
wasm.zig Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen 2021-05-08 14:45:21 -07:00
while.zig AstGen: fix loop result locations 2021-12-27 15:30:31 -07:00
while_stage1.zig AstGen: fix loop result locations 2021-12-27 15:30:31 -07:00
widening.zig lint: duplicate import (#10519) 2022-01-07 00:06:06 -05:00