From 560e3631ec57d34c679e6b0faec1e0efdd18d915 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 10 Aug 2024 11:26:26 +1000 Subject: Move debug utils to debug.hh/debug.cc Lots of code includes buffer_utils.hh just for write_to_debug_buffer which pulls many unnecessary dependencies. Reorganise to reduce compile times. --- src/debug.hh | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/debug.hh (limited to 'src/debug.hh') diff --git a/src/debug.hh b/src/debug.hh new file mode 100644 index 00000000..ec010460 --- /dev/null +++ b/src/debug.hh @@ -0,0 +1,40 @@ +#ifndef debug_hh_INCLUDED +#define debug_hh_INCLUDED + +#include "constexpr_utils.hh" +#include "enum.hh" +#include "flags.hh" + +namespace Kakoune +{ + +class StringView; + +enum class DebugFlags +{ + None = 0, + Hooks = 1 << 0, + Shell = 1 << 1, + Profile = 1 << 2, + Keys = 1 << 3, + Commands = 1 << 4, +}; + +constexpr bool with_bit_ops(Meta::Type) { return true; } + +constexpr auto enum_desc(Meta::Type) +{ + return make_array>({ + { DebugFlags::Hooks, "hooks" }, + { DebugFlags::Shell, "shell" }, + { DebugFlags::Profile, "profile" }, + { DebugFlags::Keys, "keys" }, + { DebugFlags::Commands, "commands" }, + }); +} + +void write_to_debug_buffer(StringView str); + +} + +#endif // debug_hh_INCLUDED -- cgit v1.2.3 From 65ac5d42c9209c4b89c590c93cfa8d985e66b168 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 15 Aug 2024 11:41:35 +1000 Subject: Remove unused ConstexprVector and rename constexpr_utils.hh to array.hh --- src/debug.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/debug.hh') diff --git a/src/debug.hh b/src/debug.hh index ec010460..723bbb9e 100644 --- a/src/debug.hh +++ b/src/debug.hh @@ -1,7 +1,7 @@ #ifndef debug_hh_INCLUDED #define debug_hh_INCLUDED -#include "constexpr_utils.hh" +#include "array.hh" #include "enum.hh" #include "flags.hh" -- cgit v1.2.3 From 64ed046e5a841520506e1954ff0bd756ea112d94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Arrufat?= Date: Fri, 16 Aug 2024 08:49:19 +0900 Subject: include headers cleanup --- src/debug.hh | 1 - 1 file changed, 1 deletion(-) (limited to 'src/debug.hh') diff --git a/src/debug.hh b/src/debug.hh index ec010460..aa8b0f61 100644 --- a/src/debug.hh +++ b/src/debug.hh @@ -3,7 +3,6 @@ #include "constexpr_utils.hh" #include "enum.hh" -#include "flags.hh" namespace Kakoune { -- cgit v1.2.3