serves an ErrorBundle as a configuration_failed message instead of
configuration message upon connection. at this point the protocol enters
an invalid state and the process will need to be restarted in order to
reconfigure. in the future, build server should outlive
reconfigurations.
closes#36389
Jacob just hit this confusing panic while working on DWARF stuff. I'm
not sure how this was regressed---the code prior to build system rework
already handled this case correctly by `break`ing to code after the
loop, which was written specifically to handle this case. All we need to
do is restore that `break`, and everything works again.
This tool reads data from loongarch-opcodes.git
and generates three data files.
encoding.zig contains an enum of mnemonics, a packed
union of packed structs to represent bit-fields
in instructions and encoder functions for each
instruction.
inst_formats.zon contains required target feature
set for each instruction, which can be used by
the backend to, under debug mode, verify if it
emits any instruction that is not supported by
the compilation target.
It also contains information about slots in each
instruction format, their type, location and
postprocessing, which can be used by disassemblers.
decode_tree.zon is the auto-generated decode tree,
which will be used by disassemblers.
Signed-off-by: xtex <xtex@astrafall.org>
ArrayList:
- `getLastOrNull` has been deprecated and renamed to `last`
- `getLast` has been removed in favor of `last` combined with `.?`
- `lastPtr` has been added which returns `?*T`
Upgrade guide:
```zig
if (list.getLastOrNull()) |foo| {
// ...
}
const foo = list.getLast();
```
⬇️
```zig
if (list.last()) |foo| {
// ...
}
const foo = list.last().?;
```
Co-authored-by: Ryan Liptak <squeek502@hotmail.com>
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/36318
Reviewed-by: Ryan Liptak <squeek502@noreply.codeberg.org>
* `tools/generate_c_size_and_align_checks.zig`: superceded by any cbe
output artifact
* `cTypePreferredAlignment`: no uses, if brought back, cbe should be
updated to verify `__alignof`
Closes#19991Closes#20881Closes#35523
and remove "release" from the enum tag names.
no functional change, however, despite the addition of
backwards-compatibile declarations in this patch, it is breaking because
expressions that use `==` or `!=` operators will not able to use the
deprecated names.
I predict these names to survive until the 1.0 tag without any more
breakage.
This is a much cleaner way to expose the new option to disable recovery
added in 62720ad9f9. It also makes it possible to add further
options in the future without further breaking changes.
This is useful to avoid unbounded recursion/iteration while fuzzing.
It's not interesting to learn that the parser hits a stack overflow when
fed a million open parens for example.
My attempt to handle this case in 6f151109b5fdf88eb8b has proven
insufficient, the test case added by this commit was failing.
Solve this with a "start of file" non-terminal in the PEG grammar,
which unfortunately isn't portable but much better reflects the actual
implementation and is much simpler.
Currently the grammar fails to enforce matching whitespace or lack of
whitespace around operators that are immediately preceded by a multiline
string literal and terminating newline.
This script parses a PEG grammar definition and generates a simple
recursive descent parser that recognizes that grammar.
The intent is to use this tool to generate an oracle against which
std.zig.Ast.parse() can be fuzz tested.
Unfortunately, generating a "smith" that can produce all possible valid
source code according to the PEG grammar definition does not seem
feasible due to PEG semantics. In particular, modeling the ordered
choice operator ('/') with a smith is problematic and seems to have
worst-case exponential runtime. Consider that `A / B` is equivalent to
`A / !A B`, it is not sufficient for a smith to choose an option from
the ordered choice at random and generate an input matched by that
sub-expression.
The current handwritten AstSmith.zig implementation does not match the
exact semantics of the PEG grammar. It has some hacks (see the `not_*`
variables) to work around specific instances of the general problem
with ordered choice described above but that is not an acceptable
long term solution in my opinion.
Generating the oracle for the fuzz test automatically from the PEG
makes the oracle correct by construction and gives us a single source of
truth: the PEG definition in the language spec.
This improves the developer experience, especially with the new
gen_parser_oracle tool. My intent is for doc/langref/grammar.peg
to be the single source of truth, at least until we have an actual
language spec.
The separate copy in the separate zig-spec repo should not be considered
canonical as it is not tested against by CI.
LLVM's generic_la64 model is clearly biased towards Loongson's current offerings
rather than actually reflecting a generic model in the architectural sense. So
fix it up on our side.