serenity/AK
Shannon Booth 6a9222ffd3 AK: Add fast-path in from_utf8_with_replacement_character for utf-8
This ports the same optimization which was made in
1a46d8df5fc81eb2c320d5c8a5597285d3d8fb3a to this function as well.

(cherry picked from commit 1e8cc97b731871409316c121e637c32806135122)
2024-10-16 23:56:40 -04:00
..
.clang-tidy
AllOf.h
AnyOf.h
ArbitrarySizedEnum.h
Array.h AK: Add to_array() 2024-02-11 18:53:00 +01:00
Assertions.cpp AK: Re-enable execinfo for GNU Hurd 2024-07-05 09:24:53 -06:00
Assertions.h Everywhere: Prefer VERIFY over assert() 2024-02-05 07:03:53 -05:00
AsyncStream.h AK: Introduce asynchronous streams 2024-06-13 17:40:24 +02:00
AsyncStreamHelpers.h LibHTTP+LibCore+RequestServer: Use async streams for HTTP 2024-06-19 15:45:02 +02:00
AsyncStreamTransform.h AK: Add AK::AsyncStreamTransform 2024-06-13 17:40:24 +02:00
Atomic.h AK: Add workaround for faulty Sanitizer warning on gcc 13+ in Atomic 2024-04-23 15:37:07 -06:00
AtomicRefCounted.h
Badge.h AK: Don't delete Badge move constructor 2024-06-13 17:40:24 +02:00
Base64.cpp AK: Reject invalid Base64 encoded string lengths 2024-03-25 08:13:27 +01:00
Base64.h AK: Add base64url encoding and decoding methods 2024-03-20 12:18:57 -04:00
BigIntBase.h AK: Move generalized internals of UFixedBigIntDivision to BigIntBase 2024-03-25 14:26:29 -06:00
BinaryBufferWriter.h
BinaryHeap.h AK: Give IntrusiveBinaryHeap template args named types 2024-07-01 00:29:39 +02:00
BinarySearch.h
BitCast.h AK: Use bit_cast in SIMDExtras.h/AK::Detail::byte_reverse_impl 2024-07-12 18:30:07 -04:00
Bitmap.h AK: Replace C-style casts 2023-03-09 21:43:54 +01:00
BitmapView.h AK: Fix one-off error in BitmapView::find_first and find_one_anywhere 2023-10-11 15:58:16 +02:00
BitStream.h AK: Add BigEndianInputBitStream::bits_until_next_byte_boundary() 2024-02-12 14:08:56 +01:00
BufferedStream.h AK: Don't move trivially copyable types in BufferedStream methods 2024-04-30 13:22:56 +02:00
BuiltinWrappers.h AK: Fix doc comment for bit_scan_forward 2023-10-11 14:36:48 -04:00
BumpAllocator.h AK: Replace C-style casts 2023-03-09 21:43:54 +01:00
ByteBuffer.h AK: Add XOR method to ByteBuffer 2024-04-08 09:34:49 -06:00
ByteReader.h
ByteString.cpp AK: Disallow calling ByteString methods that return a view on rvalues 2024-04-04 11:23:21 +02:00
ByteString.h AK: Disallow calling ByteString methods that return a view on rvalues 2024-04-04 11:23:21 +02:00
CharacterTypes.h AK: Add is_ascii_c0_control_or_space 2024-10-15 12:08:50 -04:00
Checked.h LibJS+AK: Fix integer overflow UB on (any Int32 - -2147483648) 2024-05-18 18:11:50 +02:00
CheckedFormatString.h AK: Enable format string checking in Clang builds 2024-05-29 13:34:15 -06:00
CircularBuffer.cpp AK: Use hashing to accelerate searching a CircularBuffer 2023-07-06 15:06:20 +01:00
CircularBuffer.h AK: Use hashing to accelerate searching a CircularBuffer 2023-07-06 15:06:20 +01:00
CircularDeque.h
CircularQueue.h Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
CMakeLists.txt AK: Add a helper to detect which CPU features are supported 2024-07-12 18:30:07 -04:00
Complex.h Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
Concepts.h AK: Add a CallableAs<R, Args...> concept 2023-07-08 23:13:00 +01:00
ConstrainedStream.cpp AK: Move ConstrainedStream from LibWasm and limit discarding 2023-03-21 10:25:13 +01:00
ConstrainedStream.h AK: Add remaining method to ConstrainedStream 2024-07-10 01:10:12 +02:00
Coroutine.h AK: Declare AK::Coroutine<T>::CoroutinePromiseBase::unhandled_exception 2024-08-29 13:28:42 +02:00
CountingStream.cpp AK: Add a Stream wrapper that counts read bytes 2023-03-21 10:25:13 +01:00
CountingStream.h AK: Add a Stream wrapper that counts read bytes 2023-03-21 10:25:13 +01:00
COWVector.h AK+LibRegex+LibWasm: Remove the non-const COWVector::operator[] 2024-03-12 17:10:47 +01:00
CPUFeatures.cpp LibCrypto: Implement AES by using x86 intrinsics 2024-08-21 08:19:35 -04:00
CPUFeatures.h LibCrypto: Implement AES by using x86 intrinsics 2024-08-21 08:19:35 -04:00
DateConstants.h
Debug.h.in Ladybird+LibWebView: Add mechanism to get Mach task port for helpers 2024-04-09 16:43:27 -06:00
DefaultDelete.h
Demangle.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
DeprecatedFlyString.cpp AK+LibJS: Remove null state from DeprecatedFlyString :^) 2024-02-24 15:06:52 -07:00
DeprecatedFlyString.h AK+LibJS: Remove null state from DeprecatedFlyString :^) 2024-02-24 15:06:52 -07:00
Diagnostics.h
DisjointChunks.h AK: Rename GenericTraits to DefaultTraits 2023-11-09 10:05:51 -05:00
DistinctNumeric.h AK: Rename GenericTraits to DefaultTraits 2023-11-09 10:05:51 -05:00
DOSPackedTime.cpp Kernel: Use UnixDateTime wherever applicable 2023-05-24 23:18:07 +02:00
DOSPackedTime.h Kernel: Use UnixDateTime wherever applicable 2023-05-24 23:18:07 +02:00
DoublyLinkedList.h Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
Endian.h ntpquery: Use AK::convert_between_host_and_network_endian 2024-02-06 04:37:47 -07:00
EnumBits.h
Enumerate.h AK: Introduce AK::enumerate 2024-03-23 09:02:58 -04:00
Error.cpp
Error.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Find.h AK: Add missing using statements to Find.h 2024-05-06 17:32:19 +02:00
FixedArray.h AK: Don't put element count next to heap-allocated data in FixedArray 2024-05-18 18:30:42 +02:00
FixedPoint.h AK: Make FixedPoint work on platforms without __int128 2023-09-06 07:17:03 -06:00
FixedStringBuffer.h Prekernel: Add support for assertion printing 2024-06-29 19:56:45 +02:00
FloatingPoint.h AK: Use common ComponentType integer type for float bitfields 2024-04-23 19:18:09 -06:00
FloatingPointStringConversions.cpp AK: Make BigIntBase more agnostic to non native word sizes 2024-03-25 14:26:29 -06:00
FloatingPointStringConversions.h
FlyString.cpp AK: Make FlyString::from_utf8*() avoid allocation if possible 2024-03-24 13:28:24 +01:00
FlyString.h AK: Simplify and optimize ASCIICaseInsensitiveFlyStringTraits::equals 2024-04-06 09:17:51 -04:00
Format.cpp AK: Fix {:c} formatter for big-endian 2024-08-06 23:03:10 +02:00
Format.h Everywhere: Gently remove the ladybird android port 2024-06-11 19:40:08 -04:00
FormatParser.h AK: Move FormatParser to a new header 2024-07-04 22:17:11 +02:00
Forward.h LibHTTP+LibCore+RequestServer: Use async streams for HTTP 2024-06-19 15:45:02 +02:00
FPControl.h AK: Ensure unions with bitfield structs actually have correct sizes 2023-11-01 09:10:38 +03:30
Function.h ClangPlugins: Invert the lambda detection escape mechanism 2024-05-22 21:55:34 -06:00
FuzzyMatch.cpp AK/FuzzyMatch: Return the best possible score in case of equality 2024-08-23 14:14:05 -04:00
FuzzyMatch.h
Generator.h AK: Introduce AK::Generator 2024-06-13 17:40:24 +02:00
GenericAwaiter.h LibHTTP+LibCore+RequestServer: Use async streams for HTTP 2024-06-19 15:45:02 +02:00
GenericLexer.cpp AK: Instantiate GenericLexer::consume_decimal_integer<size_t> on MacOS 2024-06-13 17:40:24 +02:00
GenericLexer.h AK: Make a couple of GenericLexer helper methods protected 2024-07-07 18:47:09 +02:00
GenericShorthands.h AK: Mark generic shorthand functions as constexpr 2023-06-01 06:25:00 +02:00
HashFunctions.h
HashMap.h Everywhere: Remove usages of template keyword with no parameter list 2024-06-25 17:42:49 +02:00
HashTable.h Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
Hex.cpp Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
Hex.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
IDAllocator.h AK: Allow specifying a minimum value for IDs returned by IDAllocator 2023-04-07 16:02:22 +02:00
InsertionSort.h
IntegralMath.h AK: Fix off by one error in integral ceil_log2() 2024-05-21 09:31:17 +02:00
IntrusiveDetails.h
IntrusiveList.h AK: Accomodate always-32-bit data member pointers in IntrusiveList 2023-05-02 17:46:39 +03:30
IntrusiveListRelaxedConst.h
IntrusiveRedBlackTree.h
IPv4Address.h Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
IPv6Address.h AK: Add IPv6 subnet and address category handling 2024-09-08 18:27:55 -04:00
IterationDecision.h
Iterator.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
JsonArray.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
JsonArraySerializer.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
JsonObject.cpp AK+Everywhere: Remove JsonValue APIs with implicit default values 2024-01-21 15:47:53 -07:00
JsonObject.h AK: Store JsonValue's value in AK::Variant 2024-02-08 08:04:05 -07:00
JsonObjectSerializer.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
JsonParser.cpp AK: Decode paired UTF-16 surrogates in a JSON string 2024-07-07 18:47:09 +02:00
JsonParser.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
JsonPath.cpp AK: Add a fallible try_resolve() function to JsonPath 2024-10-02 08:10:54 +02:00
JsonPath.h AK: Add a fallible try_resolve() function to JsonPath 2024-10-02 08:10:54 +02:00
JsonValue.cpp AK: Store JsonValue's value in AK::Variant 2024-02-08 08:04:05 -07:00
JsonValue.h AK: Return a constant reference from JsonValue::as_string 2024-04-04 11:23:21 +02:00
kmalloc.cpp Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
kmalloc.h
kstdio.h
LEB128.h AK/LEB128: Speed up reading unsigned LEB128 values 2024-07-29 14:34:01 +02:00
LexicalPath.cpp AK: Add is_canonical method for LexicalPath 2024-07-21 11:44:23 +02:00
LexicalPath.h AK: Add is_canonical method for LexicalPath 2024-07-21 11:44:23 +02:00
MACAddress.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Math.h AK: Use fast exponentiation for pow() 2024-10-13 03:44:49 +02:00
MaybeOwned.h AK: Allow creating a MaybeOwned<Superclass> from a MaybeOwned<Subclass> 2024-03-25 20:35:00 +01:00
MemMem.h
Memory.h Everywhere: Move global Kernel pattern code to Kernel/Library directory 2023-06-04 21:32:34 +02:00
MemoryStream.cpp AK: Use an enum to specify the open mode instead of a bool 2023-11-08 18:19:34 +01:00
MemoryStream.h Everywhere: Define even more destructors out of line 2024-06-30 08:52:07 +02:00
NeverDestroyed.h
NoAllocationGuard.h
Noncopyable.h AK: Add AK_MAKE_DEFAULT_COPYABLE 2024-01-21 16:16:15 -07:00
NonnullOwnPtr.h AK+Kernel+LibVideo: Include workarounds for missing P0960 only in Xcode 2024-05-21 14:24:59 +02:00
NonnullRefPtr.h AK+Kernel+LibVideo: Include workarounds for missing P0960 only in Xcode 2024-05-21 14:24:59 +02:00
NumberFormat.cpp AK: Don't show '0 seconds' unless seconds is the only available element 2024-10-02 08:10:54 +02:00
NumberFormat.h AK+Userland: Return String from human_readable_size() functions 2024-01-25 09:07:32 +01:00
NumericLimits.h AK+LibJS: Make Number.MIN_VALUE a denormal 2023-07-02 21:19:09 +01:00
Optional.h AK: Don't implicitly convert Optional<T&> to Optional<T> 2024-09-14 13:30:27 +02:00
OptionParser.cpp AK: Update OptionParser::m_arg_index by substracting skipped args 2024-02-06 00:08:30 +01:00
OptionParser.h
OwnPtr.h AK: Add a formatter for OwnPtr<T> 2024-06-19 15:45:02 +02:00
Platform.h AK: Make workaround for broken coroutine type deduction more specific 2024-08-26 17:47:03 +02:00
PrintfImplementation.h AK: Implement printf's "period without precision value" correctly 2023-10-06 08:21:18 +02:00
Ptr32.h
Queue.h AK: Add fallible dequeue method to Queue 2024-04-19 16:38:55 -04:00
QuickSelect.h
QuickSort.h
Random.cpp Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
Random.h Everywhere: Gently remove the ladybird android port 2024-06-11 19:40:08 -04:00
RecursionDecision.h AK: Add missing include in RecursionDecision.h 2023-08-18 08:58:51 +03:30
RedBlackTree.h Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
RefCounted.h
RefCountForwarder.h
RefPtr.h AK: Rename GenericTraits to DefaultTraits 2023-11-09 10:05:51 -05:00
Result.h
ReverseIterator.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
ScopedValueRollback.h
ScopeGuard.h
ScopeLogger.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
SegmentedVector.h AK+LibWeb: Use segmented vector to store commands in RecordingPainter 2023-12-30 23:02:46 +01:00
SetOnce.h AK: Add the SetOnce class 2024-04-26 23:46:23 -06:00
SIMD.h AK: Add simd_cast<T> and replace to_TxN with it 2024-08-08 22:43:53 -04:00
SIMDExtras.h AK: Add simd_cast<T> and replace to_TxN with it 2024-08-08 22:43:53 -04:00
SIMDMath.h LibGfx/PNGWriter+AK: SIMDify paeth predictor more 2024-08-10 13:07:01 -04:00
Singleton.h Everywhere: Move global Kernel pattern code to Kernel/Library directory 2023-06-04 21:32:34 +02:00
SinglyLinkedList.h Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
SinglyLinkedListSizePolicy.h
SipHash.cpp AK: Make SipHash not depend on size_t bit length 2023-10-27 05:57:18 +03:30
SipHash.h AK: Implement SipHash as the default hash algorithm for most use cases 2023-10-01 11:06:36 +03:30
Slugify.cpp AK: Implement slugify function for URL slug generation 2023-10-30 10:39:59 +00:00
Slugify.h AK: Implement slugify function for URL slug generation 2023-10-30 10:39:59 +00:00
SourceGenerator.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
SourceLocation.h AK: Add copy assignment operator for SourceLocation 2023-09-24 14:55:32 +02:00
Span.h AK/Span: Add a method to check if a Span is filled with a value 2024-06-29 19:16:08 +02:00
Stack.h
StackInfo.cpp Everywhere: Gently remove the ladybird android port 2024-06-11 19:40:08 -04:00
StackInfo.h AK: Use __builtin_frame_address to find current stack depth remaining 2023-07-01 07:03:11 +02:00
StackUnwinder.h AK: Add a function for frame pointer-based stack unwinding 2024-05-14 14:02:06 -06:00
Statistics.h AK: Export Statistics to the global namespace 2024-05-18 18:30:07 +02:00
StdLibExtraDetails.h Everywhere: Run clang-format 2024-04-24 16:50:01 -04:00
StdLibExtras.h AK: Qualify forward call in AK::exchange 2024-06-13 17:40:24 +02:00
Stream.cpp AK: Rename Stream::format() to Stream::write_formatted() 2023-04-25 07:30:16 +01:00
Stream.h AK: Add a Stream::write_until_depleted overload for string types 2024-04-04 11:23:21 +02:00
StreamBuffer.h AK: Rename AsyncStreamBuffer -> StreamBuffer 2024-08-29 13:28:42 +02:00
String.cpp AK: Add fast-path in from_utf8_with_replacement_character for utf-8 2024-10-16 23:56:40 -04:00
String.h AK: Add String::from_utf8_with_replacement_character 2024-10-16 23:56:40 -04:00
StringBase.cpp AK: Remove excessive hashing caused by FlyString table 2024-03-24 13:28:24 +01:00
StringBase.h AK: Remove excessive hashing caused by FlyString table 2024-03-24 13:28:24 +01:00
StringBuilder.cpp LibWeb: Skip some redundant UTF-8 validation in CSS tokenizer 2024-03-24 13:28:24 +01:00
StringBuilder.h LibWeb: Skip some redundant UTF-8 validation in CSS tokenizer 2024-03-24 13:28:24 +01:00
StringData.h AK: Remove excessive hashing caused by FlyString table 2024-03-24 13:28:24 +01:00
StringFloatingPointConversions.cpp
StringFloatingPointConversions.h
StringHash.h AK: Implement SipHash as the default hash algorithm for most use cases 2023-10-01 11:06:36 +03:30
StringImpl.cpp AK+Everywhere: Remove the null state of DeprecatedString 2023-10-13 18:33:21 +03:30
StringImpl.h
StringUtils.cpp Prekernel: Add support for assertion printing 2024-06-29 19:56:45 +02:00
StringUtils.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
StringView.cpp AK: Add a StringView method to count the number of lines in a string 2024-03-08 14:43:33 -05:00
StringView.h AK: Use StringView as its own peek type 2024-09-14 13:30:27 +02:00
TemporaryChange.h
Time.cpp AK: Remove Duration::now_monotonic 2023-05-24 23:18:07 +02:00
Time.h AK: Move nanoseconds_within_second to Duration 2024-07-04 22:17:11 +02:00
Traits.h AK: Don't blindly use SipHash as default hash function 2024-03-25 12:39:23 +01:00
Trie.h Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
Try.h
Tuple.h AK: Make IndexSequence use size_t 2024-02-11 18:53:00 +01:00
TypeCasts.h AK: Assert that is<T>() input and output types are not the same 2024-09-28 14:14:28 -04:00
TypedTransfer.h
TypeList.h AK: Make IndexSequence use size_t 2024-02-11 18:53:00 +01:00
Types.h AK: Introduce declerations for base10 size suffixes 2024-06-25 09:24:55 +02:00
UBSanitizer.h AK+Kernel+LibSanitizer: Implement __ubsan_handle_function_type_mismatch 2024-04-18 13:14:33 -06:00
UFixedBigInt.h Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
UFixedBigIntDivision.h AK: Move generalized internals of UFixedBigIntDivision to BigIntBase 2024-03-25 14:26:29 -06:00
UnicodeUtils.h AK: Stop using ShortString in String::from_code_point 2024-01-21 16:16:15 -07:00
Userspace.h Kernel: Move {Virtual,Physical}Address classes to the Memory directory 2023-06-04 21:32:34 +02:00
Utf8View.cpp AK: Add ASCII fast path to Utf8CodePointIterator 2023-12-30 13:49:50 +01:00
Utf8View.h AK: Add AllowSurrogates to UTF-8 validator 2024-06-09 16:30:09 +02:00
Utf16View.cpp AK: Add AllowSurrogates to UTF-8 validator 2024-06-09 16:30:09 +02:00
Utf16View.h Everywhere: Run clang-format 2024-04-24 16:50:01 -04:00
Utf32View.cpp
Utf32View.h
UUID.cpp AK+Userland: Remove some needlessly explicit conversions to StringView 2024-04-04 11:23:21 +02:00
UUID.h Everywhere: Move global Kernel pattern code to Kernel/Library directory 2023-06-04 21:32:34 +02:00
Variant.h Everywhere: Remove usages of template keyword with no parameter list 2024-06-25 17:42:49 +02:00
Vector.h AK+LibJS: Remove OFFSET_OF and its users 2024-02-29 09:00:00 +01:00
Weakable.h AK+LibJS: Remove OFFSET_OF and its users 2024-02-29 09:00:00 +01:00
WeakPtr.h