Commit graph

23471 commits

Author SHA1 Message Date
Gunnar Beutner
5662e72126 LibC: Make sure crt0 and crt0_shared are built before LibC
We need these two object files in order for ld to work.

Fixes #4538.
2021-07-09 21:56:21 +02:00
Linus Groh
2c78fa066f Ports: Remove Python setlocale patch that's no longer needed
Since 4cd45f5, setlocale() always pretends to succeed.
2021-07-09 20:14:08 +01:00
Timothy Flynn
e4124d0218 LibJS: Implement RegExp.prototype [ @@split ] 2021-07-09 19:45:55 +01:00
Timothy Flynn
43918b0104 LibJS: Implement RegExpBuiltinExec closer to the spec
Our RegExpBuiltinExec implementation differed from the spec in some
areas such as handling of the sticky/global flags and updating the
lastIndex property.
2021-07-09 19:45:55 +01:00
Timothy Flynn
0f0ac37b56 LibRegex: Break from execution loop when the sticky flag is set
If the sticky flag is set, the regex execution loop should break
immediately even if the execution was a failure. The specification for
several RegExp.prototype methods (e.g. exec and @@split) rely on this
behavior.
2021-07-09 19:45:55 +01:00
Timothy Flynn
3892b6e6ec LibJS: Implement RegExp constructor according to the spec
This allows passing an existing RegExp object (or an object that is
sufficiently like a RegExp object) as the "pattern" argument of the
RegExp constructor.
2021-07-09 19:45:55 +01:00
Timothy Flynn
2686c5f503 LibJS: Do not use "this" object in RegExpExec
As an abstraction, RegExpExec should not assume that the RegExp object
being used is "this" object. Instead, it should only interact with the
provided object.

This prepares for some methods, such as @@split, which invoke RegExpExec
with a secondary RegExp object.
2021-07-09 19:45:55 +01:00
Timothy Flynn
1d19649a19 LibJS: Remove accidental dead code 2021-07-09 19:45:55 +01:00
networkException
eedee151ab Documentation: Add a package manager section to the FAQ
People are commonly asking about a package manager in
serenity. This patch adds an answer the FAQ, explaining
why there is no need for packages as well as different
possible ways to add or remove software installed on the
system.
2021-07-09 19:45:08 +01:00
Yori
897ca104f9 Documentation: Added build instructions for Void Linux 2021-07-09 20:17:30 +02:00
Max Wipfli
5af4f8041f LibGfx: Add "override" declarations and use east const in BitmapFont.h 2021-07-09 20:17:07 +02:00
Max Wipfli
006e5998c5 LibGfx: Optimize BitmapFont::unicode_view_width() a bit
This optimizes the method to no longer compare if width > longest_width
on every iteration, since it's only required on CR/LF or at the end.
2021-07-09 20:17:07 +02:00
Max Wipfli
4578ab3ed0 LibGfx: ALWAYS_INLINE BitmapFont::unicode_view_width
This adds the ALWAYS_INLINE attribute to unicode_view_width. Also, it
cleans up the BitmapFont::view() code a little bit. This should help
performance of this hot code. Because the call to the width() methods is
a virtual dispatch, it doesn't help to inline the width() methods
themselves.
2021-07-09 20:17:07 +02:00
Max Wipfli
2afa35deb8 LibGfx: Remove unused headers from BitmapFont.{cpp,h} 2021-07-09 20:17:07 +02:00
LuK1337
a552c3bc8c LibTTF: Use en-us naming table if available
Some fonts tend to have multiple naming tables, namely MS-Gothic has
3 tables: [macintosh, ja], [windows, en-us], [windows, ja].
2021-07-09 20:16:33 +02:00
Jean-Baptiste Boric
934e53079f Utilities: Add ability to query specific user with id 2021-07-09 20:15:40 +02:00
Jean-Baptiste Boric
538cc9d99a Utilities: Use Core::Account for id 2021-07-09 20:15:40 +02:00
Jean-Baptiste Boric
16983dbe8e LibCore: Add ability to not read shadow data for Account
This stops spamming the kernel logs with unveil violations if the
program didn't unveil /etc/shadow.
2021-07-09 20:15:40 +02:00
Jean-Baptiste Boric
fdf638dde0 LibCore: Implement Account::self() 2021-07-09 20:15:40 +02:00
Jean-Baptiste Boric
3db1681214 Utilities: Fix return value of expr 2021-07-09 20:15:40 +02:00
Jean-Baptiste Boric
897a706075 Utilities: Add support for -d flag to tr 2021-07-09 20:15:40 +02:00
Jean-Baptiste Boric
eb65e41a9c Utilities: Implement pwd 2021-07-09 20:15:40 +02:00
LuK1337
f234c416af LibGUI: Handle TTF size selection changes in font picker properly
This patch addresses the following issues:
- size resetting to 1 when switching from bitmap font size 10 to TTF
- size resetting to 1 when incrementing spinbox from 8 to 9
- selection mode not being set on m_size_list_view selection change
2021-07-09 18:15:05 +02:00
Andreas Kling
e0a79efeae LibGfx: Make enclosing_int_rect(FloatRect) actually enclose the rect 2021-07-09 18:05:52 +02:00
Marcus Nilsson
c59c970363 PixelPaint: Don't deselect layers in LayerListWidget
There is really no reason to be able to deselect layers, so just ignore
when the user clicks outside of a layer gadget.
2021-07-09 18:04:01 +02:00
Marcus Nilsson
95710b0147 PixelPaint: Make sure that a layer is always selected
Make sure that a layer is selected after creating it, removing
one or creating a new image. Also make layer_properties_widget
update on tab change.
2021-07-09 18:04:01 +02:00
Marcus Nilsson
f3cdb9bfeb PixelPaint: Only scroll into view in LayerListWidget when needed
This makes sure that scroll_into_view is not called when not necessary,
or when m_layers is empty, which previously caused a crash upon
removing the last layer.
2021-07-09 18:04:01 +02:00
Daniel Bertalan
0e04f7cf1e LibVT: Always check intermediate bytes in CSI sequences
Previously, we only checked the intermediate bytes for those escape
sequences that performed different operations based on their
intermediate bytes. This lead to a crash when `CSI ?1001 r` was
incorrectly parsed as `CSI Pt ; Pb r` (note the missing question mark),
as seen in #8559.
2021-07-09 20:28:17 +04:30
Idan Horowitz
52aa777d49 LibJS: Add %TypedArray%.prototype.sort 2021-07-09 16:15:42 +01:00
Idan Horowitz
f98a98506f LibJS: Add %TypedArray%.prototype.subarray 2021-07-09 16:15:42 +01:00
Idan Horowitz
ff052a3241 LibJS: Add %TypedArray%.prototype.slice 2021-07-09 16:15:42 +01:00
Idan Horowitz
8127e30169 LibJS: Split detached buffer checking into validate_typed_array
Not all of the TypedArray prototype methods and accessors require
detached buffer validation (only the ones who call ValidateTypedArray)
so this behaviour was split from typed_array_from and the usage was
updated per the spec in each location.
2021-07-09 16:15:42 +01:00
Ali Mohammad Pur
67362b1f85 Ports: Make the CMake port use the LibUV port
Now that we've ported libuv, we can remove the libuv patches from cmake
and make it use the ported libuv.
2021-07-09 15:36:50 +02:00
Ali Mohammad Pur
fcd56f2172 Ports: Add libuv
We've had a half-arsed port of libuv inside the cmake port, but let's
just port it properly.
Note that this pins a specific commit (which is currently the latest
commit in their default branch).
2021-07-09 15:36:50 +02:00
Ali Mohammad Pur
727403746f LibC: Make makedev()/minor()/major() static
As we've opted to make these inline functions and not macros, let's at
least make sure that the users don't *observe* multiple definitions of
these functions.
2021-07-09 15:36:50 +02:00
Ali Mohammad Pur
e37f9fa7db LibPthread+Kernel: Add pthread_kill() and the thread_kill syscall 2021-07-09 15:36:50 +02:00
Linus Groh
ca71d99c66 LibJS: Implement Temporal.Instant.fromEpochNanoseconds() 2021-07-09 13:20:51 +01:00
Linus Groh
5872357b56 LibJS: Implement Temporal.Instant.fromEpochMicroseconds() 2021-07-09 13:20:51 +01:00
Linus Groh
66ff772254 LibJS: Implement Temporal.Instant.fromEpochMilliseconds() 2021-07-09 13:20:51 +01:00
Linus Groh
2401e45720 LibJS: Implement Temporal.Instant.fromEpochSeconds() 2021-07-09 13:20:51 +01:00
Linus Groh
9c9813c312 LibJS: Replace useless use of SignedBigInteger::create_from() with ctor
create_from() casts the value to a 64 bit integer and then creates two
words from it, which is not necessary if we only pass values to it that
fit into a single word (32 bit integer).
Also make them use UnsignedBigInteger as the previously missing SBI
divided_by() overload is now implemented.
2021-07-09 13:20:51 +01:00
Linus Groh
a216ea4c8d LibCrypto: Add missing implementation of SBI::divided_by(USBI) 2021-07-09 13:20:51 +01:00
Linus Groh
3014e529be LibJS: Tweak error message in the NumberToBigInt abstract operation
This is no longer specific to the BigInt() constructor, so it shouldn't
be mentioning an 'argument' that we might not have.
2021-07-09 13:20:51 +01:00
Linus Groh
9f2dd89446 LibJS/Tests: Add tests for Date.prototype.toTemporalInstant() 2021-07-09 13:20:51 +01:00
Andreas Kling
e5a1e535cc LibC: Re-run clang-format on malloc.cpp 2021-07-09 14:14:22 +02:00
Andreas Kling
19cb5ed97a LibC: Simplify locking in malloc
- Use a simple pthread_mutex_t instead of bringing in headers from
  LibThreading just to get a mutex.

- Use a normal mutex instead of a recursive one.

- Remove redundant locking in realloc().
2021-07-09 13:47:32 +02:00
Andreas Kling
b8a204c5b9 LibThreading: Rename Lock => Mutex 2021-07-09 11:15:50 +02:00
Andreas Kling
ce5d2b4f16 LibThreading: Remove unused "Lockable" class 2021-07-09 11:15:50 +02:00
Luke
1da06f9dfd LibJS: Add %TypedArray%.prototype.map 2021-07-09 10:15:45 +01:00
Luke
bc6f619344 LibJS: Add TypedArraySpeciesCreate and %TypedArray%.prototype.filter
I'm not too happy with how I get the default constructor in
typed_array_species_create, but it works for now.
2021-07-09 10:15:45 +01:00