zig/test/behavior
Thomas Ives 51efd553ae C backend: Improve lowering of Zig types to C types
1. Changed Zig pointers to functions to be typedef'd so then we can
   treat them the same as other types.

2. Distinguished between const slices (zig_L prefix) and mut slices
   (zig_M prefix).

3. Changed lowering of Zig "const pointers" (e.g. *const u8) to to C
   "pointers to const" (e.g. const char *) rather than C "const
   pointers" (e.g.  char * const)

4. Ensured that all typedefs are "linked" even if the decl doesn't
   require any forward declarations

5. Added test that exercises function pointer type rendering

6. Changed .slice_ptr instruction to allocate pointer local rather than
   a uintptr_t local
2021-11-10 12:39:47 -05:00
..
bugs astgen.zig: fix false positive in breakExpr's checking for store_to_block_ptr 2021-10-18 13:18:47 -04:00
hasdecl
import
namespace_depends_on_compile_var
pub_enum
usingnamespace std: fix regressions from this branch 2021-09-01 17:54:07 -07:00
align_stage1.zig stage2: implement aligned variables and @alignCast 2021-10-22 17:50:36 -07:00
align.zig stage2: implement aligned variables and @alignCast 2021-10-22 17:50:36 -07:00
alignof.zig
array_stage1.zig stage2: more division support 2021-10-21 19:05:26 -07:00
array.zig stage2: more division support 2021-10-21 19:05:26 -07:00
asm.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
async_fn.zig fix code broken from previous commit 2021-06-21 17:03:03 -07: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_llvm.zig C backend: implement trunc for unsigned non-pow2 ints 2021-10-28 18:33:13 -07:00
basic.zig C backend: Improve lowering of Zig types to C types 2021-11-10 12:39:47 -05:00
bit_shifting.zig std, src, doc, test: remove unused variables 2021-06-21 17:03:03 -07:00
bitcast_stage1.zig stage2 LLVM backend: fix bitcast 2021-10-26 16:43:18 -07:00
bitcast.zig stage2 LLVM backend: fix bitcast 2021-10-26 16:43:18 -07:00
bitreverse.zig
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
call_stage1.zig AstGen: fix while and for with unreachable bodies 2021-10-02 20:15:03 -07:00
call.zig AstGen: fix while and for with unreachable bodies 2021-10-02 20:15:03 -07:00
cast_stage1.zig stage2: Implement Sema.floatToInt (#10097) 2021-11-09 18:52:30 -05:00
cast.zig stage2: Implement Sema.floatToInt (#10097) 2021-11-09 18:52:30 -05: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_stage1.zig AstGen: fix while and for with unreachable bodies 2021-10-02 20:15:03 -07:00
defer.zig AstGen: fix while and for with unreachable bodies 2021-10-02 20:15:03 -07:00
enum_stage1.zig stage2: enum fixes 2021-10-05 23:05:14 -07:00
enum.zig stage2: implement runtime @intToEnum 2021-10-05 21:38:47 -07:00
error_stage1.zig stage2: fix handling of error unions as return type 2021-10-17 15:36:12 -07:00
error.zig stage2: fix handling of error unions as return type 2021-10-17 15:36:12 -07:00
eval_stage1.zig stage2: more division support 2021-10-21 19:05:26 -07:00
eval.zig stage2: more division support 2021-10-21 19:05:26 -07:00
field_parent_ptr.zig
floatop_stage1.zig AstGen: make the index variable of inline for a alloc_comptime 2021-10-20 15:34:10 -07:00
floatop.zig AstGen: make the index variable of inline for a alloc_comptime 2021-10-20 15:34:10 -07:00
fn_delegation.zig
fn_in_struct_in_comptime.zig
fn_stage1.zig astgen.zig: emit ZIR for callconv before return type in fnDecl and fnProtoExpr 2021-10-23 22:52:43 -04:00
fn.zig Sema: fix ret_ptr when inlining 2021-10-26 15:43:57 -07:00
for_stage1.zig AstGen: make the index variable of inline for a alloc_comptime 2021-10-20 15:34:10 -07:00
for.zig AstGen: make the index variable of inline for a alloc_comptime 2021-10-20 15:34:10 -07:00
generics_stage1.zig Stage 2: Support inst.func() syntax (#9827) 2021-09-28 12:00:35 -05:00
generics.zig Stage 2: Support inst.func() syntax (#9827) 2021-09-28 12:00:35 -05:00
hasdecl.zig
hasfield.zig
if_stage1.zig AstGen: fix while and for with unreachable bodies 2021-10-02 20:15:03 -07:00
if.zig C backend: fix crash when number of Decls passes a threshold 2021-10-28 17:23:02 -07:00
import.zig std, src, doc, test: remove unused variables 2021-06-21 17:03:03 -07:00
incomplete_struct_param_tld.zig
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_stage1.zig stage2: more division support 2021-10-21 19:05:26 -07:00
math.zig stage1/stage2: Simplify divTrunc impl 2021-10-24 17:11:43 +02: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
misc.zig stage2: fix Decl addrspace being undefined 2021-10-22 15:53:59 -07:00
muladd.zig compiler-rt: Fix f16 API declarations to be consistent 2021-11-04 14:30:35 -04: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_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
null.zig C backend: implement ?void, and other zero sized types 2021-11-02 12:45:29 -04:00
optional_stage1.zig Sema: implement coerce_result_ptr for optionals 2021-11-09 23:01:35 -07:00
optional.zig Sema: implement coerce_result_ptr for optionals 2021-11-09 23:01:35 -07:00
pointers_stage1.zig stage2: implement more C pointer Sema and comptime ptr arith 2021-10-23 19:47:32 -07:00
pointers.zig stage2: implement more C pointer Sema and comptime ptr arith 2021-10-23 19:47:32 -07:00
popcount_stage1.zig stage2: implement @popCount for non-vectors 2021-10-29 17:49:02 -07:00
popcount.zig stage2: implement @popCount for non-vectors 2021-10-29 17:49:02 -07:00
ptrcast_stage1.zig stage2: implement comptime loads through casted pointers 2021-10-21 22:56:11 -07:00
ptrcast.zig stage2: implement comptime loads through casted pointers 2021-10-21 22:56:11 -07:00
pub_enum.zig
ref_var_in_if_after_if_2nd_switch_prong.zig
reflection.zig fix code broken from previous commit 2021-06-21 17:03:03 -07:00
saturating_arithmetic.zig stage2: fix Decl addrspace being undefined 2021-10-22 15:53:59 -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_stage1.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
sizeof_and_typeof.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
slice_sentinel_comptime.zig std, src, doc, test: remove unused variables 2021-06-21 17:03:03 -07:00
slice_stage1.zig stage2: generate correct constants for zero-sized arrays 2021-10-25 20:41:15 +02:00
slice_stage2.zig stage2: comptime slice of pointer to hardcoded address 2021-10-25 20:41:15 +02:00
slice.zig stage2: generate correct constants for zero-sized arrays 2021-10-25 20:41:15 +02:00
src.zig
struct_contains_null_ptr_itself.zig
struct_contains_slice_of_itself.zig
struct_llvm.zig remove 2 duplicated behavior tests from struct_llvm.zig 2021-11-09 16:32:39 -07:00
struct_stage1.zig stage2: support nested structs and arrays and sret 2021-10-11 11:39:12 -07:00
struct.zig C backend: while, struct tests, better undefined global handling 2021-11-08 14:23:55 -05:00
switch_prong_err_enum.zig
switch_prong_implicit_cast.zig
switch_stage1.zig stage2: implement runtime pointer access to global constants 2021-10-26 22:41:19 -07:00
switch.zig stage2: implement runtime pointer access to global constants 2021-10-26 22:41:19 -07:00
this.zig Stage2: Implement comptime closures and the This builtin (#9823) 2021-09-23 13:17:06 -04:00
translate_c_macros_stage1.zig stage2: various fixes to cImport, sizeOf and types to get tests passing 2021-09-20 20:51:31 -07: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 stage2: various fixes to cImport, sizeOf and types to get tests passing 2021-09-20 20:51:31 -07:00
truncate.zig Fix unexpected truncation behavior with comptime_int larger than u64 range (#9303) 2021-07-06 12:42:18 +03:00
try.zig
tuple.zig std, src, doc, test: remove unused variables 2021-06-21 17:03:03 -07:00
type_info.zig fix code broken from previous commit 2021-06-21 17:03:03 -07:00
type.zig Address Spaces: Pointer and function info in @Type 2021-09-20 02:29:04 +02:00
typename.zig stage1: fix anon struct naming in certain cases 2021-07-28 18:17:11 -04:00
undefined.zig
underscore.zig AstGen: fix while and for with unreachable bodies 2021-10-02 20:15:03 -07:00
union_stage1.zig stage2: implement runtime pointer access to global constants 2021-10-26 22:41:19 -07:00
union_with_members.zig AstGen: fix while and for with unreachable bodies 2021-10-02 20:15:03 -07:00
union.zig stage2: implement runtime pointer access to global constants 2021-10-26 22:41:19 -07:00
usingnamespace_stage1.zig std: fix regressions from this branch 2021-09-01 17:54:07 -07:00
usingnamespace.zig stage2: first pass at implementing usingnamespace 2021-09-01 17:54:06 -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
while_stage1.zig stage2: LLVM backend: implement wrap_optional AIR 2021-10-14 22:16:26 -07:00
while.zig stage2: LLVM backend: implement wrap_optional AIR 2021-10-14 22:16:26 -07:00
widening.zig stage2: remove use of builtin.stage2_arch workaround 2021-10-13 18:43:43 -07:00