This speeds up the script from about 140ms down to <10ms, even for
changesets that touch a handful of different GML files.
130ms may not feel like much, but it adds up quickly, especially since
we run a dozen scripts during pre-commit.
This speeds up the script from about 120ms down to about 20ms for
reasonably common changesets.
100ms may not feel like much, but it adds up quickly, especially since
we run a dozen scripts during pre-commit.
This speeds up the script from about 170ms down to about 80ms for
changes in Debug.h.in or similarly "DEBUG"-rich files, down to <10ms for
more common changesets.
160ms may not feel like much, but it adds up quickly, especially since
we run a dozen scripts during pre-commit.
posix1_lim.h only defines macros that start with _POSIX_*, and don't
mention anything that might be defined in limits.h. Likewise, limits.h
uses none of the _POSIX_* macros. Thus, it is okay to change the order
of imports.
This remained undetected for a long time as HeaderCheck is disabled by
default. This commit makes the following file compile again:
// file: compile_me.cpp
#include <WindowServer/SystemEffects.h>
// That's it, this was enough to cause a compilation error.
This remained undetected for a long time as HeaderCheck is disabled by
default. This commit makes the following file compile again:
// file: compile_me.cpp
#include <Kernel/API/POSIX/ucontext.h>
// That's it, this was enough to cause a compilation error.
This remained undetected for a long time as HeaderCheck is disabled by
default. This commit makes the following file compile again:
// file: compile_me.cpp
#include <LibDNS/Question.h>
// That's it, this was enough to cause a compilation error.
Likewise for most other files touched by this commit.
This remained undetected for a long time as HeaderCheck is disabled by
default. This commit makes the following file compile again:
// file: compile_me.cpp
#include <LibJS/Runtime/StringPrototype.h>
// That's it, this was enough to cause a compilation error.
Likewise for most other files touched by this commit.
This remained undetected for a long time as HeaderCheck is disabled by
default. This commit makes the following file compile again:
// file: compile_me.cpp
#include <LibWeb/HTML/CrossOrigin/CrossOriginOpenerPolicy.h>
// That's it, this was enough to cause a compilation error.
Likewise for most other files touched by this commit.
The flex line cross size includes the margin boxes of items, so when
we're taking the flex line's cross size to use as an item cross size,
we have to subtract the margin, border padding from both sides.
Previous we only subtracted the cross margins, which led to oversized
items in some cases.
This fixes an issue on Twitter where they were instantiating an
IntersectionObserver with a null root. The root IDL type is
`(Element or Document)?` so null needs to be allowed.
We were previously comparing the hash against the hash after the initial
import, which caused us to regenerate patches every time as long as we
did have patches (even if they haven't changed at all) and the script
entirely missing that it should remove patches if the current commit is
the "import" commit.
I've lost more changes to "you forgot to push the changed commits to the
remote" than I'd like to admit, so let's just unify both and only ever
use the actual working repository for detemining whether any patches
have changed.
This stops us from mangling our LLVM patch names and titles when using
`./package.sh dev`, as they like to put their category names in square
brackets.
It's not safe to capture `this` as a raw pointer here, since nothing
is guaranteed to keep the ResourceClient alive (even if the Resource
stays alive.)
Instead of creating a new HTMLCollection every time you access
.children, we now follow the spec and vend the same object.
This was annoyingly difficult before, and trivial now that the DOM is
garbage-collected. :^)
Some emojis were modified to be more in style with
the new calendar emoji.
Date has been changed from July 24 to October 10.
October 10 is the date of the first release of SerenityOS.
Modified:
📅 - U+1F4C5 CALENDAR
📆 - U+1F4C6 TEAR-OFF CALENDAR
New:
🗓 - U+1F5D3 SPIRAL CALENDAR
🌳 - U+1F333 DECIDUOUS TREE
🔪 - U+1F52A KITCHEN KNIFE
🪐 - U+1FA90 RINGED PLANET
🎶 - U+1F3B6 MUSICAL NOTES
🏷️ - U+1F3F7 LABEL
🧰 - U+1F9F0 TOOLBOX
Rather than invoking AK::Time::from_timestamp at runtime, we can do so
at compile time. This reduces invoking TimeZone::get_time_zone_offset
100,000 times in a loop from about 7 seconds to 30 milliseconds.
Instead of asking Gfx::FontDatabase for the "default font" and the
"default fixed-width font", we now proxy those requests out via
the Platform::FontPlugin. This will allow Ladybird to use other default
fonts as fallback.
We compute the effective overload sets for each argument count at build
time, to save us having to do it every time a function with overloads
is called.
This requires a little explanation. The overload resolution algorithm,
where this is used, repeatedly has steps like this:
> Otherwise: if V is a platform object, and there is an entry in S that
> has one of the following types at position i of its type list,
> - an interface type that V implements
> - object
> - a nullable version of any of the above types
> - an annotated type whose inner type is one of the above types
> - a union type, nullable union type, or annotated union type that has
> one of the above types in its flattened member types
> then remove from S all other entries.
So, the API here tries to match that. We save the matching entry when
checking through them and then use that in `remove_all_other_entries()`.
Removing all those entries when all we actually care about is looking at
that one matching entry feels silly, but sticking to the spec is more
important while things are still half-implemented. :^)
As part of this, I've moved a couple of methods for checking for
null/undefined from UnionType to Type, and filled in more of their
steps.
This now detects more, and so causes us to hit a `TODO()` which is too
big for me to go after right now, so I've replaced that assertion with
a log message.
Track the kind of Type it is, and use that to provide some convenient
`is_foo()` / `as_foo()` methods. While I was at it, made these all
classes instead of structs and made their data private.
IDL function overload resolution requires knowing each IDL function's
parameters and their types at runtime. The simplest way to do that is
just to make the types the generator uses available to the runtime.
Parsing has moved to LibIDL, but code generation has not, since that is
very specific to WrapperGenerator.