There is no sensible recovery possible from non-void functions that
fail to return a value, or from `__builtin_unreachable()` being reached,
all bets are off once they happened. This is why LLVM's libsanitizer
treats these as always fatal, even if all other UBSan checks are made
recoverable with `-fsanitize-recover`. The codegen already assumes that
these handlers will not return.
Before, navigator.platform would always report the platform as "Serenity
OS", regardless of whether or not that was true. It also did not include
the architecture, which Firefox and Chrome both do. Now, it can report
either "Linux x86_64" or "SerenityOS AArch64".
Instead of hardcoding bin/, we should use the INSTALL_BINDIR directly
to reflect the intent of the way we're doing the settings.
This should have the benefit of fixing the build when a distro sets the
GNUInstallDirs variables to exciting values, like on NixOS.
This is accomplished by detecting the Userland subdirectory from the GML
file's own path. Thereby, any Userland program, e.g. applet,
application, or even service, can use GML and the include paths of the
generated files will be correct.
As with other special cases, this depends on the property name.
The UIDimension code is kept separate since it can handle both integers
and strings, and the string names for special dimensions don't match
with the enum names.
There's the "font_type" property which currently only handles
fixed-width yes/no, so until we get a proper font type enum and
associated enum property, this is better to use from GML instead of a
special case in the GML compiler.
This encoder can handle all integer formats and sample rates, though
only two channels well. It uses fixed LPC and performs a
close-to-optimal parameter search on the LPC order and residual Rice
parameter, leading to decent compression already.
This interface is very simple for the time being and can be used to
provide encoding functionality in a generalized way. Initialization and
parameter setting are intentionally not abstracted for now, since this
is usually very format-specific. We just need a general interface for
writing samples and errorable finalization.
Just like with input buffered streams, we don't currently have a use
case for output buffered streams which aren't seekable, since the main
application are files.
This allows to compare CSSPixels with AvailableSize without converting
it to CSSPixels, which might leak saturated (infinite) values into
layout calculations.
To ensure this happens without duplicating code, we allow forcing a
StringBuilder object to only use the inline buffer, so the code in the
AK/Format.cpp file doesn't need to deal with different underlying
storage types (expandable or inline-fixed) at all.
The following changes take effect:
1. Annotate FixedStringBuffer => `FixedStringBuffer` in many places.
2. Remove non-existing helpers for FixedStringBuffers. I added them
previously but even then they were removed in a following fixup so these
references were never valid. Therefore let's just put a vague reference
to the fact that we have some helpers for this class in the Kernel, and
let people to figure out quickly by themselves for this topic.
3. Put a sentence to explain that FixedStringBuffer objects are not only
being used in syscall handling code, but also for storing actual data in
both the Thread and Process classes as well.
More error propagation is still needed, we really want the parser to
just crash early when it encounters unexpected input, instead of trying
to carry on like nothing happened.
I think ErrorOr<unsigned> is *much* better than returning (unsigned)-1
to indicate an error ;)
We're now sniffing the incoming data to verify the server has sent a
full response, instead of passing partial data to our IMAP parser.
Our parser really can't handle partial input very well, so for the time
being, this heuristic does a much better job of verifying we have full
response before parsing.
It doesn't yet handle unprompted untagged reponses, nor the
"continuation request" responses that start with a `+`, but we don't
fully support those yet.
I couldn't run the parser in a debugger like I normally would, so I
added printouts to understand where the parser is failing.
More could be added, but these are enough to get a good idea of what
the parser is doing. It's very spammy, though, so enable it by flicking
the IMAP_PARSER_DEBUG switch :^)