mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
AK: Remove unused STRINGIMPL_DEBUG instrumentation
This commit is contained in:
parent
5fd65adb19
commit
d039542c7c
Notes:
sideshowbarker
2024-07-18 18:09:27 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/d039542c7c0
3 changed files with 0 additions and 31 deletions
|
@ -350,10 +350,6 @@
|
||||||
#cmakedefine01 SQL_DEBUG
|
#cmakedefine01 SQL_DEBUG
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef STRINGIMPL_DEBUG
|
|
||||||
#cmakedefine01 STRINGIMPL_DEBUG
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SYNTAX_HIGHLIGHTING_DEBUG
|
#ifndef SYNTAX_HIGHLIGHTING_DEBUG
|
||||||
#cmakedefine01 SYNTAX_HIGHLIGHTING_DEBUG
|
#cmakedefine01 SYNTAX_HIGHLIGHTING_DEBUG
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <AK/Debug.h>
|
|
||||||
#include <AK/FlyString.h>
|
#include <AK/FlyString.h>
|
||||||
#include <AK/Memory.h>
|
#include <AK/Memory.h>
|
||||||
#include <AK/StdLibExtras.h>
|
#include <AK/StdLibExtras.h>
|
||||||
|
@ -12,21 +11,6 @@
|
||||||
#include <AK/StringImpl.h>
|
#include <AK/StringImpl.h>
|
||||||
#include <AK/kmalloc.h>
|
#include <AK/kmalloc.h>
|
||||||
|
|
||||||
#if STRINGIMPL_DEBUG
|
|
||||||
unsigned g_stringimpl_count;
|
|
||||||
static HashTable<StringImpl*>* g_all_live_stringimpls;
|
|
||||||
|
|
||||||
void dump_all_stringimpls();
|
|
||||||
void dump_all_stringimpls()
|
|
||||||
{
|
|
||||||
unsigned i = 0;
|
|
||||||
for (auto& it : *g_all_live_stringimpls) {
|
|
||||||
dbgln("{}: \"{}\"", i, *it);
|
|
||||||
++i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace AK {
|
namespace AK {
|
||||||
|
|
||||||
static StringImpl* s_the_empty_stringimpl = nullptr;
|
static StringImpl* s_the_empty_stringimpl = nullptr;
|
||||||
|
@ -43,22 +27,12 @@ StringImpl& StringImpl::the_empty_stringimpl()
|
||||||
StringImpl::StringImpl(ConstructWithInlineBufferTag, size_t length)
|
StringImpl::StringImpl(ConstructWithInlineBufferTag, size_t length)
|
||||||
: m_length(length)
|
: m_length(length)
|
||||||
{
|
{
|
||||||
#if STRINGIMPL_DEBUG
|
|
||||||
if (!g_all_live_stringimpls)
|
|
||||||
g_all_live_stringimpls = new HashTable<StringImpl*>;
|
|
||||||
++g_stringimpl_count;
|
|
||||||
g_all_live_stringimpls->set(this);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
StringImpl::~StringImpl()
|
StringImpl::~StringImpl()
|
||||||
{
|
{
|
||||||
if (m_fly)
|
if (m_fly)
|
||||||
FlyString::did_destroy_impl({}, *this);
|
FlyString::did_destroy_impl({}, *this);
|
||||||
#if STRINGIMPL_DEBUG
|
|
||||||
--g_stringimpl_count;
|
|
||||||
g_all_live_stringimpls->remove(this);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline size_t allocation_size_for_stringimpl(size_t length)
|
static inline size_t allocation_size_for_stringimpl(size_t length)
|
||||||
|
|
|
@ -112,7 +112,6 @@ set(DIFF_DEBUG ON)
|
||||||
set(HIGHLIGHT_FOCUSED_FRAME_DEBUG ON)
|
set(HIGHLIGHT_FOCUSED_FRAME_DEBUG ON)
|
||||||
set(ITEM_RECTS_DEBUG ON)
|
set(ITEM_RECTS_DEBUG ON)
|
||||||
set(SH_LANGUAGE_SERVER_DEBUG ON)
|
set(SH_LANGUAGE_SERVER_DEBUG ON)
|
||||||
set(STRINGIMPL_DEBUG ON)
|
|
||||||
set(TEXTEDITOR_DEBUG ON)
|
set(TEXTEDITOR_DEBUG ON)
|
||||||
set(DEFERRED_INVOKE_DEBUG ON)
|
set(DEFERRED_INVOKE_DEBUG ON)
|
||||||
set(DYNAMIC_LOAD_DEBUG ON)
|
set(DYNAMIC_LOAD_DEBUG ON)
|
||||||
|
|
Loading…
Reference in a new issue