summaryrefslogtreecommitdiff
path: root/AK
AgeCommit message (Collapse)Author
2022-02-23AK: Add forward declaration for Utf8CodePointIteratorLinus Groh
2022-02-23AK: Add optional format string parameter to String{,Builder}::join()Linus Groh
Allow specifying a custom format string that's being used for each item instead of hardcoding "{}".
2022-02-23AK: Add Traits<Span<T>>::hash()Linus Groh
2022-02-23AK: Add the Fundamental conceptkleines Filmröllchen
2022-02-23AK: Prevent Atomic with complex typeskleines Filmröllchen
This would throw some really weird linker errors, so let's prevent it from happening instead!
2022-02-21AK: Suppress clang-tidy warning on TODO()Max Wipfli
This adds a NOLINT directive to the definition of the TODO() macro. clang-tidy wants the assert replaced with a static_assert, since the macro simply resolves to assert(false). This is obviously nonsensical, since we want the code to still compile even with TODO(). The same fix has already been implemented for VERIFY_NOT_REACHED().
2022-02-19AK: Add fast path in String::trim() and String::trim_whitespace()Andreas Kling
If the trimmed string would be the entire string, just return *this instead of creating a new StringImpl.
2022-02-19AK: Make CaseInsensitiveStringTraits allocation-freeAndreas Kling
Instead of calling String::to_lowercase(), do case-insensitive hashing and comparison.
2022-02-19AK: Don't use x86 assembly when building for non-x86 targetsGunnar Beutner
This allows Lagom to be built successfully for Apple M1. Fixes #12644.
2022-02-17LibWeb: Add partially functioning Worker APIBen Abraham
Add a partial implementation of HTML5 Worker API. Messages can be sent from the inner context externally.
2022-02-16AK: VERIFY inside release_value_but_fixme_should_propagate_errors()Sam Atkins
While the code did already VERIFY that the ErrorOr holds a value, this was done by Variant, so the error message was just that `has<T>()` is false. This is less helpful than I would like, especially if backtraces are not working and this is all you have to go on. Adding this extra VERIFY means the assertion message (`!is_error()`) is easier to understand.
2022-02-16AK: Exclude StringUtils String APIs from the KernelIdan Horowitz
These APIs are only used by userland, and String is OOM-infallible, so let's just ifdef it out of the Kernel.
2022-02-16AK: Exclude StringView String APIs from the KernelIdan Horowitz
These APIs are only used by userland, and String is OOM-infallible, so let's just ifdef it out of the Kernel.
2022-02-16AK: Exclude StringBuilder String APIs from the KernelIdan Horowitz
These APIs are only used by userland, and String is OOM-infallible, so let's just ifdef it out of the Kernel.
2022-02-16AK: Exclude JsonValue String APIs from the KernelIdan Horowitz
These APIs are only used by userland, and String is OOM-infallible, so let's just ifdef it out of the Kernel.
2022-02-16AK: Use string_view() instead of to_string() in Formatter<wchar_t>Idan Horowitz
This let's us avoid a heap allocation.
2022-02-16AK: Exclude GenericLexer String APIs from the KernelIdan Horowitz
These APIs are only used by userland, and String is OOM-infallible, so let's just ifdef it out of the Kernel.
2022-02-16AK: Return KString instead of String from encode_hex in the KernelIdan Horowitz
This let's us propagate allocation errors from this API.
2022-02-16AK+Kernel: Specialize Trie for NNOP<KString> and use it in UnveilNodeIdan Horowitz
This let's us avoid the infallible String allocations.
2022-02-16AK+Kernel: Return KString from UUID::to_string() in the KernelIdan Horowitz
This lets us safely handle allocation failure.
2022-02-16AK+Kernel: Return KString from MACAddress::to_string() in the KernelIdan Horowitz
This lets us safely handle allocation failure.
2022-02-16AK+Kernel: Return KString from IPv4Address::to_string() in the KernelIdan Horowitz
This lets us safely handle allocation failure.
2022-02-16AK: Fix userland parsing of rounded floating point numbersserenitydev
Parse JSON floating point literals properly, No longer throwing a SyntaxError when the decimal portion of the number exceeds the capacity of u32. Added tests to AK/TestJSON and LibJS/builtins/JSON/JSON.parse
2022-02-15AK+Kernel: OOM-harden most parts of TrieAli Mohammad Pur
The only part of Unveil that can't handle OOM gracefully is the String::formatted() use in the node metadata.
2022-02-15AK: Conditionally disable a few variant ctors/assignmentsAli Mohammad Pur
We shouldn't let copy/move ctors or assignments be instantiated if the assignee type does not have a copy/move constructor (even if they're not used anywhere).
2022-02-15AK: Add a 'SpecializationOf' conceptAli Mohammad Pur
The counterpart to the IsSpecializationOf<...> template.
2022-02-13Kernel: Remove make_weak_ptr()Idan Horowitz
New users of WeakPtr in the kernel should use try_make_weak_ptr instead
2022-02-13AK+Kernel: Add an OOM-fallible try variant make_weak_ptr()Idan Horowitz
This will allow us to propagate allocation errors that may be raised by the construction of the WeakLink.
2022-02-13AK+Kernel: Rename try_make_weak_ptr to make_weak_ptr_if_nonnullIdan Horowitz
This matches the likes of the adopt_{own, ref}_if_nonnull family and also frees up the name to allow us to eventually add OOM-fallible versions of these functions.
2022-02-13AK: Use ByteBuffer::append(u8) in StringBuilder single-char appendAndreas Kling
2022-02-13AK: Don't call memcpy() in ByteBuffer::append(u8)Andreas Kling
We can emit way nicer code for the just-append-a-single-byte case.
2022-02-11AK: Make Bitmap construction OOM-fallibleIdan Horowitz
2022-02-10AK: Clear minimum when removing last node of RedBlackTreedavidot
2022-02-10AK: Fix RedBlackTree::find_smallest_not_below_iteratordavidot
Before this was incorrectly assuming that if the current node `n` was at least the key and the left child of `n` was below the key that `n` was always correct. However, the right child(ren) of the left child of `n` could still be at least the key. Also added some tests which produced the wrong results before this.
2022-02-10AK: Change static base36 character map to function-local constexprLenny Maiorani
Static variables consume memory and can be subject to less optimization. This variable is only used in 1 place and can be moved into the function and make it non-static.
2022-02-09AK: Add RBTree::find_smallest_above_iterator(Key)Ali Mohammad Pur
2022-02-09LibTLS+RequestServer: Add an option to dump TLS keys to a log fileAli Mohammad Pur
This file allows us to decrypt TLS messages in wireshark, which can help immensely in debugging network stuff :^)
2022-02-09AK+Kernel: Alphabetize debug macrosLenny Maiorani
This is not ASCII-betical because `_` comes after all the uppercase characters. Treating `_` as a ` ` (space character), these lists are now alphabetical.
2022-02-06AK: Move integral log2 and exp to IntegerMath.hHendiadyoin1
2022-02-06AK: Use integral power for FixedPoint formattingHendiadyoin1
This removes an ifdef for the Kernel
2022-02-06AK: Introduce IntegralMath.h starting with pow<I>Hendiadyoin1
2022-02-06LibWeb: Put ResolvedCSSStyleDeclaration debug spam behind a macroAndreas Kling
Blowing up the debug console with a fajillion FIXME's whenever you navigate in the web inspector is no fun.
2022-02-06AK: Replace 'consteval' with 'constexpr' in some Variant helpersAli Mohammad Pur
CLion and/or clangd didn't like the consteval and highlighted visit() as an error, just replace it with constexpr as it makes no difference here.
2022-02-05AK: Remove commented-out code from Bitmap containerLiav A
Instead, add a note to explain that there's a const variant of data() method in the parent BitmapView class.
2022-02-05AK: Make Vector::data() ALWAYS_INLINEIdan Horowitz
This was showing up in profiles of Browser, and it really shouldn't be.
2022-02-03AK: Convert the try_make<T> factory function to use ErrorOrIdan Horowitz
This allows more ergonomic memory allocation failure related error checking using the TRY macro.
2022-02-03AK: Hide the infallible make<T> factory function from the KernelIdan Horowitz
This function has no users, nor should it ever be used in the kernel, as all allocation failures in the Kernel should be explicitly checked.
2022-02-03AK: Stop using the make<T> factory function in TrieIdan Horowitz
This function is infallible, and so we would like to exclude it from the Kernel, which includes this header.
2022-02-03Kernel: Convert try_make_ref_counted to use ErrorOrIdan Horowitz
This allows more ergonomic memory allocation failure related error checking using the TRY macro.
2022-02-03AK: Support formatting Vectors with any inline_capacityIdan Horowitz
The default Vector type has its inline capacity set to 0, which means any Vector with non-zero inline capacity was unformattable.