| Age | Commit message (Collapse) | Author |
|
|
|
If both are used, 'else' handles named members and '_' handles
unnamed members. In this case the 'else' prong will be unrolled
to an explicit case containing all remaining named values.
|
|
Mainly affects ZIR representation of switch_block[_ref]
and special prong (detection) logic for switch.
Adds a new SpecialProng tag 'absorbing_under' that allows
specifying additional explicit tags in a '_' prong which
are respected when checking that every value is handled
during semantic analysis but are not transformed into AIR
and instead 'absorbed' by the '_' branch.
|
|
|
|
aarch64: more progress
|
|
|
|
|
|
Closes #24541
|
|
|
|
`stage2_spirv64` -> `stage2_spirv`
|
|
Also closes #23902
|
|
|
|
|
|
Updated solution is future proof for arbitary size integer handling for both strategies .br_table lowering if switch case is dense, .br_if base jump table if values are too sparse.
|
|
This is not yet implemented
|
|
`break`ing from something which isn't a loop should always be opt-in.
This was a bug in #21257.
|
|
Also, don't use the special switch lowering for errors if the switch
is labeled; this isn't currently supported. Related: #20627.
|
|
|
|
|
|
we can run `std.debug.print` now, with both run-time strings and integers!
|
|
|
|
Reorganize how the binOp and genBinOp functions work.
I've spent quite a while here reading exactly through the spec and so many
tests are enabled because of several critical issues the old design had.
There are some regressions that will take a long time to figure out individually
so I will ignore them for now, and pray they get fixed by themselves. When
we're closer to 100% passing is when I will start diving into them one-by-one.
|
|
|
|
|
|
- implements `airSlice`, `airBitAnd`, `airBitOr`, `airShr`.
- got a basic design going for the `airErrorName` but for some reason it simply returns
empty bytes. will investigate further.
- only generating `.got.zig` entries when not compiling an object or shared library
- reduced the total amount of ops a mnemonic can have to 3, simplifying the logic
|
|
|
|
|
|
|
|
|
|
Resolves: #19210
|
|
This prevents the possibility of not emitting a `.dbg_inline_end`
instruction and reduces the allocation requirements of the backends.
Closes #19093
|
|
- Return `error.TestFailed` instead of panicing
- Use `comptime assert` for type checks so that errors surface at
compile time
|
|
|
|
|
|
|
|
|
|
|
|
Resolves: #17754
|
|
|
|
Some tests are now failing due to debug info changes, some tests
now pass due to improved compiler functionality.
|
|
|
|
|
|
closes #10196
|
|
Most of this migration was performed automatically with `zig fmt`. There
were a few exceptions which I had to manually fix:
* `@alignCast` and `@addrSpaceCast` cannot be automatically rewritten
* `@truncate`'s fixup is incorrect for vectors
* Test cases are not formatted, and their error locations change
|
|
the maximum value of the switched type
|
|
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
|
|
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
|
|
This is a bit harder than it seems at first glance. Actually resolving
the type is the easy part: the interesting thing is actually getting the
capture value. We split this into three cases:
* If all payload types are the same (as is required in status quo), we
can just do what we already do: get the first field value.
* If all payloads are in-memory coercible to the resolved type, we still
fetch the first field, but we also emit a `bitcast` to convert to the
resolved type.
* Otherwise, we need to handle each case separately. We emit a nested
`switch_br` which, for each possible case, gets the corresponding
union field, and coerces it to the resolved type. As an optimization,
the inner switch's 'else' prong is used for any peer which is
in-memory coercible to the target type, and the bitcast approach
described above is used.
Pointer captures have the additional constraint that all payload types
must be in-memory coercible to the resolved type.
Resolves: #2812
|
|
Implements the ptr_elem_val air tag. Implementation is unified
with ptr_elem_ptr.
|
|
|