Commit graph

31494 commits

Author SHA1 Message Date
Astraeus-
1c189dbba5 LibGfxDemo: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
4db2f5b4ae Eyes: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
b02da2442f CatDog: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
3e4e055c76 ClipboardHistory: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
3ca72831d1 Solitaire: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
bb214dd7e8 Pong: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
07cf17f328 2048: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
c1820770bb Minesweeper: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
421f91e4ca Hearts: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
88ce05317f Chess: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
21335ad720 Spider: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
29d5fee07e FlappyBug: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
ff3272b60d GameOfLife: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
a15b86cd01 Snake: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
38f47a79d0 Breakout: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Nick Johnson
e122502f70 AK: Speed up BitmapView::find_next_range_of_unset_bits
While watching Andreas' most recent video, I noticed that this function
only worked with 32 bit values, but was a serious performance
bottleneck for the kernel. As such, I reworked it to use `size_t`, so
it now can switch to 64-bit sweeps on 64-bit platforms. This caused
test-js to go from 12.5 seconds hot to 11.5 seconds hot on my machine
when running on KVM x86_64.
2021-12-18 23:36:08 +01:00
Nick Johnson
548529ace4 AK: Add BuiltinWrappers.h
The goal of this file is to enable C++ overloaded functions for
standard builtin functions that we use. It contains fallback
implementations for systems that do not have the builtins available.
2021-12-18 23:36:08 +01:00
Linus Groh
01eefc344a LibJS: Disallow date-only strings for PlainTime
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/b16a296
2021-12-18 22:32:39 +00:00
Linus Groh
6da6da73cc LibJS: Allow 'T' prefix in time-only strings
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/f5e8edf
2021-12-18 22:32:39 +00:00
Linus Groh
acce65b52c LibJS: Fix fractionalSecondDigits behavior in Duration.proto.toString()
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/3ee771e
2021-12-18 22:32:39 +00:00
Linus Groh
6d5e95d621 LibJS: Add optional calendar to Plain{Time,YearMonth,MonthDay} prod
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/7e58ba3
2021-12-18 22:32:39 +00:00
Linus Groh
b70a55bd5a LibJS: Update spec comment in get_iso_parts_from_epoch()
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/bdf60f5
2021-12-18 22:32:39 +00:00
Linus Groh
4b7f716f21 LibJS: Fix ambiguity in FractionalPart grammar
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/0f11bd6
2021-12-18 22:32:39 +00:00
Linus Groh
bbfbd02c1b LibJS: Make PlainDate difference methods units handling consistent
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/8b7ba00
2021-12-18 22:32:39 +00:00
Linus Groh
006bea5d31 LibJS: Remove outdated comment in prepare_partial_temporal_fields()
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/bf066ea
2021-12-18 22:32:39 +00:00
Linus Groh
69b8079b11 LibJS: Fix "smallestUnit" property name typo in a couple of places
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/900e4bc
2021-12-18 22:32:39 +00:00
Linus Groh
70e6eae27b LibJS: Fix off-by-one in balance_iso_date() for leap year inputs
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/5ab1822
2021-12-18 22:32:39 +00:00
Linus Groh
7270bbb255 LibJS: Remove outdated comment from parse_temporal_duration_string()
This is a normative change in the Temporal spec.

See:

- https://github.com/tc39/proposal-temporal/commit/e7182d3
- https://github.com/tc39/proposal-temporal/commit/6dae066
2021-12-18 22:32:39 +00:00
Linus Groh
247d2f7cc4 LibJS: Only allow Calendar this value in Temporal.Calendar.prototype.id
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/2644fc6
2021-12-18 22:32:39 +00:00
Junior Rantila
1f7c196788 LibC: Make sysbeep return int instead of void
Since the beep syscall may fail it is strange that the error is
discarded by the LibC wrapper.
2021-12-18 10:36:35 -08:00
Hendiadyoin1
18013f3c06 Kernel: Remove a redundant check in Process::remap_range_as_stack
We already VERIFY that we have carved something out, so we don't need to
check that again.
2021-12-18 10:31:18 -08:00
Hendiadyoin1
2d28b441bf Kernel: Collapse a redundant boolean conditional return statement in …
validate_mmap_prot
2021-12-18 10:31:18 -08:00
Hendiadyoin1
f38d32535c Kernel: Access OpenFileDescriptions::max_open() statically in Syscalls 2021-12-18 10:31:18 -08:00
Hendiadyoin1
c860e0ab95 Kernel: Add implicit auto qualifiers in Syscalls 2021-12-18 10:31:18 -08:00
Hendiadyoin1
f5b495d92c Kernel: Remove else after return in Process::do_write 2021-12-18 10:31:18 -08:00
sin-ack
8e262eab00 Base: Add U+2026 HORIZONTAL ELLIPSIS to font Csilla Regular 10 2021-12-18 10:29:32 -08:00
Andreas Kling
363875128c Websites: Update the SerenityOS bug bounty program :^)
Let's increase the reward since I have significantly improved funding
over the last year! Merry haxmas! :^)
2021-12-18 11:30:10 +01:00
Andreas Kling
32aa623eff Kernel: Fix 4-byte uninitialized memory leak in sys$sigaltstack()
It was possible to extract 4 bytes of uninitialized kernel stack memory
on x86_64 by looking in the padding of stack_t.
2021-12-18 11:30:10 +01:00
Andreas Kling
ed839450c8 Kernel: Enable SMAP protection earlier during syscall entry
There's no reason to delay this for as long as we did.
2021-12-18 11:30:10 +01:00
Andreas Kling
0ae8702692 Kernel: Make File::stat() & friends return Error<struct stat>
Instead of making the caller provide a stat buffer, let's just return
one as a value.
2021-12-18 11:30:10 +01:00
Andreas Kling
1f2d0d0ad4 Kernel: Use ksyms in-place instead of duplicating them into eternal heap
We can leave the .ksyms section mapped-but-read-only and then have the
symbols index simply point into it.

Note that we manually insert null-terminators into the symbols section
while parsing it.

This gets rid of ~950 KiB of kmalloc_eternal() at startup. :^)
2021-12-18 11:30:10 +01:00
Andreas Kling
abf2204402 Kernel: Use copy_typed_from_user() in more places :^) 2021-12-18 11:30:10 +01:00
Andreas Kling
39d9337db5 Kernel: Make sys${ftruncate,pread} take off_t as const pointer
These syscalls don't write back to the off_t value (unlike sys$lseek)
so let's take Userspace<off_t const*> instead of Userspace<off_t*>.
2021-12-18 11:30:10 +01:00
Andreas Kling
9c7659306a Kernel: Fix getsockopt(SO_RCVTIMEO) returning wrong timeout
We were returning the send timeout for both SO_RCVTIMEO and SO_SNDTIMEO.
2021-12-18 11:30:10 +01:00
Andreas Kling
c175cea32d LibJS: Fix typo in MarkedVector::end() 2021-12-18 11:30:10 +01:00
Andreas Kling
5c344f4aee Kernel: Start perf event stack capture at RBP, not EBP on x86_64 2021-12-18 11:16:24 +01:00
Linus Groh
3214e35535 LibJS/Tests: Remove outdated FIXME 2021-12-17 23:22:30 +00:00
kleines Filmröllchen
3891d6d73a AK: Fast path for single-element TypedTransfer::copy
Co-Authored-By: Brian Gianforcaro <bgianf@serenityos.org>
2021-12-17 13:13:00 -08:00
kleines Filmröllchen
d5dce448ea AK: Bypass Buffered's buffer for large reads
Before, if we couldn't read enough data out of the buffer, we would re-
fill the buffer and recursively call read(), which in turn reads data
from the buffer into the resliced target span. This incurs very
intensive superflous memmove's when large chunks of data are read from
a buffered stream.

This commit changes the behavior so that when we exhaust the buffer, we
first read any necessary additional data directly into the target, then
fill up the buffer again. Effectively, this results in drastically
reduced overhead from Buffered when reading large contiguous chunks.
Of course, Buffered is designed to speed up data access patterns with
small frequent reads, but it's nice to be able to combine both access
patterns on one stream without penalties either way.

The final performance gain is about an additional 80% of abench decoding
speed.
2021-12-17 13:13:00 -08:00
kleines Filmröllchen
982529a948 LibAudio: Don't unnecessarily copy the passed decode buffer 2021-12-17 13:13:00 -08:00