1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2026-01-20 09:11:00 +00:00
serenity/Meta/Lagom/Tools/CodeGenerators/LibLocale
Timothy Flynn 604d5f5bca AK+Everywhere: Do not implicitly copy variables in TRY macros
For example, consider cases where we want to propagate errors only in
specific instances:

    auto result = read_data(); // something like ErrorOr<ByteBuffer>
    if (result.is_error() && result.error().code() != EINTR)
        continue;
    auto bytes = TRY(result);

The TRY invocation will currently copy the byte buffer when the
expression (in this case, just a local variable) is stored into
_temporary_result.

This patch binds the expression to a reference to prevent such copies.
In less trival invocations (such as TRY(some_function()), this will
incur only temporary lifetime extensions, i.e. no functional change.
2023-02-10 09:08:52 +00:00
..
CMakeLists.txt LibUnicode: Move CLDR data generators to a LibLocale subfolder 2022-09-05 14:37:16 -04:00
GenerateDateTimeFormatData.cpp Everywhere: Use ReadonlySpan<T> instead of Span<T const> 2023-02-08 19:15:45 +00:00
GenerateLocaleData.cpp AK+Everywhere: Do not implicitly copy variables in TRY macros 2023-02-10 09:08:52 +00:00
GenerateNumberFormatData.cpp Everywhere: Use ReadonlySpan<T> instead of Span<T const> 2023-02-08 19:15:45 +00:00
GeneratePluralRulesData.cpp Everywhere: Use ReadonlySpan<T> instead of Span<T const> 2023-02-08 19:15:45 +00:00
GenerateRelativeTimeFormatData.cpp LibJS+LibLocale: Propagate OOM from CLDR RelativeTime Vector operations 2023-02-08 18:32:37 +00:00