~sircmpwn/harec

Drop Lennart as OpenBSD maintainer

Signed-off-by: Drew DeVault <sir@cmpwn.com>
check: don't pass location to mkerror

The correct only way to produce a user-visible error is by calling
error(). Other errors are just dummies that are there to prevent chaos
with cascading errors.

Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
tests: test some previously untaken parser codepaths

Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
rt: drop rt::exit_status

It was only used by a test from ages ago that is now rewritten using
assert.

Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
makefiles: remove unused variable

Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
type_store: fix type_store_lookup_alias behavior

It was an outlier among type_store_lookup_* functions for requiring the
caller to manually construct the representation of the type that it
wished to put into the type store, while all the other functions do this
by themselves. The distinction existed primarily because alias creation
is a convoluted process where the information required to constuct the
whole type has annoying interdependencies.

The new interface does not solve this completely - unlike other similar
functions, this one has to permit passing NULL as secondary type into
it, and as a result, needs a separate flags parameter. I expect these to
both be resolved once we determine what kind of behavior we actually
want from type aliases.

Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
type_store: make padding calculation explicit where required

Whether to add padding or not is in essence a simple local decision, but was
obscured by all the scanning & resolution machinery.

Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
type_store: disentangle the internal resolution functions mess

Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
tests/30-reduction: rewrite in Hare (instead of C)

Signed-off-by: Sebastian <sebastian@sebsite.pw>
lex: generalize and export append_buffer

It had significant misuse potential in use cases that weren't handled
because there was no need with current code. Now it can also be used
in other parts of the codebase.

Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
lex: enforce lexer->buf trailing 0 byte only where needed

It wasn't enforced everywhere anyway, and it's better to do it explicitly
where it actually matters. Also allows us to use the buffer in a better way in
other places in the future.

Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
lex: explicitly initialize struct lexer

and allow detection of potential future initialization bugs

Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
check: add checked pointer autodereference function

To be used in all the places that do autoderef and have to check that
they're not doing it on a nullable pointer. The only visible change in
this patch is a slightly more generic error message in all cases, but
the extra verbosity did not provide much value since the offending pointer is
clear from the location.

Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
parse: simplify and fix a leak in parse_binding_list

Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
tests/32-copy: add slice copying tests

Just saw this TODO and figured I'd take care of it

Signed-off-by: Sebastian <sebastian@sebsite.pw>
gen: don't extend lvalue in gen_expr_assign

The value is the result of a load, which means it is guaranteed to
already be correctly extended.

Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
qbe: use subword types in function calls and declarations

We just used 'w' everywhere, which apparently worked fine, given that
nobody noticed this until now, but at least on paper it was wrong.

This is a breaking change (at least in theory).

Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
testmod: add test for uintptr enums

A bug relating to typedefs for uintptr enums was fixed in
edd62c1d8fccfa7b8c8ab21c944a38dc8b7b8deb, but that commit didn't add any
tests.

Signed-off-by: Sebastian <sebastian@sebsite.pw>
qbe: remove an unused global

Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
type_store: don't capitalize never in error msg
Next