summaryrefslogtreecommitdiff
path: root/AK/Platform.h
AgeCommit message (Collapse)Author
2020-05-16AK: Remove experimental clang -Wconsumed stuffAndreas Kling
This stopped working quite some time ago due to Clang losing track of typestates for some reason and everything becoming "unknown". Since we're primarily using GCC anyway, it doesn't seem worth it to try and maintain this non-working experiment for a secondary compiler. Also it doesn't look like the Clang team is actively maintaining this flag anyway. So good-bye, -Wconsumed. :/
2020-04-30AK: Add ALWAYS_INLINE, NEVER_INLINE and FLATTEN macrosAndreas Kling
It's tedious to write (and look at) [[gnu::always_inline]] etc. :^)
2020-04-07AK: Disable the consumable annotation checking to fix Clang buildAndreas Kling
Clang keeps whining that NonnullFooPtrs are in "unknown" state and I'm not sure how to resolve that right now. Disable the checking until we can figure it out.
2020-04-06Bitmap: Add Bitmap::find_next_range_of_unset_bits()nimelehin
AK::Bitmap is extended with find_next_range_of_unset_bits(). The function is implemented using count_trailing_zeroes_32(), which is optimized on many platforms, that gives a huge performance boost. Functions find_longest_range_of_unset_bits() and find_first_fit() are implemented with find_next_range_of_unset_bits(). According to benchmarks, they are 60-100% faster.
2020-04-06AK: Add count_trailing_zeroes_32()nimelehin
Add count_trailing_zeroes_32() which is implemented with builtins if available, otherwise there's a generic fallback.
2020-02-19AK: Use endianness flags to determine if conversion is necessaryLiav A
2020-01-18Meta: Add license header to source filesAndreas Kling
As suggested by Joshua, this commit adds the 2-clause BSD license as a comment block to the top of every source file. For the first pass, I've just added myself for simplicity. I encourage everyone to add themselves as copyright holders of any file they've added or modified in some significant way. If I've added myself in error somewhere, feel free to replace it with the appropriate copyright holder instead. Going forward, all new source files should include a license header.
2019-07-25AK: Shim open_with_path_length() for non-Serenity builds.Andreas Kling
This is pretty ugly but I don't want to *not* use open_with_path_length() so let's just shim it.
2019-07-25AK: Allow NonnullRefPtr::ptr() when in "unknown" typestate.Andreas Kling
Clang loses the typestate when passing NonnullRefPtr's via lambda captures. This is unfortunate, but not much we can do about it. Allowing ptr() makes it possible to use captured NonnullRefPtrs as you'd expect.
2019-07-24AK: Move clang-specific consumable annotation helpers to Platform.hAndreas Kling
2019-07-09AK: Add Platform.h with an ARCH() macro.Andreas Kling
You can currently use this to detect the CPU architecture like so: #if ARCH(I386) ... #elif ARCH(X86_64) ... #else ... #endif This will be helpful for separating out architecture-specific code blocks.