Commit Graph

1637 Commits

Author SHA1 Message Date
kleines Filmröllchen
a5b72577e6 Meta: Enable full region dumping on CI 2022-09-24 14:22:09 +02:00
kleines Filmröllchen
1a7d6508e3 Kernel: By default, don't dump regions when a userspace crash happens
There is the DUMP_REGIONS_ON_CRASH debug macro which re-enables this
(old) behavior.
2022-09-24 14:22:09 +02:00
Andreas Kling
131c3f50de LibJS: Add JS::SafeFunction, like Function but protects captures from GC
SafeFunction automatically registers its closure memory area in a place
where the JS garbage collector can find it.

This means that you can capture JS::Value and arbitrary pointers into
the GC heap in closures, as long as you're using a SafeFunction, and the
GC will not zap those values!

There's probably some performance impact from this, and there's a lot of
things that could be nicer/smarter about it, but let's build something
that ensures safety first, and we can worry about performance later. :^)
2022-09-24 12:23:29 +02:00
Andrew Kaster
d6a741af6c Meta: Don't build Core::LocalServer on Android
We won't be able to use local servers on Android without some serious
Android work to create background tasks, so just disable this for now,
as it currently relies on Core::Account to take over from SystemServer.
2022-09-22 11:07:21 -04:00
Andrew Kaster
cca54e9535 CI: Remove Android NDK Cache
This actually never worked as a cache, the build has failed since it
tried to use it. This should restore the Android nightly build.
2022-09-22 11:07:21 -04:00
Ben Wiederhake
48062b3cca Meta: Remove 'time' invocation in lint-ci
Some systems don't have /usr/bin/time available, and during most runs
of lint-ci we don't actually care that much about the exact timing.
Therefore, let's just remove it. It's easy enough to add back in, if
someone wants to investigate an issue.
2022-09-22 00:45:10 +02:00
Linus Groh
edfef8e2f5 Everywhere: Rename WrapperGenerator to BindingsGenerator
This code generator no longer creates JS wrappers for platform objects
in the old sense, instead they're JS objects internally themselves.
Most of what we generate now are prototypes - which can be seen as
bindings for the internal C++ methods implementing getters, setters, and
methods - as well as object constructors, i.e. bindings for the internal
create_with_global_object() method.

Also tweak the naming of various CMake glue code existing around this.
2022-09-21 23:06:08 +01:00
Linus Groh
6055b0e850 LibWeb: Remove no-op impl() methods from the WEB_PLATFORM_OBJECT macro
These are leftovers from when wrapper objects still had an internal
implementation, which is no longer the case.
2022-09-21 21:12:24 +01:00
Linus Groh
2cab2a8e8f LibWeb: Turn is_platform_object() ifs into an Array 2022-09-21 21:12:24 +01:00
Linus Groh
464368f94a LibWeb: Rename is_wrappable_type() to is_platform_object()
This name more accurately reflects what we are checking. Also add an
explanatory note that only a hand-curated subset of platform object
types is checked in the absence of a full generated list.
2022-09-21 21:12:24 +01:00
Linus Groh
daf0a8dd91 LibWeb: Remove impl_is_wrapper() check from WrapperGenerator
This concept no longer applies to GC'd platform objects. The only place
where this was still used can use is_wrappable_type() instead.
2022-09-21 21:12:24 +01:00
Linus Groh
64a1992040 LibWeb: Remove support for RefPtr types in idl_type_name_to_cpp_type()
This is not used anymore.
2022-09-21 21:12:24 +01:00
Linus Groh
38b3ce8f03 LibIDL+LibWeb: Remove stale references to "wrapper class" concept
There are no wrappers for the platform object types anymore :^)
2022-09-21 21:12:24 +01:00
Timothy Flynn
51854e345a LibUnicode: Update to Unicode version 15.0.0
https://unicode.org/versions/Unicode15.0.0/
2022-09-21 14:04:22 +01:00
Timothy Flynn
739798e075 LibUnicode: Use recently added Core::Stream::read_all in code generators
The generators had a manual implementation when Core::Stream did not
have a read_all method.
2022-09-21 14:04:22 +01:00
Liav A
a40f289ee5 Meta: Add isa-vga device to ISA-PC and microvm machine types
With this device being added, we can now boot into graphics mode on
these platforms too. For ISA-PC machine this is basically the only
viable option to use, but in the future, we should remove this device
for the microvm machine type as it should allow us to determine better
options and detect them by using a given device tree blob.
2022-09-20 19:05:13 +01:00
Federico Guerinoni
4f46a0e4aa StateMachineGenerator: Remove unused variable
This fixes build on MacOS m1 arch.
2022-09-20 18:54:16 +01:00
Sam Atkins
684c3efc04 StateMachineGenerator: Port to LibMain and Core::Stream 2022-09-20 07:48:45 -04:00
Sam Atkins
cb45fa79ee LibEDID: Use Core::Stream API to generate PnpIDs 2022-09-20 07:48:45 -04:00
Sam Atkins
32810f6d1a IPCCompiler: Use Core::Stream API 2022-09-20 07:48:45 -04:00
Ben Wiederhake
230226028a Meta: Use time instead of /usr/bin/time in lint-ci.sh
I totally overlooked that /usr/bin/time is not universal, which broke
some systems. This commit instead calls 'time', allowing either a shell
built-in to kick in, or a (potentially different) binary be found
anywhere in the PATH.
2022-09-19 22:18:25 +04:30
Ben Wiederhake
761f079a22 Meta: Fix example invocations of the serenity.sh run command 2022-09-18 18:47:34 -07:00
Ben Wiederhake
f8a42ef0b3 Meta: Only check changed files in check-style.py during pre-commit
This speeds up the script from about 90ms down to about 10ms, for
reasonably common changesets.

80ms may not feel like much, but it adds up quickly, especially since
we run a dozen scripts during pre-commit.
2022-09-18 18:45:25 -07:00
Ben Wiederhake
532786848b Meta: Only check changed files in lint-gml-format.sh
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.
2022-09-18 18:45:25 -07:00
Ben Wiederhake
de581ca5fd Meta: Only check changed files in check-newlines-at-eof
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.
2022-09-18 18:45:25 -07:00
Ben Wiederhake
4caaa78baf Meta: Only check changed files in check-debug-flags 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.
2022-09-18 18:45:25 -07:00
Ben Wiederhake
88c8ad840d Meta: Rewrite pre-commit script check-emoji in python
This reduces the scripts execution time from 0.57 seconds to 0.01
seconds, while also making the check a bit tighter, leaving fewer
possible problems.
2022-09-18 18:45:25 -07:00
Ben Wiederhake
c4895b7d95 Meta: Always show the timing of commands in lint-ci.sh
This should make it easier to identify slow-running scripts.
While we're at it, unify the output a little bit.
2022-09-18 18:45:25 -07:00
Ben Wiederhake
30cca01e24 HeaderCheck: Also check AK for broken headers 2022-09-18 13:27:24 -04:00
Ben Wiederhake
8a1e406615 HeaderCheck: Disable warning due to LibSoftGPU
Once LibSoftGPU drops this disable, HeaderCheck should remove it, too.
Until then, it is necessary to build at all.
2022-09-18 13:27:24 -04:00
Ben Wiederhake
2f7c9915b5 HeaderCheck: Remove outdated debug code
This should never have been committed.
2022-09-18 13:27:24 -04:00
Andreas Kling
9743849ddb LibWeb: Allow passing null to a nullable IDL union type
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.
2022-09-18 12:53:06 +02:00
Andreas Kling
530675993b LibWeb: Rename Attribute to Attr
This name is not very good, but it's what the specification calls it.
2022-09-18 02:08:01 +02:00
Timothy Flynn
302b6e966f LibTimeZone: Generate DST rule timestamps at compile time
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.
2022-09-17 23:21:32 +02:00
Sam Atkins
07a0d9df30 WrapperGenerator: Use the new shiny Overload Resolution Algorithm :^)
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.
2022-09-17 21:27:17 +02:00
Sam Atkins
8b4cc07a54 LibIDL+WrapperGenerator: Implement Type::is_distinguishable_from()
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.
2022-09-17 21:27:17 +02:00
Sam Atkins
7c8ef79898 LibIDL+WrapperGenerator: Make it easier to work with IDL::Type classes
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.
2022-09-17 21:27:17 +02:00
Sam Atkins
c4668053d1 LibIDL+WrapperGenerator: Move IDL code into a library
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.
2022-09-17 21:27:17 +02:00
Sam Atkins
634a52b589 WrapperGenerator: Clarify function-length getter name
These all return the shortest length of the function, so let's name them
as such.
2022-09-17 21:27:17 +02:00
Sam Atkins
4424a50bc4 WrapperGenerator: Move generation code out of IDLTypes.h 2022-09-17 21:27:17 +02:00
Tim Schumacher
a4f5a5d783 Meta: Remove the obsolete linter check for LibM/math.h 2022-09-16 16:09:19 +00:00
Andrew Kaster
b04de3090f Lagom: Skip IMPORTED targets in get_linked_lagom_libraries
This script is useful when wanting to install lagom libraries for
projects using Lagom via FetchContent, but trips over itself if the
project links other non-Lagom imported targets to itself. So, let's just
skip them.
2022-09-16 07:48:51 -04:00
MacDue
d1b99282d8 LibWeb+Meta: Parse the backdrop-filter CSS property
Note: The parsing and style value completely ignores the SVG filters
part of the spec for now... That's a yak for another day :^)
2022-09-16 10:50:48 +01:00
MacDue
0829aa5df0 Meta: Use is_abstract_image() for the "image" CSS type 2022-09-16 10:50:48 +01:00
Tim Schumacher
671712cae6 CMake: Use -static-libstdc++ on Clang as well
This resolves an old FIXME that we added ages ago, and our LLVM driver
apparently gained support for `-static-libstdc++` somewhere along the
way.
2022-09-16 05:39:28 +00:00
Ben Wiederhake
42db468ef5 Meta: Revise lint-commit.sh regex for the title
This mainly changes two aspects:
- The category can now be a single letter, such as 'w' to indicate the
  file Utilities/w.cpp
- Spaces in the category (or list) are no longer allowed. This follows
  the lived practice of writing category lists as "Foo+Bar: Quux"

Closes #15243.
2022-09-15 13:55:32 +01:00
Timothy Flynn
6290a25224 Meta: Enable vptr sanitation by default for Lagom UBSAN builds 2022-09-15 09:45:13 +02:00
Timothy Flynn
3dd11a007f CI: Fix typo preventing the CLDR cache from being pulled 2022-09-14 08:21:03 -04:00
Brian Gianforcaro
d0a1775369 Everywhere: Fix a variety of typos
Spelling fixes found by `codespell`.
2022-09-14 04:46:49 +00:00
networkException
40984d3355 Meta: Add confirmation for toolchain rebuilds if there's one already 2022-09-13 13:39:15 -04:00