Files
ladybird/AK
Daniel Bertalan aaf1b762ea AK: Remove redundant information from TypeErasedFormatParams
The array which contains the actual parameters is always located
immediately after the base `TypeErasedFormatParams` object of
`VariadicFormatParams`. Hence, storing a pointer to it inside a `Span`
is redundant. Changing it to a zero-length array saves 8 bytes.

Secondly, we limit the number of parameters to 256, so `m_size` and
`m_next_index` can be stored in a smaller data type than `size_t`,
saving us another 8 bytes.

This decreases the size of a single-element `VariadicFormatParams` from
48 to 32 bytes, thus reducing the code size overhead of setting up
parameters for `dbgln()`.

Note that [arrays of length zero][1] are a GNU extension, but it's used
elsewhere in the codebase already and is explicitly supported by Clang
and GCC.

[1]: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
2023-07-14 06:37:11 +02:00
..
2023-05-18 22:49:02 +02:00
2023-05-18 22:49:02 +02:00
2022-12-03 23:52:23 +00:00
2022-12-03 23:52:23 +00:00
2023-03-09 21:43:54 +01:00
2023-03-09 21:43:54 +01:00
2023-05-17 09:08:53 +02:00
2023-03-09 21:43:54 +01:00
2022-12-19 09:29:12 -05:00
2023-04-12 07:33:15 -04:00
2023-07-12 17:03:07 +02:00
2022-12-03 23:52:23 +00:00
2023-05-09 11:18:46 +02:00
2023-04-12 19:37:35 +02:00
2022-12-11 16:05:23 +00:00
2023-07-09 15:39:52 +01:00
2022-12-03 23:52:23 +00:00
2023-03-14 16:52:44 +01:00
2023-07-06 15:06:20 +01:00
2022-12-03 23:52:23 +00:00
2023-03-09 21:43:54 +01:00
2023-05-24 23:18:07 +02:00
2023-03-09 21:43:54 +01:00
2022-12-03 23:52:23 +00:00
2022-12-03 23:52:23 +00:00
2023-03-09 21:43:54 +01:00
2023-03-09 21:43:54 +01:00
2023-07-08 10:32:56 +01:00
2023-07-08 10:32:56 +01:00
2022-12-03 23:52:23 +00:00