zig/test/behavior
Andrew Kelley c8fb36b36c stage2: LLVM backend: implement @tagName for enums
Introduced a new AIR instruction: `tag_name`. Reasons to do this
instead of lowering it in Sema to a switch, function call, array
lookup, or if-else tower:
 * Sema is a bottleneck; do less work in Sema whenever possible.
 * If any optimization passes run, and the operand to becomes
   comptime-known, then it could change to have a comptime result
   value instead of lowering to a function or array or something which
   would then have to be garbage-collected.
 * Backends may want to choose to use a function and a switch branch,
   or they may want to use a different strategy.

Codegen for `@tagName` is implemented for the LLVM backend but not any
others yet.

Introduced some new `Type` tags:
 * `const_slice_u8_sentinel_0`
 * `manyptr_const_u8_sentinel_0`

The motivation for this was to make typeof() on the tag_name AIR
instruction non-allocating.

A bunch more enum tests are passing now.
2021-12-27 01:14:50 -07:00
..
2021-10-21 19:05:26 -07:00
2021-10-21 19:05:26 -07:00
2021-10-26 16:43:18 -07:00
2021-10-28 17:33:05 -07:00
2021-08-30 18:50:07 -04:00
2021-11-22 03:21:31 +01:00
2021-12-21 01:47:27 +01:00
2021-12-21 01:47:27 +01:00
2021-11-27 00:27:52 -07:00
2021-11-27 00:27:52 -07:00
2021-11-27 00:27:52 -07:00
2021-11-27 00:27:52 -07:00
2021-11-27 00:27:52 -07:00
2021-12-21 01:47:27 +01:00
2021-12-21 01:47:27 +01:00
2021-11-27 00:27:52 -07:00
2021-11-26 23:17:01 -07:00
2021-07-26 20:05:48 -04:00
2021-11-27 00:27:52 -07:00
2021-11-27 00:27:52 -07:00
2021-11-27 00:27:52 -07:00