Commit graph

37729 commits

Author SHA1 Message Date
kleines Filmröllchen ab49fcfb7c LibAudio+Userland: Remove Audio::LegacyBuffer
The file is now renamed to Queue.h, and the Resampler APIs with
LegacyBuffer are also removed. These changes look large because nobody
actually needs Buffer.h (or Queue.h). It was mostly transitive
dependencies on the massive list of includes in that header, which are
now almost all gone. Instead, we include common things like Sample.h
directly, which should give faster compile times as very few files
actually need Queue.h.
2022-05-03 23:09:20 +02:00
kleines Filmröllchen f14a71eb34 LibAudio: Move WAV sample reading and conversion into own helpers
This completely removes WavLoader's dependency on LegacyBuffer: We
directly create the result sample container and write into it. I took
this opportunity to rewrite most of the sample reading functions as a
single templated function, which combined with the better error handling
makes this "ported" code super concise.
2022-05-03 23:09:20 +02:00
kleines Filmröllchen a32d675164 LibAudio: Move WavLoader to Core::Stream APIs
This makes the code much more readable and concise, reduces the size of
the WavLoader class itself, moves almost all fallible initialization out
of the constructor and should provide better error handling in general.

Also, a lot of now-unnecessary imports are removed.
2022-05-03 23:09:20 +02:00
kleines Filmröllchen 81a336ea45 LibAudio: Refactor and modernize WavLoader
* All clang-tidy warnings fixed except read_header cognitive complexity
* Use size_t in more places
* Replace #define's with constexpr constants
* Some variable renaming for readability
2022-05-03 23:09:20 +02:00
kleines Filmröllchen 53d3d2daaa Documentation: Document how the event loop works & what it does
This was long overdue; as of writing this I saw another question about
something that seems obvious to me who spent a bunch of time with the
system.
2022-05-03 23:04:11 +02:00
Linus Groh 50d0f879f7 LibJS: Remove bogus FIXME in ArgumentsObject::internal_get()
Not sure what happened here, but the comment does not match the spec,
and so the FIXME I added is not actually an issue.
2022-05-03 22:51:36 +02:00
Linus Groh f3768705a9 LibJS: Use consistent phrasing for string length
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/33ea99e
2022-05-03 22:49:31 +02:00
Linus Groh 8b035b80d3 LibJS: Update order of steps in CanonicalNumericIndexString
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/be5db32
2022-05-03 22:49:31 +02:00
Linus Groh 367e7b4fe5 LibJS: Reflect Array.prototype.toLocaleString comment in %TypedArray%
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/2a9ed48
2022-05-03 22:49:31 +02:00
Linus Groh b9bbf45a81 LibJS: Add assertion (comment) to MakeMatchIndicesIndexPairArray
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/caa6e3f
2022-05-03 22:49:31 +02:00
Linus Groh ede932287f LibJS: Update spec comments to avoid = comparisons with signed zero
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/b7348e5
2022-05-03 22:49:31 +02:00
Linus Groh 257375f54c LibJS: Update comments for Annex B changes to IsLooselyEqual
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/da3d674
2022-05-03 22:49:31 +02:00
Linus Groh 17fb40bc42 LibJS: Fix type confusion in msFromTime
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/8e572b6
2022-05-03 22:49:31 +02:00
Linus Groh 03e13715ac LibJS: Update two comments saying "completion value"
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/7913cea
2022-05-03 22:49:31 +02:00
Linus Groh 99cc442f5c LibJS: Use more consistent wording for creating empty lists
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/0bf22a9
2022-05-03 22:49:31 +02:00
Linus Groh 438e3ceb4a LibJS: Use CreateDataPropertyOrThrow in MakeMatchIndicesIndexPairArray
This was part of a normative change in the ECMA-262 spec, but didn't get
updated when we implemented that.

See: https://github.com/tc39/ecma262/commit/0209d85
2022-05-03 22:49:31 +02:00
Tim Schumacher 812aa1a99c Ports: Make cmake adhere to the number of build jobs 2022-05-03 22:18:20 +02:00
Tim Schumacher 8f8673474a Ports: Make llvm adhere to the number of build jobs 2022-05-03 22:18:20 +02:00
Tim Schumacher d8ce2802e0 Ports: Make the number of compile jobs configurable 2022-05-03 22:18:20 +02:00
Tim Schumacher 7eb8d13f84 Ports: Update mc to 4.8.28
This also switches us from the GitHub tag archive to using the actual
release tarballs, which don't require us to run autoconf anymore.
2022-05-03 22:17:28 +02:00
Tim Schumacher 365caec2e2 Ports: Replace mc config.sub patch with our own download
`mc` runs `autoconf` on the fly, which unpacks a `config.sub` from its
own files. This means that support for `serenity` (and the fact whether
the patch successfully applies) depends on the version of `autoconf`
that is installed on the host.

Instead, just always replace it with a fresh version straight from the
GNU server.
2022-05-03 22:17:28 +02:00
Tim Schumacher 283aa43bf9 Ports: Force glib to link against gcc_s during the configure stage 2022-05-03 22:17:28 +02:00
Tim Schumacher 9dde7dcd70 Ports: Fix the default Toolchain name in .hosted_defs.sh 2022-05-03 22:17:28 +02:00
Tim Schumacher be8a18b8d5 Ports: Work around halflife formatting NaN values endlessly 2022-05-03 22:16:14 +02:00
Tim Schumacher 73e505fb77 Ports: Return opfor to upstream 2022-05-03 22:16:14 +02:00
Tim Schumacher c9c59602a4 Ports: Return halflife to upstream 2022-05-03 22:16:14 +02:00
MacDue 9736a088fb Base: Add hovered versions of the Coffee title bar icons 2022-05-03 22:00:14 +02:00
MacDue 44c0672d59 WindowServer: Support hover icons for title buttons
This allows adding "-hover.png" variants of the title button icons.
This can be useful for themes which use the TitleButtonsIconOnly
flag, which otherwise don't have a way of showing the hover state.
2022-05-03 22:00:14 +02:00
Timon Kruiper 2cf36a1ca2 Kernel: Panic when an assertion is failed in aarch64 Kernel
This in turn makes sure that we get a nice backtrace when an assertion
failed, or when a VERIFY_NOT_REACHED() is hit.
2022-05-03 21:53:36 +02:00
Timon Kruiper 771d0719ea Kernel: Remove unused aarch64 Prekernel::panic() function 2022-05-03 21:53:36 +02:00
Timon Kruiper f8e4eecbfb Kernel: Replace calls to Prekernel::panic() with PANIC macro on aarch64 2022-05-03 21:53:36 +02:00
Timon Kruiper e81e1fa9c8 Kernel: Implement __panic() for the aarch64 Kernel
Now that dump_backtrace() works, we can actually print a helpful
backtrace when the Kernel panics.
2022-05-03 21:53:36 +02:00
Timon Kruiper e7cf591ec0 Kernel: Load the kernel symbol table for the aarch64 Kernel
Since kmalloc() now works, we can actually load the kernel symbol table!
This in turn allows us to call dump_backtrace(), and actually get a
useful backtrace in the aarch64 Kernel.
2022-05-03 21:53:36 +02:00
Timon Kruiper b464321618 Kernel: Add kmalloc_init() to the init function of the aarch64 Kernel
With the previous commits, we are now able to call kmalloc() :^)
2022-05-03 21:53:36 +02:00
Timon Kruiper 3b4d2d9b51 Kernel: Remove VERIFY_NOT_REACHED in {current, idle}_thread for aarch64
These functions are called by kmalloc, and since there is no support for
threading in the aarch64 build yet, we can simply remove the
VERIFY_NOT_REACHED().
2022-05-03 21:53:36 +02:00
Timon Kruiper 8e0bd63b0c Kernel: Add bare-minimum implementation for aarch64 Spinlock 2022-05-03 21:53:36 +02:00
Timon Kruiper 9abcb6700c Kernel: Move Arch/x86/Spinlock.h and add stubs for aarch64
The code in Spinlock.h has no architectural specific logic, thus can be
moved to the Arch directory. This contains no functional change.

Also add the Spinlock.cpp file for aarch64 which contains stubs for the
lock and unlock functions.
2022-05-03 21:53:36 +02:00
Timon Kruiper 0d6d4508df Kernel: Add the .ksyms section to the aarch64 Kernel binary
Previously the embedmap.sh script generated a warning, since there was
no section defined where the actual kernel.map could be stored. This is
necesarry for generating kernel backtraces.
2022-05-03 21:53:36 +02:00
Timon Kruiper 9f76b16124 Kernel: Implement safe_memcpy for the aarch64 build
The implementation just calls the regular memcpy, and is not safe yet.
This can be done later.
2022-05-03 21:53:36 +02:00
Timon Kruiper feba7bc8a8 Kernel: Move Kernel/Arch/x86/SafeMem.h to Kernel/Arch/SafeMem.h
The file does not contain any specific architectural code, thus it can
be moved to the Kernel/Arch directory.
2022-05-03 21:53:36 +02:00
Timon Kruiper 267febae55 Kernel: Add KSyms.cpp to the aarch64 build
This is the first step in making dump_backtrace() work.
2022-05-03 21:53:36 +02:00
Timon Kruiper 442800db3e Kernel: Fetch the frame pointer using __builtin_frame_address()
This compiler builtin abstracts away the specifics of fetching the frame
pointer. This will allow the KSyms.cpp to be build for the aarch64
target. While we're here, lets also change the
PerformanceEventBuffer.cpp to not rely on x86_64 specifics.
2022-05-03 21:53:36 +02:00
Tim Schumacher dcd76db319 LibC: Hide posix_memalign by default
This should keep ports from preferring `posix_memalign` over other
implementations of aligned memory.
2022-05-03 21:53:19 +02:00
Linus Groh 45995aaeb6 Ports: Add RISCVEmu 2022-05-03 21:38:35 +02:00
Patrick Meyer 5510b98dc8 DHCPClient: Don't crash if DHCP options contain no gateway
Fixes #13879
2022-05-03 12:37:51 +04:30
Patrick Meyer 7b76bc2b49 Ports: Update openssh to 9.0 2022-05-02 17:12:51 -07:00
Patrick Meyer 6020364476 Ports: Make openssh server not crash during startup
Before, the openssh server tried to chroot. The startup always aborted
after that, as our chroot stub currently simply returns -1. Luckily we
can use unveil instead.

Furthermore the missing ssh_host_ed25519_key also prevented the server
from successfully starting.

The previous ReadMe.md entry about socketpair missing was already
resolved by #6705.
2022-05-02 17:12:51 -07:00
Linus Groh 9f3f3b0864 LibJS: Remove implicit wrapping/unwrapping of completion records
This is an editorial change in the ECMA-262 spec, with similar changes
in some proposals.

See:
- https://github.com/tc39/ecma262/commit/7575f74
- https://github.com/tc39/proposal-array-grouping/commit/df899eb
- https://github.com/tc39/proposal-shadowrealm/commit/9eb5a12
- https://github.com/tc39/proposal-shadowrealm/commit/c81f527
2022-05-03 01:09:29 +02:00
Timon Kruiper 15f32379bb Kernel: Remove UART::{print_num, print_hex} since they are unused 2022-05-03 00:59:35 +02:00
Timon Kruiper 47a58c51c6 Kernel: Modify UART::print_str() to also take into account the length
Previously in the aarch64 Kernel, this would cause dbgln() to actually
print more characters of the next string in memory, because strings in
the Kernel are not zero terminated by default. Prevent this by using the
passed in length of the string.
2022-05-03 00:59:35 +02:00