Commit graph

32992 commits

Author SHA1 Message Date
Lucas CHOLLET b0d51a6f36 AK: Fix erroneous move operators for SinglyLinkedList
This patch provides a proper implementation of the move operator and
delete the move assignment operator.

Those operators were introduced in #11888
2022-01-19 00:13:56 +01:00
Lady Gegga 589ebbc24e Base: Add Cypriot Syllabary to font Katica Regular 10
10800-1083F https://www.unicode.org/charts/PDF/U10800.pdf
2022-01-18 22:29:14 +02:00
Idan Horowitz 3945e239e1 Kernel: Don't populate the ACPI SysFS directory with a disabled ACPI
This would cause a nullptr dereference on ACPI::Parser::the().
2022-01-18 21:00:46 +02:00
Idan Horowitz 57ba67ed2a Kernel: Create the time page region before initializing the timers
We were unconditionally trying to update it in the interrupt, which
would depend on the timer interrupt not being received too soon after
the timers are initialized (before the time page was initialized),
which was the case when using HPET timers via the ACPI tables, but not
when using the PIT when ACPI was disabled.
2022-01-18 21:00:46 +02:00
Nico Weber e09f74903e LibCrypo: Simplify mixed-sign bitwise_or
No behavior change.
2022-01-18 20:04:06 +03:30
Nico Weber 2392f65345 LibCrypto: Remove some now-unused (and incorrect) methods
Removes the UnsignedBigInteger overloads of
SignedBigInteger::binary_{and,or,xor}(). They're now unused, and they
also didn't work when *this was negative.
2022-01-18 20:04:06 +03:30
Nico Weber d9b6eb29bc LibCrypto+LibJS: Better bitwise binary_xor binop
We went through some trouble to make & and | work right. Reimplement ^
in terms of & and | to make ^ work right as well.

This is less fast than a direct implementation, but let's get things
working first.
2022-01-18 20:04:06 +03:30
Nico Weber 013799a4dd LibCrypto+LibJS: Better bigint bitwise_or binop
Similar to the bitwise_and change, but we have to be careful to
sign-extend two's complement numbers only up to the highest set bit
in the positive number.
2022-01-18 20:04:06 +03:30
Nico Weber 1f98639396 LibCrypto+LibJS: Better bigint bitwise_and binop
Bitwise and is defined in terms of two's complement, so some converting
needs to happen for SignedBigInteger's sign/magnitude representation to
work out.

UnsignedBigInteger::bitwise_not() is repurposed to convert all
high-order zero bits to ones up to a limit, for the two's complement
conversion to work.

Fixes test262/test/language/expressions/bitwise-and/bigint.js.
2022-01-18 20:04:06 +03:30
Nico Weber 945d962322 LibJS+LibCrypto: Fix SignedBitInteger::bitwise_not and use it in LibJS
Bitwise operators are defined on two's complement, but SignedBitInteger
uses sign-magnitude. Correctly convert between the two.

Let LibJS delegate to SignedBitInteger for bitwise_not, like it does
for all other bitwise_ operations on bigints.

No behavior change (LibJS is now the only client of
SignedBitInteger::bitwise_not()).
2022-01-18 20:04:06 +03:30
Nico Weber ec37eadb39 LibCrypto: Add Formatter<SignedBigInteger>
Useful for seeing SignedBigInteger values in test failure messages.
2022-01-18 20:04:06 +03:30
Timothy Flynn b87e517deb AK: Remove now-unused AK::UnicodeUtils methods 2022-01-18 15:13:25 +00:00
Timothy Flynn d51d5f9591 FontEditor: Retrieve code point abbreviations from LibUnicode
Rather than using a hard-coded list from AK::UnicodeUtils, LibUnicode
contains the up-to-date official names and contains abbreviations for
more control code points.
2022-01-18 15:13:25 +00:00
Timothy Flynn 701b7810ba LibUnicode: Generate code point abbreviations 2022-01-18 15:13:25 +00:00
Timothy Flynn 444b2d9ec2 LibJS: Implement UTF-16 surrogate pair concatenation without iteration
Performance of string concatenation regressed in a57e2f9. That commit
iterates over the LHS string to find the last code unit, to check if it
is a high surrogate. Instead, first look at the 3rd-to-last byte in the
UTF-8 encoded string to check if it is a 3-byte code point; then decode
just those bytes to check if we have a high surrogate. Similarly, check
the first 3 bytes of the RHS string to check if we have a low surrogate.
2022-01-18 09:46:55 +00:00
Pankaj Raghav 567b3a4810 Kernel: Add individual struct definitions for NVMeSubmission
Only a generic struct definition was present for NVMeSubmission. To
improve type safety and clarity, added an union of NVMeSubmission
structs that are applicable to the command being submitted.
2022-01-18 11:37:04 +02:00
Pankaj Raghav ba7846647c Kernel: Fix m_ready_timeout calculation in NVMe
The CAP.TO is 0 based. Even though I don't see that mentioned in the
spec explicitly, all major OSs such as Linux, FreeBSD add 1 to the
CAP.TO while calculating the timeout.
2022-01-18 11:37:04 +02:00
Pankaj Raghav 3441eac960 Kernel: Remove delay during NVMe reset and start controller
IO::delay was added as a lazy alternative to looping with a timeout
error if the condition was not satisfied. Now that we have the
wait_for_ready function, remove the delay in the reset and start
controller function.
2022-01-18 11:37:04 +02:00
Pankaj Raghav 31c4c9724b Kernel: Add UNMAP_AFTER_INIT to NVMe member functions
NVMeController, NVMeQueue and NVMeNameSpace had functions which are not
used after init. So add them to UNMAP_AFTER_INIT section.
2022-01-18 11:37:04 +02:00
Rummskartoffel 487377d1d7 disasm: Don't fail when trying to disassemble empty files
Given an empty file, disasm would try to create a zero-size memory
mapping of that file, which would fail with EINVAL.
2022-01-18 09:08:14 +01:00
Rummskartoffel 0aa5725f72 disasm: Convert to east-const and C++-style casts 2022-01-18 09:08:14 +01:00
Marcus Nilsson 28a2a01dc3 LibGUI: Use autoscroll from AbstractView when rubberbanding in IconView
We can re-use the logic used for automatic scrolling in AbstractView
when we're doing rubberband scrolling in IconView. This removes some
duplicated code.
2022-01-18 09:04:50 +01:00
Brian Gianforcaro 89592601b6 HackStudio: Hookup git commit message detection and highlighting 2022-01-18 09:01:16 +01:00
Brian Gianforcaro 974e36e7a9 TextEditor: Hookup git commit message detection and highlighting 2022-01-18 09:01:16 +01:00
Brian Gianforcaro 8e8d24fe29 LibGUI: Add a GitCommit SyntaxHighlighter implementation
This highlighter just syntax highlights the commented lines in your git
commit message. It could potentially be enhanced to handle the rebase
UI or other more advanced cases in the future.
2022-01-18 09:01:16 +01:00
Brian Gianforcaro d32736582e LibSyntax: Add a language enum entry for git commit messages 2022-01-18 09:01:16 +01:00
Brian Gianforcaro 413d8ccd5f Playground: Enable line numbers in the GML editor
Most folks expect line numbers when editing code, so lets enable them in
when editing GML in the Playground app.
2022-01-18 09:00:27 +01:00
Brian Gianforcaro bcfc87fcc2 Ports: Add a port of tig 2.5.5 2022-01-18 08:50:40 +01:00
Brian Gianforcaro 3fdc2d8dcf Ports/readline: Fix config.sub refresh for the readline port
The new `use_fresh_config_sub` option puts the config.sub in the root of
the tree, but `readline` puts it in the `support/` folder. So we need to
tell the ports infrastructure to place the file in that folder.
2022-01-18 08:50:40 +01:00
Brian Gianforcaro 4bf88bb732 Kernel: Fix typo in Socket::getsockopt tracing 2022-01-18 08:47:22 +01:00
Lady Gegga ac11e646d0 Base: Add emojis to PUA codepoints
Yaks! 10CD00-10CDFF
https://serenityos.net/~xexxa/10CD
2022-01-17 20:48:49 -08:00
Timothy Flynn a57e2f9a76 LibJS: Combine UTF-16 surrogate pairs when concatenating strings
In the following use case:

    "\ud834" + "\udf06"

We were previously combining these as two individual code points. When
concatenating strings, we must take care to combine the high surrogate
from the left-hand side with the low surrogate from the right-hand side.
2022-01-18 00:49:16 +00:00
Lady Gegga ab02e3981e EmojiInputDialog: Increase size of buttons and dialog
Display some emojis earlier hidden behind "..." and add spacing.
2022-01-18 00:27:29 +00:00
Jesse Buhagiar 865e7bbe5e LibGL+LibSoftGPU+3DFileViewer: Implement Specular highlighting :^) 2022-01-18 01:48:51 +02:00
Jesse Buhagiar 5bb8c14c8f LibGL+LibSoftGPU: Remove unused variable specular_exponent
This was a duplicate of the `Material::shininess` variable.
2022-01-18 01:48:51 +02:00
Jesse Buhagiar 5a735602b0 LibSoftGPU: Add sgi_dot lambda
This function is used quite a bit during the lighting calculations, so
it's a bit cleaner having it in a centralized spot instead of just
arbitrarily calling `dot()` with numerous `FloatVector3` conversions.
2022-01-18 01:48:51 +02:00
Jesse Buhagiar fc8dd0bf68 LibSoftGPU: Use correct position for vertex_to_light
The spec has a few stipulations on what this value should actually be,
and hence we should follow it accordingly.
2022-01-18 01:48:51 +02:00
Jesse Buhagiar 38fc7361ca LibGfx: Add ::xyz() swizzle operator to Vector4 2022-01-18 01:48:51 +02:00
Jesse Buhagiar 53ed93d909 LibGfx: Add unary operator-() to Vector2/3/4 2022-01-18 01:48:51 +02:00
Idan Horowitz 27ca7bbbd7 LibJS: Make parseFloat slightly more specification-compliant 2022-01-17 14:46:07 +00:00
Idan Horowitz de2f5bb5a7 LibJS: Rewrite parseInt to be more specification-compliant 2022-01-17 14:46:07 +00:00
Idan Horowitz 877ae85017 LibJS+LibUnicode: Make static const Utf8View variables constexpr 2022-01-17 14:46:07 +00:00
Idan Horowitz 4774bed589 AK: Make Utf8View constexpr-constructible 2022-01-17 14:46:07 +00:00
Idan Horowitz d5507191a9 LibJS: Implement the TrimString Abstract Operation
This was already implemented and duplicated across the
String.prototype.trim{, Start, End} methods, so this simply extracts it
into a separate method that can also be used by other users.
2022-01-17 14:46:07 +00:00
Jelle Raaijmakers 8f33e55726 LibSoftGPU: Add stencil statistic to debug overlay 2022-01-17 12:49:00 +01:00
Jelle Raaijmakers 34a0f790a2 LibGL: Use number of lights from stored device info 2022-01-17 12:49:00 +01:00
Jelle Raaijmakers 11c807ebd1 LibGL+LibSoftGPU: Implement the stencil buffer
This implements an 8-bit front stencil buffer. Stencil operations are
SIMD optimized. LibGL changes include:

* New `glStencilMask` and `glStencilMaskSeparate` functions
* New context parameter `GL_STENCIL_CLEAR_VALUE`
2022-01-17 12:49:00 +01:00
Jelle Raaijmakers 6386671944 LibGL: Convert stencil front/back function and operation to Arrays 2022-01-17 12:49:00 +01:00
Jelle Raaijmakers 3609ffc450 LibGL+LibSoftGPU: Enumize material front/back face selection 2022-01-17 12:49:00 +01:00
Brian Gianforcaro 64dfb3a28f Base: Add icons to man pages for GUI applications
Differentiate GUI applications in man pages with icons.

This is the revert of the revert commit, now that the icon processing
was fixed in 89c0f84a28.
Revert: dae298e9df
Original: 74238d0aba

Co-authored-by: electrikmilk <brandonjordan124@gmail.com>
2022-01-17 03:38:54 -08:00