0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/test/behavior
Jakub Konka 5944e89016 stage2: lower unnamed constants in Elf and MachO
* link: add a virtual function `lowerUnnamedConsts`, similar to
  `updateFunc` or `updateDecl` which needs to be implemented by the
  linker backend in order to be used with the `CodeGen` code
* elf: implement `lowerUnnamedConsts` specialization where we
  lower unnamed constants to `.rodata` section. We keep track of the
  atoms encompassing the lowered unnamed consts in a global table
  indexed by parent `Decl`. When the `Decl` is updated or destroyed,
  we clear the unnamed consts referenced within the `Decl`.
* macho: implement `lowerUnnamedConsts` specialization where we
  lower unnamed constants to `__TEXT,__const` section. We keep track of the
  atoms encompassing the lowered unnamed consts in a global table
  indexed by parent `Decl`. When the `Decl` is updated or destroyed,
  we clear the unnamed consts referenced within the `Decl`.
* x64: change `MCValue.linker_sym_index` into two `MCValue`s: `.got_load` and
  `.direct_load`. The former signifies to the emitter that it should
  emit a GOT load relocation, while the latter that it should emit
  a direct load (`SIGNED`) relocation.
* x64: lower `struct` instantiations
History 2022-02-07 08:39:00 +01:00
..
bugs stage2 ARM: enable a handful of passing behavior tests 2022-02-06 02:23:31 -05: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 stage2: lower unnamed constants in Elf and MachO 2022-02-07 08:39:00 +01:00
alignof.zig stage2 ARM: enable a handful of passing behavior tests 2022-02-06 02:23:31 -05:00
array.zig Merge pull request #10638 from Luukdegram/wasm-refactor 2022-01-20 20:26:09 +01:00
array_llvm.zig Move passing behavior tests 2022-02-03 22:31:29 +01: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 disable failing atomicrmw test on llvm + aarch64 2022-01-18 21:25:22 -07:00
await_struct.zig std, src, doc, test: remove unused variables 2021-06-21 17:03:03 -07:00
basic.zig stage2: apply type coercion in if expressions 2022-02-06 21:26:26 -05:00
bit_shifting.zig wasm: Implement genTypedValue for enums 2022-01-25 19:29:40 +01:00
bitcast.zig stage2 ARM: enable a handful of passing behavior tests 2022-02-06 02:23:31 -05: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 organize behavior tests 2022-01-26 20:59:20 -07:00
cast.zig stage2: lower unnamed constants in Elf and MachO 2022-02-07 08:39:00 +01:00
cast_int.zig wasm: Implement float_to_int 2022-01-10 21:01:00 +01:00
cast_llvm.zig stage2: rework a lot of stuff 2022-01-24 21:53:57 -07:00
comptime_memory.zig stage2: type system treats fn ptr and body separately 2022-01-24 21:47:53 -07:00
const_slice_child.zig AstGen: fix while and for with unreachable bodies 2021-10-02 20:15:03 -07:00
defer.zig organize behavior tests 2022-01-26 00:36:12 -07:00
enum.zig Sema: implement struct init is_ref=true 2022-01-26 20:02:01 -07:00
error.zig organize behavior tests 2022-01-26 20:59:20 -07:00
error_llvm.zig stage2: @errorName sema+llvm 2022-01-08 14:30:11 -05:00
eval.zig organize behavior tests 2022-01-26 00:36:12 -07:00
export_self_referential_type_info.zig update behavior tests and compile error tests 2022-01-31 22:33:49 -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 add behavior tests for f80 2022-01-28 11:45:04 -07:00
fn.zig organize behavior tests 2022-01-26 00:36:12 -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
for.zig organize behavior tests 2022-01-26 00:36:12 -07:00
generics.zig stage2 ARM: enable a handful of passing behavior tests 2022-02-06 02:23:31 -05: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 organize behavior tests 2022-01-26 00:36:12 -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 remove zig_is_stage2 from @import("builtin") 2022-01-17 21:55:49 -07:00
inttoptr.zig stage2: type system treats fn ptr and body separately 2022-01-24 21:47:53 -07:00
ir_block_deps.zig std, src, doc, test: remove unused variables 2021-06-21 17:03:03 -07:00
math.zig stage2: add more float arithmetic and f80 support 2022-02-06 19:27:54 -07:00
maximum_minimum.zig stage2: implement @minimum and @maximum, including vectors 2021-10-14 21:17:30 -07:00
member_func.zig stage2: type system treats fn ptr and body separately 2022-01-24 21:47:53 -07:00
merge_error_sets.zig move behavior tests from test/stage1/ to test/ 2021-04-29 15:54:04 -07:00
misc.zig organize behavior tests 2022-01-26 00:36:12 -07:00
muladd.zig add behavior tests for f80 2022-01-28 11:45:04 -07:00
namespace_depends_on_compile_var.zig stage2 ARM: enable a handful of passing behavior tests 2022-02-06 02:23:31 -05: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 wasm: Implement genTypedValue for enums 2022-01-25 19:29:40 +01:00
optional_stage1.zig Sema: fix analyzeBlockBody logic 2021-11-26 23:17:01 -07:00
pointers.zig Sema: implement struct init is_ref=true 2022-01-26 20:02:01 -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 Sema: implement struct init is_ref=true 2022-01-26 20:02:01 -07: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 stage1: fix saturating arithmetic producing incorrect results on type comptime_int, allow saturating left shift on type comptime int 2022-01-29 18:12:28 +02: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 Sema: fixes to fieldVal, resolveStructFully, Type.eql 2022-02-03 23:59:32 -07:00
slice_sentinel_comptime.zig std, src, doc, test: remove unused variables 2021-06-21 17:03:03 -07:00
src.zig Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen 2021-05-08 14:45:21 -07:00
struct.zig stage2: lower unnamed constants in Elf and MachO 2022-02-07 08:39:00 +01: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 stage2: remove anytype fields from the language 2022-02-01 19:06:40 -07:00
switch.zig Sema: implement else capture value 2022-01-17 20:45:55 -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
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 organize behavior tests 2022-01-26 20:59:20 -07:00
truncate.zig stage2: add zero- and sign-extend moves to x86_64 2022-01-26 16:14:57 +01: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: remove anytype fields from the language 2022-02-01 19:06:40 -07:00
type_stage1.zig stage1: avoid anytype fields for type info 2022-02-01 18:10:19 -07: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 wasm: Implement genTypedValue for enums 2022-01-25 19:29:40 +01:00
union_stage1.zig stage2: remove anytype fields from the language 2022-02-01 19:06:40 -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 Sema: implement else capture value 2022-01-17 20:45:55 -07:00
widening.zig add behavior tests for f80 2022-01-28 11:45:04 -07:00
wrapping_arithmetic.zig stage1: fix saturating arithmetic producing incorrect results on type comptime_int, allow saturating left shift on type comptime int 2022-01-29 18:12:28 +02:00