Commit graph

14 commits

Author SHA1 Message Date
Gunnar Beutner 661d1aa8d1 AK: Add inline storage support for the Function class
This allows us to allocate most Function objects on the stack or as
part of other objects and gets rid of quite a few allocations.
2021-05-19 21:36:57 +02:00
AnotherTest a6e4482080 AK+Everywhere: Make StdLibExtras templates less wrapper-y
This commit makes the user-facing StdLibExtras templates and utilities
arguably more nice-looking by removing the need to reach into the
wrapper structs generated by them to get the value/type needed.
The C++ standard library had to invent `_v` and `_t` variants (likely
because of backwards compat), but we don't need to cater to any codebase
except our own, so might as well have good things for free. :^)
2021-04-10 21:01:31 +02:00
Andreas Kling 5d180d1f99 Everywhere: Rename ASSERT => VERIFY
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED)

Since all of these checks are done in release builds as well,
let's rename them to VERIFY to prevent confusion, as everyone is
used to assertions being compiled out in release.

We can introduce a new ASSERT macro that is specifically for debug
checks, but I'm doing this wholesale conversion first since we've
accumulated thousands of these already, and it's not immediately
obvious which ones are suitable for ASSERT.
2021-02-23 20:56:54 +01:00
Ben Wiederhake cc89606ba8 Everywhere: Remove unnecessary headers 3/4
Arbitrarily split up to make git bisect easier.

These unnecessary #include's were found by combining an automated tool (which
determined likely candidates) and some brain power (which decided whether
the #include is also semantically superfluous).
2021-02-08 18:03:57 +01:00
Lenny Maiorani e6f907a155 AK: Simplify constructors and conversions from nullptr_t
Problem:
- Many constructors are defined as `{}` rather than using the ` =
  default` compiler-provided constructor.
- Some types provide an implicit conversion operator from `nullptr_t`
  instead of requiring the caller to default construct. This violates
  the C++ Core Guidelines suggestion to declare single-argument
  constructors explicit
  (https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c46-by-default-declare-single-argument-constructors-explicit).

Solution:
- Change default constructors to use the compiler-provided default
  constructor.
- Remove implicit conversion operators from `nullptr_t` and change
  usage to enforce type consistency without conversion.
2021-01-12 09:11:45 +01:00
Ben Wiederhake 8940bc3503 Meta+AK: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
Robin Burchell 0dc9af5f7e Add clang-format file
Also run it across the whole tree to get everything using the One True Style.
We don't yet run this in an automated fashion as it's a little slow, but
there is a snippet to do so in makeall.sh.
2019-05-28 17:31:20 +02:00
Andreas Kling ffab6897aa Big, possibly complete sweep of naming changes. 2019-01-31 17:31:23 +01:00
Andreas Kling ca6847b5bb Import a simple text editor I started working on. 2018-12-04 00:27:16 +01:00
Andreas Kling 3b2dcd5929 Add a VMO pointer to VNode.
This way, if anyone tries to map an already mapped file, we share the VMO.
2018-11-08 15:39:26 +01:00
Andreas Kling 71bffa9864 Fix whiny build. 2018-11-07 16:38:45 +01:00
Andreas Kling ed2422d7af Start adding a basic /proc filesystem and a "ps" utility. 2018-10-23 12:04:03 +02:00
Andreas Kling b824f15619 Launching an arbitrary ELF executable from disk works! :^)
This is so cool! It's a bit messy now with two Task constructors,
but eventually they should fold into a single constructor somehow.
2018-10-22 15:43:02 +02:00
Andreas Kling 9171521752 Integrate ext2 from VFS into Kernel. 2018-10-17 10:57:23 +02:00