Currently this can parse XML and resolve external resources/references,
and read a DTD (but not apply or verify its rules).
That's good enough for _most_ XHTML documents as the HTML 5 spec
enforces its own rules about document well-formedness, and does not make
use of XML DTDs (aside from a list of predefined entities).
An accompanying `xml` utility is provided that can read and dump XML
documents, and can also run the XML conformance test suite.
This fixes a bug in the SQL REPL where after a user enters an
unrecognized command, the REPL would not print another "> " prompt and
would not accept any more input.
This converts the return value of File::read_link() from String to
ErrorOr<String>.
The rest of the change is to support the potential of an Error being
returned and subsequent release of the value when no Error is returned.
Unfortunately at this stage none of the places affected can utililize
our TRY() macro.
Previously, if a user pressed Enter without typing a command at
the SQL REPL, the next line would be automatically indented. This
change makes it so we check if there were any tokens in the command
before applying the indentation logic.
The previous progress report changed far too fast to be meaningful,
limit the report time to 100ms, and avoid spamming the terminal with
report data that's not even readable.
Also remove some dbgln()'s.
`static const` variables can be computed and initialized at run-time
during initialization or the first time a function is called. Change
them to `static constexpr` to ensure they are computed at
compile-time.
This allows some removal of `strlen` because the length of the
`StringView` can be used which is pre-computed at compile-time.
This removes a redundant program name element from the arguments Vector
in calls to Core::command().
The Shell's argument parsing logic tolerated the extra argument,
until 83609ad.
This opens many opportunities to add more data printed in lspci in a
flexible manner - so instead of reading an ever-expanding JSON encoded
file, we can add more features and let the utility read the directory
entries from sysfs.
This also allows not only filtering data on devices but to easily filter
non-wanted devices when printing the output.
When you try to run script containing only whitespace, it will return
undefined and doesn't do anything anyway. Let's match NodeJS behavior
and just don't display anything.
This only applies to REPL input and not to modules.
Constructing the HashMap in DeclarativeEnvironment was by far the most
expensive thing when making JavaScript function calls.
As it turns out, we don't really need this to be a HashMap in the first
place, as lookups are cached (by EnvironmentCoordinate) after the first
access, so after that we were not even looking in the HashMap, going
directly to the bindings Vector instead.
This reduces function_declaration_instantiation() from 16% to 9% when
idling in "Biolab Disaster". It also reduces has_binding() from 3% to
1% on the same content.
With these changes, we now actually get to idle a little bit between
game frames on my machine. :^)