summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-01-02Userland: Remove unused includes of AK/Math.hBen Wiederhake
These instances were detected by searching for files that include Kernel/Debug.h, but don't match the regex: \\b(acos|acosh|asin|asinh|atan|atan2|atanh|cbrt|ceil|cos|cosh|E|exp|exp2 |fabs|fmod|hypot|log|log10|log2|NaN|Pi|pow|product_even|product_odd|rema inder|round_to|rsqrt|sin|sincos|sinh|sqrt|Sqrt1_2|Sqrt2|tan|tanh)\\b (Without the linebreaks.) This regex is pessimistic, so there might be more files that don't actually use any math functions. In theory, one might use LibCPP to detect things like this automatically, but let's do this one step after another.
2023-01-02Everywhere: Move AK/Debug.h include to using files or removeBen Wiederhake
2023-01-02LibGL: Move AK/Debug.h include to where it is usedBen Wiederhake
2023-01-02Kernel: Remove unused includes of Kernel/Debug.hBen Wiederhake
These instances were detected by searching for files that include Kernel/Debug.h, but don't match the regex: \\bdbgln_if\(|_DEBUG\\b This regex is pessimistic, so there might be more files that don't check for any real *_DEBUG macro. There seem to be no corner cases anyway. In theory, one might use LibCPP to detect things like this automatically, but let's do this one step after another.
2023-01-02Kernel: Turn lock ranks into template parameterskleines Filmröllchen
This step would ideally not have been necessary (increases amount of refactoring and templates necessary, which in turn increases build times), but it gives us a couple of nice properties: - SpinlockProtected inside Singleton (a very common combination) can now obtain any lock rank just via the template parameter. It was not previously possible to do this with SingletonInstanceCreator magic. - SpinlockProtected's lock rank is now mandatory; this is the majority of cases and allows us to see where we're still missing proper ranks. - The type already informs us what lock rank a lock has, which aids code readability and (possibly, if gdb cooperates) lock mismatch debugging. - The rank of a lock can no longer be dynamic, which is not something we wanted in the first place (or made use of). Locks randomly changing their rank sounds like a disaster waiting to happen. - In some places, we might be able to statically check that locks are taken in the right order (with the right lock rank checking implementation) as rank information is fully statically known. This refactoring even more exposes the fact that Mutex has no lock rank capabilites, which is not fixed here.
2023-01-02Revert "LibJS: Implement MakeDay without using AK::years_to_days_since…"Ben Wiederhake
This reverts commit 032664332be6e1d42567165e9ffb623faf2b9a10. Now that AK::years_to_days_since_epoch has acceptable performance, we can go back to the "easy" way of computing the unix epoch time.
2023-01-02AK+Kernel: Eliminate UB (signed overflow) from days_since_epochBen Wiederhake
2023-01-02AK+Tests: Replace years_to_days_since_epoch by near-instant functionBen Wiederhake
This solves half the problem of #12729. Note that the inverse function time_to_tm() in LibC/time.cpp still uses a slow for-loop. See also #13138
2023-01-02AK+Tests: Demonstrate slowness of years_to_days_since_epochBen Wiederhake
In practice, this function does not take any perceptible amount of time. However, this benchmark demonstrates that for extreme values, the internal for-loop does matter.
2023-01-02AK: Combine SinglyLinkedList and SinglyLinkedListWithCountLenny Maiorani
Using policy based design `SinglyLinkedList` and `SinglyLinkedListWithCount` can be combined into one class which takes a policy to determine how to keep track of the size of the list. The default policy is to use list iteration to count the items in the list each time. The `WithCount` form is a different policy which tracks the size, but comes with the overhead of storing the count and incrementing/decrementing on each modification. This model is extensible to have other forms of counting by implementing only a new policy instead of implementing a totally new type.
2023-01-02AK+Tests: Add a test for formatting numbers in base 10 unitsArda Cinar
Added a test case to TestNumberFormat to test the new base 10 formatting capability
2023-01-02AK: Add an option to format numbers with 1000 based unitsArda Cinar
Instead of only allowing 1024-based units.
2023-01-02AK: Make sure no overflow occurs in number_string_with_one_decimalArda Cinar
A possible integer overflow might have occured inside the function in case (number % unit) * 10 did not fit into a u64. So it is verified that this does not happen at the beginning of the function.
2023-01-02df: Add an option to display used/available inodesArda Cinar
2023-01-02AK: Add a human_readable_quantity helper to NumberFormat.hArda Cinar
This can be used for displaying large quantities that are not measured in bytes in a more human-readable format.
2023-01-02AK: Move the functions in NumberFormat.h out of lineArda Cinar
2023-01-02df: Show used percentages for each listed entryArda Cinar
2023-01-02LibCore: Remove unused include MemMemBen Wiederhake
These instances were detected by searching for files that include MemMem.h, but don't match the regex: \\b(MemMem(?!\.h>)|bitap_bitwise|memmem|memmem_optional)\\b These are the only symbols defined by MemMem.h. In theory, one might use LibCPP to detect things like this automatically, but let's do this one step after another.
2023-01-02Everywhere: Remove unused includes of AK/IterationDecision.hBen Wiederhake
These instances were detected by searching for files that include IterationDecision.h, but don't match the regex: \\bIterationDecision(?!\.h>)\\b This is the only symbol defined by IterationDecision.h. In theory, one might use LibCPP to detect things like this automatically, but let's do this one step after another.
2023-01-02Everywhere: Remove unused includes of AK/Array.hBen Wiederhake
These instances were detected by searching for files that include Array.h, but don't match the regex: \\b(Array(?!\.h>)|iota_array|integer_sequence_generate_array)\\b These are the three symbols defined by Array.h. In theory, one might use LibCPP to detect things like this automatically, but let's do this one step after another.
2023-01-02Kernel: Remove unused includesBen Wiederhake
2023-01-02Everywhere: Fix badly-formatted includesBen Wiederhake
In 7c5e30daaa615ad3a2ef55222423a747ac0a1227, the focus was "only" on Userland/Libraries/, whereas this commit cleans up the remaining headers in the repo, and any new badly-formatted include.
2023-01-02LibHTTP: Propagate errors using TRYericLemanissier
2023-01-02LibEDID: Propagate errors using TRYericLemanissier
2023-01-02LibCrypto: Propagate errors using TRYericLemanissier
2023-01-02Base+Userland: Add menu item iconsBrandon Jordan
Base+Userland: Add menu item icons This adds missing icons to Presenter Presentation menu. This adds missing icon to Image Viewer View menu. This adds a scale icon for the Image Viewer and Font Editor. This moves the Fit Image to View icon to the 16x16 folder as it's now used by Image Viewer and not only Pixel Paint. This improves the fullscreen and play icons so that they fit together better.
2023-01-02Solitaire: Add link to help pageEvan Smal
2023-01-02Demos: Remove "Mouse" applicationAndreas Kling
This was a plain-looking test app for debugging mouse events. Mouse events work now, and if we want mouse testing facilities, they can be added to MouseSettings instead.
2023-01-02Demos: Remove "Fire" applicationAndreas Kling
This served no purpose other than looking somewhat neat.
2023-01-02LibGfx+icc: Print pcs illuminantNico Weber
2023-01-02Base: Move GML Widget documentation to subsubsectionkleines Filmröllchen
This is not only convenient, but also a subsection testcase :^)
2023-01-02Base: Move GML documentation into subsectionkleines Filmröllchen
That was the whole point of this endeavour :^)
2023-01-02Base: Document manpage structure separatelykleines Filmröllchen
This section is now removed from Help(1) and man(1).
2023-01-02Help: Detect clicked page correctlykleines Filmröllchen
index_from_path is the only remaining model index handling function that wasn't aware of subsections. After this change, clicked pages are resolved to a model index correctly, eliminating the weird subsection-expansion bugs from before.
2023-01-02Help: Don't expand the whole tree of the selected node's parentkleines Filmröllchen
This now expands nodes unnecessarily with nested sections.
2023-01-02Help+LibManual: Open sibling page for subsectionskleines Filmröllchen
Clicking on a subsection now displays the sibling page, which is intended to be the main page for that section.
2023-01-02LibManual: Create subsections for subdirectories automaticallykleines Filmröllchen
2023-01-02LibManual: Add SubsectionNodekleines Filmröllchen
2023-01-02Help+LibManual: Move URL handling to LibManualkleines Filmröllchen
2023-01-02Utilities: Resolve manpage paths more robustly in markdown-checkkleines Filmröllchen
The path is now relative to the Serenity source directory, and later parts of the URL path are not simply discarded. This allows links into subsection man pages to be checked correctly.
2023-01-02LibManual: Allow overriding a Node's path calculationkleines Filmröllchen
This is necessary for subclassing SectionNode, but generally allows more code to rely on path() virtual dispatch always finding the correct path regardless of the static type.
2023-01-02Help+LibManual: Make the children accessor falliblekleines Filmröllchen
This is convenient for the section node which might compute children on the fly.
2023-01-02Help: Use array size instead of sizeof to determine number of sectionskleines Filmröllchen
This was a relict when the sections were still a help-internal array.
2023-01-02Help: Only toggle open/close for SectionNodeskleines Filmröllchen
The responsible code was actually casting everything to a SectionNode pointer, violating type safety all over the place and leading to frequent crashes. I'm surprised this was not exhibited before; I guess my recent changes made this bug surface.
2023-01-02Kernel: Propagate properly errors from PCI IDE Controller initializationLiav A
2023-01-02Kernel: Remove stale detect_disks method from PCI IDE controller classLiav A
2023-01-01Base: Add 8 new emoji and improve consistency on one morekleines Filmröllchen
- 👐 U+1F450 Open Hands - 🙌 U+1F64C Raising Hands is modified to match 👐 and other hand emoji. - ✊ U+270A Raised Fist - ✴️ U+2734 Eight-Pointed Star - ❇️ U+2747 Sparkle - ❎ U+274E Cross Mark Button - ❤️‍🔥 U+2764 U+200D U+1F525 Heart on Fire - 〰️ U+3030 Wavy Dash
2023-01-01LibGL: Stop unnecessarily casting to `float`Jelle Raaijmakers
If the `GLContext`'s internal state uses a `float`, it makes no sense casting to and from `double`s.
2023-01-01LibGL: Implement `GL_TEXTURE_ENV_COLOR`Jelle Raaijmakers
This sets a constant color in the texture's environment for the fixed function pipeline.
2023-01-01LibGUI: Fix wrong copyright header email for recent OpacitySlider changenetworkException
This patch fixes the wrong email domain being used for the copyright header change in f828bf64791c976d75d53dc73a41790adc727017