Coverage Report

Created: 2026-10-28 07:05

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/serenity/AK/IntrusiveList.h
Line
Count
Source
1
/*
2
 * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
3
 *
4
 * SPDX-License-Identifier: BSD-2-Clause
5
 */
6
7
#pragma once
8
9
#include <AK/Assertions.h>
10
#include <AK/BitCast.h>
11
#include <AK/Forward.h>
12
#include <AK/IntrusiveDetails.h>
13
#include <AK/Noncopyable.h>
14
#include <AK/StdLibExtras.h>
15
16
#ifdef KERNEL
17
#    include <Kernel/Library/LockRefPtr.h>
18
#endif
19
20
namespace AK::Detail {
21
22
template<typename T, typename Container = RawPtr<T>>
23
class IntrusiveListNode;
24
25
struct ExtractIntrusiveListTypes {
26
    template<typename V, typename Container, typename T>
27
    static V value(IntrusiveListNode<V, Container> T::* x);
28
    template<typename V, typename Container, typename T>
29
    static Container container(IntrusiveListNode<V, Container> T::* x);
30
};
31
32
template<typename T, typename Container = RawPtr<T>>
33
using SubstitutedIntrusiveListNode = IntrusiveListNode<T, typename Detail::SubstituteIntrusiveContainerType<T, Container>::Type>;
34
35
template<typename T, typename Container>
36
class IntrusiveListStorage {
37
private:
38
    friend class IntrusiveListNode<T, Container>;
39
40
    template<class T_, typename Container_, SubstitutedIntrusiveListNode<T_, Container_> T_::* member>
41
    friend class IntrusiveList;
42
43
    SubstitutedIntrusiveListNode<T, Container>* m_first { nullptr };
44
    SubstitutedIntrusiveListNode<T, Container>* m_last { nullptr };
45
};
46
47
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
48
class IntrusiveList {
49
    AK_MAKE_NONCOPYABLE(IntrusiveList);
50
    AK_MAKE_NONMOVABLE(IntrusiveList);
51
52
public:
53
4.59k
    IntrusiveList() = default;
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Gfx::Point<int>, 1000>::QueueSegment, AK::Queue<Gfx::Point<int>, 1000>::QueueSegment*, &AK::Queue<Gfx::Point<int>, 1000>::QueueSegment::node>::IntrusiveList()
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment, AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment*, &AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment::node>::IntrusiveList()
AK::Detail::IntrusiveList<JS::HeapBlock, JS::HeapBlock*, &JS::HeapBlock::m_list_node>::IntrusiveList()
Line
Count
Source
53
2.98k
    IntrusiveList() = default;
AK::Detail::IntrusiveList<JS::CellAllocator, JS::CellAllocator*, &JS::CellAllocator::m_list_node>::IntrusiveList()
Line
Count
Source
53
52
    IntrusiveList() = default;
AK::Detail::IntrusiveList<JS::HandleImpl, JS::HandleImpl*, &JS::HandleImpl::m_list_node>::IntrusiveList()
Line
Count
Source
53
52
    IntrusiveList() = default;
AK::Detail::IntrusiveList<JS::MarkedVectorBase, JS::MarkedVectorBase*, &JS::MarkedVectorBase::m_list_node>::IntrusiveList()
Line
Count
Source
53
52
    IntrusiveList() = default;
AK::Detail::IntrusiveList<JS::ConservativeVectorBase, JS::ConservativeVectorBase*, &JS::ConservativeVectorBase::m_list_node>::IntrusiveList()
Line
Count
Source
53
52
    IntrusiveList() = default;
AK::Detail::IntrusiveList<JS::WeakContainer, JS::WeakContainer*, &JS::WeakContainer::m_list_node>::IntrusiveList()
Line
Count
Source
53
52
    IntrusiveList() = default;
RegexOptimizer.cpp:AK::Detail::IntrusiveList<AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment, AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment*, &AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment::node>::IntrusiveList()
Line
Count
Source
53
553
    IntrusiveList() = default;
Unexecuted instantiation: AK::Detail::IntrusiveList<Shell::Shell::Promise, Shell::Shell::Promise*, &Shell::Shell::Promise::node>::IntrusiveList()
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<IPC::File, 1000>::QueueSegment, AK::Queue<IPC::File, 1000>::QueueSegment*, &AK::Queue<IPC::File, 1000>::QueueSegment::node>::IntrusiveList()
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment, AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment*, &AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment::node>::IntrusiveList()
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment, AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment*, &AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment::node>::IntrusiveList()
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment, AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment*, &AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment::node>::IntrusiveList()
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment, AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment*, &AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment::node>::IntrusiveList()
AK::Detail::IntrusiveList<AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment, AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment*, &AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment::node>::IntrusiveList()
Line
Count
Source
53
793
    IntrusiveList() = default;
54
    ~IntrusiveList();
55
56
    void clear();
57
    [[nodiscard]] bool is_empty() const;
58
    [[nodiscard]] size_t size_slow() const;
59
    void append(T& n);
60
    void prepend(T& n);
61
    void insert_before(T&, T&);
62
    void remove(T& n);
63
    [[nodiscard]] bool contains(T const&) const;
64
    [[nodiscard]] Container first() const;
65
    [[nodiscard]] Container last() const;
66
67
    [[nodiscard]] Container take_first();
68
    [[nodiscard]] Container take_last();
69
70
    class Iterator {
71
    public:
72
16.5k
        Iterator() = default;
AK::Detail::IntrusiveList<JS::HeapBlock, JS::HeapBlock*, &JS::HeapBlock::m_list_node>::Iterator::Iterator()
Line
Count
Source
72
16.3k
        Iterator() = default;
AK::Detail::IntrusiveList<JS::CellAllocator, JS::CellAllocator*, &JS::CellAllocator::m_list_node>::Iterator::Iterator()
Line
Count
Source
72
104
        Iterator() = default;
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::HandleImpl, JS::HandleImpl*, &JS::HandleImpl::m_list_node>::Iterator::Iterator()
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::MarkedVectorBase, JS::MarkedVectorBase*, &JS::MarkedVectorBase::m_list_node>::Iterator::Iterator()
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::ConservativeVectorBase, JS::ConservativeVectorBase*, &JS::ConservativeVectorBase::m_list_node>::Iterator::Iterator()
AK::Detail::IntrusiveList<JS::WeakContainer, JS::WeakContainer*, &JS::WeakContainer::m_list_node>::Iterator::Iterator()
Line
Count
Source
72
104
        Iterator() = default;
Unexecuted instantiation: AK::Detail::IntrusiveList<Shell::Shell::Promise, Shell::Shell::Promise*, &Shell::Shell::Promise::node>::Iterator::Iterator()
73
        Iterator(T* value)
74
6.09k
            : m_value(move(value))
75
6.09k
        {
76
6.09k
        }
AK::Detail::IntrusiveList<JS::HeapBlock, JS::HeapBlock*, &JS::HeapBlock::m_list_node>::Iterator::Iterator(JS::HeapBlock*)
Line
Count
Source
74
5.99k
            : m_value(move(value))
75
5.99k
        {
76
5.99k
        }
AK::Detail::IntrusiveList<JS::CellAllocator, JS::CellAllocator*, &JS::CellAllocator::m_list_node>::Iterator::Iterator(JS::CellAllocator*)
Line
Count
Source
74
104
            : m_value(move(value))
75
104
        {
76
104
        }
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::HandleImpl, JS::HandleImpl*, &JS::HandleImpl::m_list_node>::Iterator::Iterator(JS::HandleImpl*)
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::MarkedVectorBase, JS::MarkedVectorBase*, &JS::MarkedVectorBase::m_list_node>::Iterator::Iterator(JS::MarkedVectorBase*)
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::ConservativeVectorBase, JS::ConservativeVectorBase*, &JS::ConservativeVectorBase::m_list_node>::Iterator::Iterator(JS::ConservativeVectorBase*)
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::WeakContainer, JS::WeakContainer*, &JS::WeakContainer::m_list_node>::Iterator::Iterator(JS::WeakContainer*)
Unexecuted instantiation: AK::Detail::IntrusiveList<Shell::Shell::Promise, Shell::Shell::Promise*, &Shell::Shell::Promise::node>::Iterator::Iterator(Shell::Shell::Promise*)
77
78
        T const& operator*() const { return *m_value; }
79
        auto operator->() const { return m_value; }
80
13.9k
        T& operator*() { return *m_value; }
AK::Detail::IntrusiveList<JS::HeapBlock, JS::HeapBlock*, &JS::HeapBlock::m_list_node>::Iterator::operator*()
Line
Count
Source
80
8.38k
        T& operator*() { return *m_value; }
AK::Detail::IntrusiveList<JS::CellAllocator, JS::CellAllocator*, &JS::CellAllocator::m_list_node>::Iterator::operator*()
Line
Count
Source
80
5.57k
        T& operator*() { return *m_value; }
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::HandleImpl, JS::HandleImpl*, &JS::HandleImpl::m_list_node>::Iterator::operator*()
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::MarkedVectorBase, JS::MarkedVectorBase*, &JS::MarkedVectorBase::m_list_node>::Iterator::operator*()
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::ConservativeVectorBase, JS::ConservativeVectorBase*, &JS::ConservativeVectorBase::m_list_node>::Iterator::operator*()
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::WeakContainer, JS::WeakContainer*, &JS::WeakContainer::m_list_node>::Iterator::operator*()
Unexecuted instantiation: AK::Detail::IntrusiveList<Shell::Shell::Promise, Shell::Shell::Promise*, &Shell::Shell::Promise::node>::Iterator::operator*()
81
        auto operator->() { return m_value; }
82
25.2k
        bool operator==(Iterator const& other) const { return other.m_value == m_value; }
AK::Detail::IntrusiveList<JS::HeapBlock, JS::HeapBlock*, &JS::HeapBlock::m_list_node>::Iterator::operator==(AK::Detail::IntrusiveList<JS::HeapBlock, JS::HeapBlock*, &JS::HeapBlock::m_list_node>::Iterator const&) const
Line
Count
Source
82
19.5k
        bool operator==(Iterator const& other) const { return other.m_value == m_value; }
AK::Detail::IntrusiveList<JS::CellAllocator, JS::CellAllocator*, &JS::CellAllocator::m_list_node>::Iterator::operator==(AK::Detail::IntrusiveList<JS::CellAllocator, JS::CellAllocator*, &JS::CellAllocator::m_list_node>::Iterator const&) const
Line
Count
Source
82
5.67k
        bool operator==(Iterator const& other) const { return other.m_value == m_value; }
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::HandleImpl, JS::HandleImpl*, &JS::HandleImpl::m_list_node>::Iterator::operator==(AK::Detail::IntrusiveList<JS::HandleImpl, JS::HandleImpl*, &JS::HandleImpl::m_list_node>::Iterator const&) const
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::MarkedVectorBase, JS::MarkedVectorBase*, &JS::MarkedVectorBase::m_list_node>::Iterator::operator==(AK::Detail::IntrusiveList<JS::MarkedVectorBase, JS::MarkedVectorBase*, &JS::MarkedVectorBase::m_list_node>::Iterator const&) const
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::ConservativeVectorBase, JS::ConservativeVectorBase*, &JS::ConservativeVectorBase::m_list_node>::Iterator::operator==(AK::Detail::IntrusiveList<JS::ConservativeVectorBase, JS::ConservativeVectorBase*, &JS::ConservativeVectorBase::m_list_node>::Iterator const&) const
AK::Detail::IntrusiveList<JS::WeakContainer, JS::WeakContainer*, &JS::WeakContainer::m_list_node>::Iterator::operator==(AK::Detail::IntrusiveList<JS::WeakContainer, JS::WeakContainer*, &JS::WeakContainer::m_list_node>::Iterator const&) const
Line
Count
Source
82
52
        bool operator==(Iterator const& other) const { return other.m_value == m_value; }
Unexecuted instantiation: AK::Detail::IntrusiveList<Shell::Shell::Promise, Shell::Shell::Promise*, &Shell::Shell::Promise::node>::Iterator::operator==(AK::Detail::IntrusiveList<Shell::Shell::Promise, Shell::Shell::Promise*, &Shell::Shell::Promise::node>::Iterator const&) const
83
        Iterator& operator++()
84
13.9k
        {
85
13.9k
            m_value = IntrusiveList<T, Container, member>::next(m_value);
86
13.9k
            return *this;
87
13.9k
        }
AK::Detail::IntrusiveList<JS::HeapBlock, JS::HeapBlock*, &JS::HeapBlock::m_list_node>::Iterator::operator++()
Line
Count
Source
84
8.38k
        {
85
8.38k
            m_value = IntrusiveList<T, Container, member>::next(m_value);
86
8.38k
            return *this;
87
8.38k
        }
AK::Detail::IntrusiveList<JS::CellAllocator, JS::CellAllocator*, &JS::CellAllocator::m_list_node>::Iterator::operator++()
Line
Count
Source
84
5.57k
        {
85
5.57k
            m_value = IntrusiveList<T, Container, member>::next(m_value);
86
5.57k
            return *this;
87
5.57k
        }
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::HandleImpl, JS::HandleImpl*, &JS::HandleImpl::m_list_node>::Iterator::operator++()
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::MarkedVectorBase, JS::MarkedVectorBase*, &JS::MarkedVectorBase::m_list_node>::Iterator::operator++()
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::ConservativeVectorBase, JS::ConservativeVectorBase*, &JS::ConservativeVectorBase::m_list_node>::Iterator::operator++()
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::WeakContainer, JS::WeakContainer*, &JS::WeakContainer::m_list_node>::Iterator::operator++()
Unexecuted instantiation: AK::Detail::IntrusiveList<Shell::Shell::Promise, Shell::Shell::Promise*, &Shell::Shell::Promise::node>::Iterator::operator++()
88
        Iterator& erase();
89
90
    private:
91
        T* m_value { nullptr };
92
    };
93
94
    Iterator begin();
95
11.3k
    Iterator end() { return Iterator {}; }
AK::Detail::IntrusiveList<JS::HeapBlock, JS::HeapBlock*, &JS::HeapBlock::m_list_node>::end()
Line
Count
Source
95
11.1k
    Iterator end() { return Iterator {}; }
AK::Detail::IntrusiveList<JS::CellAllocator, JS::CellAllocator*, &JS::CellAllocator::m_list_node>::end()
Line
Count
Source
95
104
    Iterator end() { return Iterator {}; }
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::HandleImpl, JS::HandleImpl*, &JS::HandleImpl::m_list_node>::end()
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::MarkedVectorBase, JS::MarkedVectorBase*, &JS::MarkedVectorBase::m_list_node>::end()
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::ConservativeVectorBase, JS::ConservativeVectorBase*, &JS::ConservativeVectorBase::m_list_node>::end()
AK::Detail::IntrusiveList<JS::WeakContainer, JS::WeakContainer*, &JS::WeakContainer::m_list_node>::end()
Line
Count
Source
95
52
    Iterator end() { return Iterator {}; }
Unexecuted instantiation: AK::Detail::IntrusiveList<Shell::Shell::Promise, Shell::Shell::Promise*, &Shell::Shell::Promise::node>::end()
96
97
    class ReverseIterator {
98
    public:
99
        ReverseIterator() = default;
100
        ReverseIterator(T* value)
101
            : m_value(move(value))
102
        {
103
        }
104
105
        T const& operator*() const { return *m_value; }
106
        auto operator->() const { return m_value; }
107
        T& operator*() { return *m_value; }
108
        auto operator->() { return m_value; }
109
        bool operator==(ReverseIterator const& other) const { return other.m_value == m_value; }
110
        ReverseIterator& operator++()
111
        {
112
            m_value = IntrusiveList<T, Container, member>::prev(m_value);
113
            return *this;
114
        }
115
116
    private:
117
        T* m_value { nullptr };
118
    };
119
120
    ReverseIterator rbegin();
121
    ReverseIterator rend() { return ReverseIterator {}; }
122
123
    class ConstIterator {
124
    public:
125
        ConstIterator() = default;
126
        ConstIterator(T const* value)
127
            : m_value(value)
128
        {
129
        }
130
131
        T const& operator*() const { return *m_value; }
132
        auto operator->() const { return m_value; }
133
        bool operator==(ConstIterator const& other) const { return other.m_value == m_value; }
134
        ConstIterator& operator++()
135
        {
136
            m_value = IntrusiveList<T, Container, member>::next(m_value);
137
            return *this;
138
        }
139
140
    private:
141
        T const* m_value { nullptr };
142
    };
143
144
    ConstIterator begin() const;
145
    ConstIterator end() const { return ConstIterator {}; }
146
147
private:
148
    static T* next(T* current);
149
    static T* prev(T* current);
150
    static T const* next(T const* current);
151
    static T const* prev(T const* current);
152
    static T* node_to_value(SubstitutedIntrusiveListNode<T, Container>& node);
153
    IntrusiveListStorage<T, Container> m_storage;
154
};
155
156
template<typename T, typename Container>
157
class IntrusiveListNode {
158
public:
159
    ~IntrusiveListNode();
160
    void remove();
161
    bool is_in_list() const;
162
163
    static constexpr bool IsRaw = IsPointer<Container>;
164
165
    // Note: For some reason, clang does not consider `member` as declared here, and as declared above (`SubstitutedIntrusiveListNode<T, Container> T::*`)
166
    //       to be of equal types. so for now, just make the members public on clang.
167
#if !defined(AK_COMPILER_CLANG)
168
private:
169
    template<class T_, typename Container_, SubstitutedIntrusiveListNode<T_, Container_> T_::* member>
170
    friend class ::AK::Detail::IntrusiveList;
171
#endif
172
173
    IntrusiveListStorage<T, Container>* m_storage = nullptr;
174
    SubstitutedIntrusiveListNode<T, Container>* m_next = nullptr;
175
    SubstitutedIntrusiveListNode<T, Container>* m_prev = nullptr;
176
    [[no_unique_address]] SelfReferenceIfNeeded<Container, IsRaw> m_self;
177
};
178
179
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
180
inline typename IntrusiveList<T, Container, member>::Iterator& IntrusiveList<T, Container, member>::Iterator::erase()
181
{
182
    auto old = m_value;
183
    m_value = IntrusiveList<T, Container, member>::next(m_value);
184
    (old->*member).remove();
185
    return *this;
186
}
187
188
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
189
inline IntrusiveList<T, Container, member>::~IntrusiveList()
190
2.33k
{
191
2.33k
    clear();
192
2.33k
}
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Gfx::Point<int>, 1000>::QueueSegment, AK::Queue<Gfx::Point<int>, 1000>::QueueSegment*, &AK::Queue<Gfx::Point<int>, 1000>::QueueSegment::node>::~IntrusiveList()
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment, AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment*, &AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment::node>::~IntrusiveList()
AK::Detail::IntrusiveList<JS::CellAllocator, JS::CellAllocator*, &JS::CellAllocator::m_list_node>::~IntrusiveList()
Line
Count
Source
190
52
{
191
52
    clear();
192
52
}
AK::Detail::IntrusiveList<JS::HandleImpl, JS::HandleImpl*, &JS::HandleImpl::m_list_node>::~IntrusiveList()
Line
Count
Source
190
52
{
191
52
    clear();
192
52
}
AK::Detail::IntrusiveList<JS::MarkedVectorBase, JS::MarkedVectorBase*, &JS::MarkedVectorBase::m_list_node>::~IntrusiveList()
Line
Count
Source
190
52
{
191
52
    clear();
192
52
}
AK::Detail::IntrusiveList<JS::ConservativeVectorBase, JS::ConservativeVectorBase*, &JS::ConservativeVectorBase::m_list_node>::~IntrusiveList()
Line
Count
Source
190
52
{
191
52
    clear();
192
52
}
AK::Detail::IntrusiveList<JS::WeakContainer, JS::WeakContainer*, &JS::WeakContainer::m_list_node>::~IntrusiveList()
Line
Count
Source
190
52
{
191
52
    clear();
192
52
}
AK::Detail::IntrusiveList<JS::HeapBlock, JS::HeapBlock*, &JS::HeapBlock::m_list_node>::~IntrusiveList()
Line
Count
Source
190
728
{
191
728
    clear();
192
728
}
RegexOptimizer.cpp:AK::Detail::IntrusiveList<AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment, AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment*, &AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment::node>::~IntrusiveList()
Line
Count
Source
190
553
{
191
553
    clear();
192
553
}
Unexecuted instantiation: AK::Detail::IntrusiveList<Shell::Shell::Promise, Shell::Shell::Promise*, &Shell::Shell::Promise::node>::~IntrusiveList()
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<IPC::File, 1000>::QueueSegment, AK::Queue<IPC::File, 1000>::QueueSegment*, &AK::Queue<IPC::File, 1000>::QueueSegment::node>::~IntrusiveList()
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment, AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment*, &AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment::node>::~IntrusiveList()
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment, AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment*, &AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment::node>::~IntrusiveList()
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment, AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment*, &AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment::node>::~IntrusiveList()
AK::Detail::IntrusiveList<AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment, AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment*, &AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment::node>::~IntrusiveList()
Line
Count
Source
190
793
{
191
793
    clear();
192
793
}
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment, AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment*, &AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment::node>::~IntrusiveList()
193
194
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
195
inline void IntrusiveList<T, Container, member>::clear()
196
2.33k
{
197
5.12k
    while (m_storage.m_first)
198
2.78k
        m_storage.m_first->remove();
199
2.33k
}
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Gfx::Point<int>, 1000>::QueueSegment, AK::Queue<Gfx::Point<int>, 1000>::QueueSegment*, &AK::Queue<Gfx::Point<int>, 1000>::QueueSegment::node>::clear()
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment, AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment*, &AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment::node>::clear()
AK::Detail::IntrusiveList<JS::HeapBlock, JS::HeapBlock*, &JS::HeapBlock::m_list_node>::clear()
Line
Count
Source
196
728
{
197
728
    while (m_storage.m_first)
198
0
        m_storage.m_first->remove();
199
728
}
AK::Detail::IntrusiveList<JS::CellAllocator, JS::CellAllocator*, &JS::CellAllocator::m_list_node>::clear()
Line
Count
Source
196
52
{
197
2.83k
    while (m_storage.m_first)
198
2.78k
        m_storage.m_first->remove();
199
52
}
AK::Detail::IntrusiveList<JS::HandleImpl, JS::HandleImpl*, &JS::HandleImpl::m_list_node>::clear()
Line
Count
Source
196
52
{
197
52
    while (m_storage.m_first)
198
0
        m_storage.m_first->remove();
199
52
}
AK::Detail::IntrusiveList<JS::MarkedVectorBase, JS::MarkedVectorBase*, &JS::MarkedVectorBase::m_list_node>::clear()
Line
Count
Source
196
52
{
197
52
    while (m_storage.m_first)
198
0
        m_storage.m_first->remove();
199
52
}
AK::Detail::IntrusiveList<JS::ConservativeVectorBase, JS::ConservativeVectorBase*, &JS::ConservativeVectorBase::m_list_node>::clear()
Line
Count
Source
196
52
{
197
52
    while (m_storage.m_first)
198
0
        m_storage.m_first->remove();
199
52
}
AK::Detail::IntrusiveList<JS::WeakContainer, JS::WeakContainer*, &JS::WeakContainer::m_list_node>::clear()
Line
Count
Source
196
52
{
197
52
    while (m_storage.m_first)
198
0
        m_storage.m_first->remove();
199
52
}
RegexOptimizer.cpp:AK::Detail::IntrusiveList<AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment, AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment*, &AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment::node>::clear()
Line
Count
Source
196
553
{
197
553
    while (m_storage.m_first)
198
0
        m_storage.m_first->remove();
199
553
}
Unexecuted instantiation: AK::Detail::IntrusiveList<Shell::Shell::Promise, Shell::Shell::Promise*, &Shell::Shell::Promise::node>::clear()
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<IPC::File, 1000>::QueueSegment, AK::Queue<IPC::File, 1000>::QueueSegment*, &AK::Queue<IPC::File, 1000>::QueueSegment::node>::clear()
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment, AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment*, &AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment::node>::clear()
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment, AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment*, &AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment::node>::clear()
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment, AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment*, &AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment::node>::clear()
AK::Detail::IntrusiveList<AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment, AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment*, &AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment::node>::clear()
Line
Count
Source
196
793
{
197
793
    while (m_storage.m_first)
198
0
        m_storage.m_first->remove();
199
793
}
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment, AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment*, &AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment::node>::clear()
200
201
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
202
inline bool IntrusiveList<T, Container, member>::is_empty() const
203
481k
{
204
481k
    return m_storage.m_first == nullptr;
205
481k
}
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Gfx::Point<int>, 1000>::QueueSegment, AK::Queue<Gfx::Point<int>, 1000>::QueueSegment*, &AK::Queue<Gfx::Point<int>, 1000>::QueueSegment::node>::is_empty() const
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<IPC::File, 1000>::QueueSegment, AK::Queue<IPC::File, 1000>::QueueSegment*, &AK::Queue<IPC::File, 1000>::QueueSegment::node>::is_empty() const
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment, AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment*, &AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment::node>::is_empty() const
AK::Detail::IntrusiveList<JS::HeapBlock, JS::HeapBlock*, &JS::HeapBlock::m_list_node>::is_empty() const
Line
Count
Source
203
67.5k
{
204
67.5k
    return m_storage.m_first == nullptr;
205
67.5k
}
RegexOptimizer.cpp:AK::Detail::IntrusiveList<AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment, AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment*, &AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment::node>::is_empty() const
Line
Count
Source
203
412k
{
204
412k
    return m_storage.m_first == nullptr;
205
412k
}
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment, AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment*, &AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment::node>::is_empty() const
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment, AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment*, &AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment::node>::is_empty() const
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment, AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment*, &AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment::node>::is_empty() const
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment, AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment*, &AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment::node>::is_empty() const
AK::Detail::IntrusiveList<AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment, AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment*, &AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment::node>::is_empty() const
Line
Count
Source
203
1.02k
{
204
1.02k
    return m_storage.m_first == nullptr;
205
1.02k
}
206
207
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
208
inline size_t IntrusiveList<T, Container, member>::size_slow() const
209
{
210
    size_t size = 0;
211
    auto it_end = end();
212
    for (auto it = begin(); it != it_end; ++it) {
213
        ++size;
214
    }
215
    return size;
216
}
217
218
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
219
inline void IntrusiveList<T, Container, member>::append(T& n)
220
11.5k
{
221
11.5k
    remove(n);
222
223
11.5k
    auto& nnode = n.*member;
224
11.5k
    nnode.m_storage = &m_storage;
225
11.5k
    nnode.m_prev = m_storage.m_last;
226
11.5k
    nnode.m_next = nullptr;
227
    if constexpr (!RemoveReference<decltype(nnode)>::IsRaw)
228
        nnode.m_self.reference = &n; // Note: Self-reference ensures that the object will keep a ref to itself when the Container is a smart pointer.
229
230
11.5k
    if (m_storage.m_last)
231
4.70k
        m_storage.m_last->m_next = &nnode;
232
11.5k
    m_storage.m_last = &nnode;
233
11.5k
    if (!m_storage.m_first)
234
6.82k
        m_storage.m_first = &nnode;
235
11.5k
}
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Gfx::Point<int>, 1000>::QueueSegment, AK::Queue<Gfx::Point<int>, 1000>::QueueSegment*, &AK::Queue<Gfx::Point<int>, 1000>::QueueSegment::node>::append(AK::Queue<Gfx::Point<int>, 1000>::QueueSegment&)
AK::Detail::IntrusiveList<JS::HandleImpl, JS::HandleImpl*, &JS::HandleImpl::m_list_node>::append(JS::HandleImpl&)
Line
Count
Source
220
1.19k
{
221
1.19k
    remove(n);
222
223
1.19k
    auto& nnode = n.*member;
224
1.19k
    nnode.m_storage = &m_storage;
225
1.19k
    nnode.m_prev = m_storage.m_last;
226
1.19k
    nnode.m_next = nullptr;
227
    if constexpr (!RemoveReference<decltype(nnode)>::IsRaw)
228
        nnode.m_self.reference = &n; // Note: Self-reference ensures that the object will keep a ref to itself when the Container is a smart pointer.
229
230
1.19k
    if (m_storage.m_last)
231
0
        m_storage.m_last->m_next = &nnode;
232
1.19k
    m_storage.m_last = &nnode;
233
1.19k
    if (!m_storage.m_first)
234
1.19k
        m_storage.m_first = &nnode;
235
1.19k
}
AK::Detail::IntrusiveList<JS::MarkedVectorBase, JS::MarkedVectorBase*, &JS::MarkedVectorBase::m_list_node>::append(JS::MarkedVectorBase&)
Line
Count
Source
220
22
{
221
22
    remove(n);
222
223
22
    auto& nnode = n.*member;
224
22
    nnode.m_storage = &m_storage;
225
22
    nnode.m_prev = m_storage.m_last;
226
22
    nnode.m_next = nullptr;
227
    if constexpr (!RemoveReference<decltype(nnode)>::IsRaw)
228
        nnode.m_self.reference = &n; // Note: Self-reference ensures that the object will keep a ref to itself when the Container is a smart pointer.
229
230
22
    if (m_storage.m_last)
231
0
        m_storage.m_last->m_next = &nnode;
232
22
    m_storage.m_last = &nnode;
233
22
    if (!m_storage.m_first)
234
22
        m_storage.m_first = &nnode;
235
22
}
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::ConservativeVectorBase, JS::ConservativeVectorBase*, &JS::ConservativeVectorBase::m_list_node>::append(JS::ConservativeVectorBase&)
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::WeakContainer, JS::WeakContainer*, &JS::WeakContainer::m_list_node>::append(JS::WeakContainer&)
AK::Detail::IntrusiveList<JS::CellAllocator, JS::CellAllocator*, &JS::CellAllocator::m_list_node>::append(JS::CellAllocator&)
Line
Count
Source
220
2.78k
{
221
2.78k
    remove(n);
222
223
2.78k
    auto& nnode = n.*member;
224
2.78k
    nnode.m_storage = &m_storage;
225
2.78k
    nnode.m_prev = m_storage.m_last;
226
2.78k
    nnode.m_next = nullptr;
227
    if constexpr (!RemoveReference<decltype(nnode)>::IsRaw)
228
        nnode.m_self.reference = &n; // Note: Self-reference ensures that the object will keep a ref to itself when the Container is a smart pointer.
229
230
2.78k
    if (m_storage.m_last)
231
2.73k
        m_storage.m_last->m_next = &nnode;
232
2.78k
    m_storage.m_last = &nnode;
233
2.78k
    if (!m_storage.m_first)
234
52
        m_storage.m_first = &nnode;
235
2.78k
}
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment, AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment*, &AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment::node>::append(AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment&)
AK::Detail::IntrusiveList<JS::HeapBlock, JS::HeapBlock*, &JS::HeapBlock::m_list_node>::append(JS::HeapBlock&)
Line
Count
Source
220
5.65k
{
221
5.65k
    remove(n);
222
223
5.65k
    auto& nnode = n.*member;
224
5.65k
    nnode.m_storage = &m_storage;
225
5.65k
    nnode.m_prev = m_storage.m_last;
226
5.65k
    nnode.m_next = nullptr;
227
    if constexpr (!RemoveReference<decltype(nnode)>::IsRaw)
228
        nnode.m_self.reference = &n; // Note: Self-reference ensures that the object will keep a ref to itself when the Container is a smart pointer.
229
230
5.65k
    if (m_storage.m_last)
231
1.19k
        m_storage.m_last->m_next = &nnode;
232
5.65k
    m_storage.m_last = &nnode;
233
5.65k
    if (!m_storage.m_first)
234
4.46k
        m_storage.m_first = &nnode;
235
5.65k
}
RegexOptimizer.cpp:AK::Detail::IntrusiveList<AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment, AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment*, &AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment::node>::append(AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment&)
Line
Count
Source
220
839
{
221
839
    remove(n);
222
223
839
    auto& nnode = n.*member;
224
839
    nnode.m_storage = &m_storage;
225
839
    nnode.m_prev = m_storage.m_last;
226
839
    nnode.m_next = nullptr;
227
    if constexpr (!RemoveReference<decltype(nnode)>::IsRaw)
228
        nnode.m_self.reference = &n; // Note: Self-reference ensures that the object will keep a ref to itself when the Container is a smart pointer.
229
230
839
    if (m_storage.m_last)
231
286
        m_storage.m_last->m_next = &nnode;
232
839
    m_storage.m_last = &nnode;
233
839
    if (!m_storage.m_first)
234
553
        m_storage.m_first = &nnode;
235
839
}
Unexecuted instantiation: AK::Detail::IntrusiveList<Shell::Shell::Promise, Shell::Shell::Promise*, &Shell::Shell::Promise::node>::append(Shell::Shell::Promise&)
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<IPC::File, 1000>::QueueSegment, AK::Queue<IPC::File, 1000>::QueueSegment*, &AK::Queue<IPC::File, 1000>::QueueSegment::node>::append(AK::Queue<IPC::File, 1000>::QueueSegment&)
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment, AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment*, &AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment::node>::append(AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment&)
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment, AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment*, &AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment::node>::append(AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment&)
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment, AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment*, &AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment::node>::append(AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment&)
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment, AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment*, &AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment::node>::append(AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment&)
AK::Detail::IntrusiveList<AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment, AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment*, &AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment::node>::append(AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment&)
Line
Count
Source
220
1.02k
{
221
1.02k
    remove(n);
222
223
1.02k
    auto& nnode = n.*member;
224
1.02k
    nnode.m_storage = &m_storage;
225
1.02k
    nnode.m_prev = m_storage.m_last;
226
1.02k
    nnode.m_next = nullptr;
227
    if constexpr (!RemoveReference<decltype(nnode)>::IsRaw)
228
        nnode.m_self.reference = &n; // Note: Self-reference ensures that the object will keep a ref to itself when the Container is a smart pointer.
229
230
1.02k
    if (m_storage.m_last)
231
483
        m_storage.m_last->m_next = &nnode;
232
1.02k
    m_storage.m_last = &nnode;
233
1.02k
    if (!m_storage.m_first)
234
537
        m_storage.m_first = &nnode;
235
1.02k
}
236
237
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
238
inline void IntrusiveList<T, Container, member>::prepend(T& n)
239
{
240
    remove(n);
241
242
    auto& nnode = n.*member;
243
    nnode.m_storage = &m_storage;
244
    nnode.m_prev = nullptr;
245
    nnode.m_next = m_storage.m_first;
246
    if constexpr (!RemoveReference<decltype(nnode)>::IsRaw)
247
        nnode.m_self.reference = &n;
248
249
    if (m_storage.m_first)
250
        m_storage.m_first->m_prev = &nnode;
251
    m_storage.m_first = &nnode;
252
    if (!m_storage.m_last)
253
        m_storage.m_last = &nnode;
254
}
255
256
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
257
inline void IntrusiveList<T, Container, member>::insert_before(T& bn, T& n)
258
{
259
    remove(n);
260
261
    auto& new_node = n.*member;
262
    auto& before_node = bn.*member;
263
    new_node.m_storage = &m_storage;
264
    new_node.m_next = &before_node;
265
    new_node.m_prev = before_node.m_prev;
266
    if (before_node.m_prev)
267
        before_node.m_prev->m_next = &new_node;
268
    before_node.m_prev = &new_node;
269
270
    if (m_storage.m_first == &before_node) {
271
        m_storage.m_first = &new_node;
272
    }
273
274
    if constexpr (!RemoveReference<decltype(new_node)>::IsRaw)
275
        new_node.m_self.reference = &n;
276
}
277
278
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
279
inline void IntrusiveList<T, Container, member>::remove(T& n)
280
14.6k
{
281
14.6k
    auto& nnode = n.*member;
282
14.6k
    if (nnode.m_storage)
283
4.54k
        nnode.remove();
284
14.6k
}
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Gfx::Point<int>, 1000>::QueueSegment, AK::Queue<Gfx::Point<int>, 1000>::QueueSegment*, &AK::Queue<Gfx::Point<int>, 1000>::QueueSegment::node>::remove(AK::Queue<Gfx::Point<int>, 1000>::QueueSegment&)
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<IPC::File, 1000>::QueueSegment, AK::Queue<IPC::File, 1000>::QueueSegment*, &AK::Queue<IPC::File, 1000>::QueueSegment::node>::remove(AK::Queue<IPC::File, 1000>::QueueSegment&)
AK::Detail::IntrusiveList<JS::HandleImpl, JS::HandleImpl*, &JS::HandleImpl::m_list_node>::remove(JS::HandleImpl&)
Line
Count
Source
280
2.39k
{
281
2.39k
    auto& nnode = n.*member;
282
2.39k
    if (nnode.m_storage)
283
1.19k
        nnode.remove();
284
2.39k
}
AK::Detail::IntrusiveList<JS::MarkedVectorBase, JS::MarkedVectorBase*, &JS::MarkedVectorBase::m_list_node>::remove(JS::MarkedVectorBase&)
Line
Count
Source
280
44
{
281
44
    auto& nnode = n.*member;
282
44
    if (nnode.m_storage)
283
22
        nnode.remove();
284
44
}
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::ConservativeVectorBase, JS::ConservativeVectorBase*, &JS::ConservativeVectorBase::m_list_node>::remove(JS::ConservativeVectorBase&)
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::WeakContainer, JS::WeakContainer*, &JS::WeakContainer::m_list_node>::remove(JS::WeakContainer&)
AK::Detail::IntrusiveList<JS::CellAllocator, JS::CellAllocator*, &JS::CellAllocator::m_list_node>::remove(JS::CellAllocator&)
Line
Count
Source
280
2.78k
{
281
2.78k
    auto& nnode = n.*member;
282
2.78k
    if (nnode.m_storage)
283
0
        nnode.remove();
284
2.78k
}
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment, AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment*, &AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment::node>::remove(AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment&)
AK::Detail::IntrusiveList<JS::HeapBlock, JS::HeapBlock*, &JS::HeapBlock::m_list_node>::remove(JS::HeapBlock&)
Line
Count
Source
280
5.65k
{
281
5.65k
    auto& nnode = n.*member;
282
5.65k
    if (nnode.m_storage)
283
1.46k
        nnode.remove();
284
5.65k
}
RegexOptimizer.cpp:AK::Detail::IntrusiveList<AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment, AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment*, &AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment::node>::remove(AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment&)
Line
Count
Source
280
1.67k
{
281
1.67k
    auto& nnode = n.*member;
282
1.67k
    if (nnode.m_storage)
283
839
        nnode.remove();
284
1.67k
}
Unexecuted instantiation: AK::Detail::IntrusiveList<Shell::Shell::Promise, Shell::Shell::Promise*, &Shell::Shell::Promise::node>::remove(Shell::Shell::Promise&)
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment, AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment*, &AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment::node>::remove(AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment&)
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment, AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment*, &AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment::node>::remove(AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment&)
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment, AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment*, &AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment::node>::remove(AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment&)
AK::Detail::IntrusiveList<AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment, AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment*, &AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment::node>::remove(AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment&)
Line
Count
Source
280
2.04k
{
281
2.04k
    auto& nnode = n.*member;
282
2.04k
    if (nnode.m_storage)
283
1.02k
        nnode.remove();
284
2.04k
}
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment, AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment*, &AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment::node>::remove(AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment&)
285
286
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
287
inline bool IntrusiveList<T, Container, member>::contains(T const& n) const
288
2.43k
{
289
2.43k
    auto& nnode = n.*member;
290
2.43k
    return nnode.m_storage == &m_storage;
291
2.43k
}
AK::Detail::IntrusiveList<JS::HandleImpl, JS::HandleImpl*, &JS::HandleImpl::m_list_node>::contains(JS::HandleImpl const&) const
Line
Count
Source
288
2.39k
{
289
2.39k
    auto& nnode = n.*member;
290
2.39k
    return nnode.m_storage == &m_storage;
291
2.39k
}
AK::Detail::IntrusiveList<JS::MarkedVectorBase, JS::MarkedVectorBase*, &JS::MarkedVectorBase::m_list_node>::contains(JS::MarkedVectorBase const&) const
Line
Count
Source
288
44
{
289
44
    auto& nnode = n.*member;
290
44
    return nnode.m_storage == &m_storage;
291
44
}
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::ConservativeVectorBase, JS::ConservativeVectorBase*, &JS::ConservativeVectorBase::m_list_node>::contains(JS::ConservativeVectorBase const&) const
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::WeakContainer, JS::WeakContainer*, &JS::WeakContainer::m_list_node>::contains(JS::WeakContainer const&) const
292
293
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
294
inline Container IntrusiveList<T, Container, member>::first() const
295
368k
{
296
368k
    return m_storage.m_first ? node_to_value(*m_storage.m_first) : nullptr;
297
368k
}
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Gfx::Point<int>, 1000>::QueueSegment, AK::Queue<Gfx::Point<int>, 1000>::QueueSegment*, &AK::Queue<Gfx::Point<int>, 1000>::QueueSegment::node>::first() const
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<IPC::File, 1000>::QueueSegment, AK::Queue<IPC::File, 1000>::QueueSegment*, &AK::Queue<IPC::File, 1000>::QueueSegment::node>::first() const
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment, AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment*, &AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment::node>::first() const
RegexOptimizer.cpp:AK::Detail::IntrusiveList<AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment, AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment*, &AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment::node>::first() const
Line
Count
Source
295
366k
{
296
366k
    return m_storage.m_first ? node_to_value(*m_storage.m_first) : nullptr;
297
366k
}
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment, AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment*, &AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment::node>::first() const
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment, AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment*, &AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment::node>::first() const
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment, AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment*, &AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment::node>::first() const
AK::Detail::IntrusiveList<AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment, AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment*, &AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment::node>::first() const
Line
Count
Source
295
1.81k
{
296
1.81k
    return m_storage.m_first ? node_to_value(*m_storage.m_first) : nullptr;
297
1.81k
}
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment, AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment*, &AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment::node>::first() const
298
299
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
300
inline Container IntrusiveList<T, Container, member>::take_first()
301
3.20k
{
302
3.20k
    if (Container ptr = first()) {
303
1.85k
        remove(*ptr);
304
1.85k
        return ptr;
305
1.85k
    }
306
1.34k
    return nullptr;
307
3.20k
}
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Gfx::Point<int>, 1000>::QueueSegment, AK::Queue<Gfx::Point<int>, 1000>::QueueSegment*, &AK::Queue<Gfx::Point<int>, 1000>::QueueSegment::node>::take_first()
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<IPC::File, 1000>::QueueSegment, AK::Queue<IPC::File, 1000>::QueueSegment*, &AK::Queue<IPC::File, 1000>::QueueSegment::node>::take_first()
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment, AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment*, &AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment::node>::take_first()
RegexOptimizer.cpp:AK::Detail::IntrusiveList<AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment, AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment*, &AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment::node>::take_first()
Line
Count
Source
301
1.39k
{
302
1.39k
    if (Container ptr = first()) {
303
839
        remove(*ptr);
304
839
        return ptr;
305
839
    }
306
553
    return nullptr;
307
1.39k
}
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment, AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment*, &AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment::node>::take_first()
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment, AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment*, &AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment::node>::take_first()
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment, AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment*, &AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment::node>::take_first()
AK::Detail::IntrusiveList<AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment, AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment*, &AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment::node>::take_first()
Line
Count
Source
301
1.81k
{
302
1.81k
    if (Container ptr = first()) {
303
1.02k
        remove(*ptr);
304
1.02k
        return ptr;
305
1.02k
    }
306
793
    return nullptr;
307
1.81k
}
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment, AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment*, &AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment::node>::take_first()
308
309
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
310
inline Container IntrusiveList<T, Container, member>::take_last()
311
{
312
    if (Container ptr = last()) {
313
        remove(*ptr);
314
        return ptr;
315
    }
316
    return nullptr;
317
}
318
319
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
320
inline Container IntrusiveList<T, Container, member>::last() const
321
847k
{
322
847k
    return m_storage.m_last ? node_to_value(*m_storage.m_last) : nullptr;
323
847k
}
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Gfx::Point<int>, 1000>::QueueSegment, AK::Queue<Gfx::Point<int>, 1000>::QueueSegment*, &AK::Queue<Gfx::Point<int>, 1000>::QueueSegment::node>::last() const
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<IPC::File, 1000>::QueueSegment, AK::Queue<IPC::File, 1000>::QueueSegment*, &AK::Queue<IPC::File, 1000>::QueueSegment::node>::last() const
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment, AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment*, &AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment::node>::last() const
AK::Detail::IntrusiveList<JS::HeapBlock, JS::HeapBlock*, &JS::HeapBlock::m_list_node>::last() const
Line
Count
Source
321
69.0k
{
322
69.0k
    return m_storage.m_last ? node_to_value(*m_storage.m_last) : nullptr;
323
69.0k
}
RegexOptimizer.cpp:AK::Detail::IntrusiveList<AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment, AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment*, &AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment::node>::last() const
Line
Count
Source
321
777k
{
322
777k
    return m_storage.m_last ? node_to_value(*m_storage.m_last) : nullptr;
323
777k
}
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment, AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment*, &AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment::node>::last() const
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment, AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment*, &AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment::node>::last() const
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment, AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment*, &AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment::node>::last() const
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment, AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment*, &AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment::node>::last() const
AK::Detail::IntrusiveList<AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment, AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment*, &AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment::node>::last() const
Line
Count
Source
321
1.50k
{
322
1.50k
    return m_storage.m_last ? node_to_value(*m_storage.m_last) : nullptr;
323
1.50k
}
324
325
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
326
inline T const* IntrusiveList<T, Container, member>::next(T const* current)
327
{
328
    auto& nextnode = (current->*member).m_next;
329
    T const* nextstruct = nextnode ? node_to_value(*nextnode) : nullptr;
330
    return nextstruct;
331
}
332
333
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
334
inline T const* IntrusiveList<T, Container, member>::prev(T const* current)
335
{
336
    auto& prevnode = (current->*member).m_prev;
337
    T const* prevstruct = prevnode ? node_to_value(*prevnode) : nullptr;
338
    return prevstruct;
339
}
340
341
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
342
inline T* IntrusiveList<T, Container, member>::next(T* current)
343
13.9k
{
344
13.9k
    auto& nextnode = (current->*member).m_next;
345
13.9k
    T* nextstruct = nextnode ? node_to_value(*nextnode) : nullptr;
346
13.9k
    return nextstruct;
347
13.9k
}
AK::Detail::IntrusiveList<JS::HeapBlock, JS::HeapBlock*, &JS::HeapBlock::m_list_node>::next(JS::HeapBlock*)
Line
Count
Source
343
8.38k
{
344
8.38k
    auto& nextnode = (current->*member).m_next;
345
8.38k
    T* nextstruct = nextnode ? node_to_value(*nextnode) : nullptr;
346
8.38k
    return nextstruct;
347
8.38k
}
AK::Detail::IntrusiveList<JS::CellAllocator, JS::CellAllocator*, &JS::CellAllocator::m_list_node>::next(JS::CellAllocator*)
Line
Count
Source
343
5.57k
{
344
5.57k
    auto& nextnode = (current->*member).m_next;
345
5.57k
    T* nextstruct = nextnode ? node_to_value(*nextnode) : nullptr;
346
5.57k
    return nextstruct;
347
5.57k
}
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::HandleImpl, JS::HandleImpl*, &JS::HandleImpl::m_list_node>::next(JS::HandleImpl*)
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::MarkedVectorBase, JS::MarkedVectorBase*, &JS::MarkedVectorBase::m_list_node>::next(JS::MarkedVectorBase*)
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::ConservativeVectorBase, JS::ConservativeVectorBase*, &JS::ConservativeVectorBase::m_list_node>::next(JS::ConservativeVectorBase*)
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::WeakContainer, JS::WeakContainer*, &JS::WeakContainer::m_list_node>::next(JS::WeakContainer*)
Unexecuted instantiation: AK::Detail::IntrusiveList<Shell::Shell::Promise, Shell::Shell::Promise*, &Shell::Shell::Promise::node>::next(Shell::Shell::Promise*)
348
349
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
350
inline T* IntrusiveList<T, Container, member>::prev(T* current)
351
{
352
    auto& prevnode = (current->*member).m_prev;
353
    T* prevstruct = prevnode ? node_to_value(*prevnode) : nullptr;
354
    return prevstruct;
355
}
356
357
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
358
inline typename IntrusiveList<T, Container, member>::Iterator IntrusiveList<T, Container, member>::begin()
359
11.3k
{
360
11.3k
    return m_storage.m_first ? Iterator(node_to_value(*m_storage.m_first)) : Iterator();
361
11.3k
}
AK::Detail::IntrusiveList<JS::HeapBlock, JS::HeapBlock*, &JS::HeapBlock::m_list_node>::begin()
Line
Count
Source
359
11.1k
{
360
11.1k
    return m_storage.m_first ? Iterator(node_to_value(*m_storage.m_first)) : Iterator();
361
11.1k
}
AK::Detail::IntrusiveList<JS::CellAllocator, JS::CellAllocator*, &JS::CellAllocator::m_list_node>::begin()
Line
Count
Source
359
104
{
360
104
    return m_storage.m_first ? Iterator(node_to_value(*m_storage.m_first)) : Iterator();
361
104
}
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::HandleImpl, JS::HandleImpl*, &JS::HandleImpl::m_list_node>::begin()
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::MarkedVectorBase, JS::MarkedVectorBase*, &JS::MarkedVectorBase::m_list_node>::begin()
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::ConservativeVectorBase, JS::ConservativeVectorBase*, &JS::ConservativeVectorBase::m_list_node>::begin()
AK::Detail::IntrusiveList<JS::WeakContainer, JS::WeakContainer*, &JS::WeakContainer::m_list_node>::begin()
Line
Count
Source
359
52
{
360
52
    return m_storage.m_first ? Iterator(node_to_value(*m_storage.m_first)) : Iterator();
361
52
}
Unexecuted instantiation: AK::Detail::IntrusiveList<Shell::Shell::Promise, Shell::Shell::Promise*, &Shell::Shell::Promise::node>::begin()
362
363
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
364
inline typename IntrusiveList<T, Container, member>::ReverseIterator IntrusiveList<T, Container, member>::rbegin()
365
{
366
    return m_storage.m_last ? ReverseIterator(node_to_value(*m_storage.m_last)) : ReverseIterator();
367
}
368
369
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
370
inline typename IntrusiveList<T, Container, member>::ConstIterator IntrusiveList<T, Container, member>::begin() const
371
{
372
    return m_storage.m_first ? ConstIterator(node_to_value(*m_storage.m_first)) : ConstIterator();
373
}
374
375
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
376
inline T* IntrusiveList<T, Container, member>::node_to_value(SubstitutedIntrusiveListNode<T, Container>& node)
377
1.22M
{
378
    // Note: A data member pointer is a 32-bit offset in the Windows ABI (both x86 and x86_64),
379
    //       whereas it is an appropriately sized ptrdiff_t in the Itanium ABI, the following ensures
380
    //       that we always use the correct type for the subtraction.
381
1.22M
    using EquivalentNumericTypeForDataMemberPointer = Conditional<sizeof(member) == sizeof(ptrdiff_t), ptrdiff_t, u32>;
382
1.22M
    static_assert(sizeof(EquivalentNumericTypeForDataMemberPointer) == sizeof(member),
383
1.22M
        "The equivalent numeric type for the data member pointer must have the same size as the data member pointer itself.");
384
385
    // Note: Since this might seem odd, here's an explanation on what this function actually does:
386
    //       `node` is a reference that resides in some part of the actual value (of type T), the
387
    //       placement (i.e. offset) of which is described by the pointer-to-data-member parameter
388
    //       named `member`.
389
    //       This function effectively takes in the address of the data member, and returns the address
390
    //       of the value (of type T) holding that member.
391
1.22M
    return bit_cast<T*>(bit_cast<unsigned char*>(&node) - bit_cast<EquivalentNumericTypeForDataMemberPointer>(member));
392
1.22M
}
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Gfx::Point<int>, 1000>::QueueSegment, AK::Queue<Gfx::Point<int>, 1000>::QueueSegment*, &AK::Queue<Gfx::Point<int>, 1000>::QueueSegment::node>::node_to_value(AK::Detail::IntrusiveListNode<AK::Queue<Gfx::Point<int>, 1000>::QueueSegment, AK::Queue<Gfx::Point<int>, 1000>::QueueSegment*>&)
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<IPC::File, 1000>::QueueSegment, AK::Queue<IPC::File, 1000>::QueueSegment*, &AK::Queue<IPC::File, 1000>::QueueSegment::node>::node_to_value(AK::Detail::IntrusiveListNode<AK::Queue<IPC::File, 1000>::QueueSegment, AK::Queue<IPC::File, 1000>::QueueSegment*>&)
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment, AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment*, &AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment::node>::node_to_value(AK::Detail::IntrusiveListNode<AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment, AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment*>&)
AK::Detail::IntrusiveList<JS::HeapBlock, JS::HeapBlock*, &JS::HeapBlock::m_list_node>::node_to_value(AK::Detail::IntrusiveListNode<JS::HeapBlock, JS::HeapBlock*>&)
Line
Count
Source
377
77.4k
{
378
    // Note: A data member pointer is a 32-bit offset in the Windows ABI (both x86 and x86_64),
379
    //       whereas it is an appropriately sized ptrdiff_t in the Itanium ABI, the following ensures
380
    //       that we always use the correct type for the subtraction.
381
77.4k
    using EquivalentNumericTypeForDataMemberPointer = Conditional<sizeof(member) == sizeof(ptrdiff_t), ptrdiff_t, u32>;
382
77.4k
    static_assert(sizeof(EquivalentNumericTypeForDataMemberPointer) == sizeof(member),
383
77.4k
        "The equivalent numeric type for the data member pointer must have the same size as the data member pointer itself.");
384
385
    // Note: Since this might seem odd, here's an explanation on what this function actually does:
386
    //       `node` is a reference that resides in some part of the actual value (of type T), the
387
    //       placement (i.e. offset) of which is described by the pointer-to-data-member parameter
388
    //       named `member`.
389
    //       This function effectively takes in the address of the data member, and returns the address
390
    //       of the value (of type T) holding that member.
391
77.4k
    return bit_cast<T*>(bit_cast<unsigned char*>(&node) - bit_cast<EquivalentNumericTypeForDataMemberPointer>(member));
392
77.4k
}
AK::Detail::IntrusiveList<JS::CellAllocator, JS::CellAllocator*, &JS::CellAllocator::m_list_node>::node_to_value(AK::Detail::IntrusiveListNode<JS::CellAllocator, JS::CellAllocator*>&)
Line
Count
Source
377
5.57k
{
378
    // Note: A data member pointer is a 32-bit offset in the Windows ABI (both x86 and x86_64),
379
    //       whereas it is an appropriately sized ptrdiff_t in the Itanium ABI, the following ensures
380
    //       that we always use the correct type for the subtraction.
381
5.57k
    using EquivalentNumericTypeForDataMemberPointer = Conditional<sizeof(member) == sizeof(ptrdiff_t), ptrdiff_t, u32>;
382
5.57k
    static_assert(sizeof(EquivalentNumericTypeForDataMemberPointer) == sizeof(member),
383
5.57k
        "The equivalent numeric type for the data member pointer must have the same size as the data member pointer itself.");
384
385
    // Note: Since this might seem odd, here's an explanation on what this function actually does:
386
    //       `node` is a reference that resides in some part of the actual value (of type T), the
387
    //       placement (i.e. offset) of which is described by the pointer-to-data-member parameter
388
    //       named `member`.
389
    //       This function effectively takes in the address of the data member, and returns the address
390
    //       of the value (of type T) holding that member.
391
5.57k
    return bit_cast<T*>(bit_cast<unsigned char*>(&node) - bit_cast<EquivalentNumericTypeForDataMemberPointer>(member));
392
5.57k
}
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::HandleImpl, JS::HandleImpl*, &JS::HandleImpl::m_list_node>::node_to_value(AK::Detail::IntrusiveListNode<JS::HandleImpl, JS::HandleImpl*>&)
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::MarkedVectorBase, JS::MarkedVectorBase*, &JS::MarkedVectorBase::m_list_node>::node_to_value(AK::Detail::IntrusiveListNode<JS::MarkedVectorBase, JS::MarkedVectorBase*>&)
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::ConservativeVectorBase, JS::ConservativeVectorBase*, &JS::ConservativeVectorBase::m_list_node>::node_to_value(AK::Detail::IntrusiveListNode<JS::ConservativeVectorBase, JS::ConservativeVectorBase*>&)
Unexecuted instantiation: AK::Detail::IntrusiveList<JS::WeakContainer, JS::WeakContainer*, &JS::WeakContainer::m_list_node>::node_to_value(AK::Detail::IntrusiveListNode<JS::WeakContainer, JS::WeakContainer*>&)
RegexOptimizer.cpp:AK::Detail::IntrusiveList<AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment, AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment*, &AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment::node>::node_to_value(AK::Detail::IntrusiveListNode<AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment, AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment*>&)
Line
Count
Source
377
1.14M
{
378
    // Note: A data member pointer is a 32-bit offset in the Windows ABI (both x86 and x86_64),
379
    //       whereas it is an appropriately sized ptrdiff_t in the Itanium ABI, the following ensures
380
    //       that we always use the correct type for the subtraction.
381
1.14M
    using EquivalentNumericTypeForDataMemberPointer = Conditional<sizeof(member) == sizeof(ptrdiff_t), ptrdiff_t, u32>;
382
1.14M
    static_assert(sizeof(EquivalentNumericTypeForDataMemberPointer) == sizeof(member),
383
1.14M
        "The equivalent numeric type for the data member pointer must have the same size as the data member pointer itself.");
384
385
    // Note: Since this might seem odd, here's an explanation on what this function actually does:
386
    //       `node` is a reference that resides in some part of the actual value (of type T), the
387
    //       placement (i.e. offset) of which is described by the pointer-to-data-member parameter
388
    //       named `member`.
389
    //       This function effectively takes in the address of the data member, and returns the address
390
    //       of the value (of type T) holding that member.
391
1.14M
    return bit_cast<T*>(bit_cast<unsigned char*>(&node) - bit_cast<EquivalentNumericTypeForDataMemberPointer>(member));
392
1.14M
}
Unexecuted instantiation: AK::Detail::IntrusiveList<Shell::Shell::Promise, Shell::Shell::Promise*, &Shell::Shell::Promise::node>::node_to_value(AK::Detail::IntrusiveListNode<Shell::Shell::Promise, Shell::Shell::Promise*>&)
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment, AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment*, &AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment::node>::node_to_value(AK::Detail::IntrusiveListNode<AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment, AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment*>&)
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment, AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment*, &AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment::node>::node_to_value(AK::Detail::IntrusiveListNode<AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment, AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment*>&)
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment, AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment*, &AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment::node>::node_to_value(AK::Detail::IntrusiveListNode<AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment, AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment*>&)
AK::Detail::IntrusiveList<AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment, AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment*, &AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment::node>::node_to_value(AK::Detail::IntrusiveListNode<AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment, AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment*>&)
Line
Count
Source
377
2.52k
{
378
    // Note: A data member pointer is a 32-bit offset in the Windows ABI (both x86 and x86_64),
379
    //       whereas it is an appropriately sized ptrdiff_t in the Itanium ABI, the following ensures
380
    //       that we always use the correct type for the subtraction.
381
2.52k
    using EquivalentNumericTypeForDataMemberPointer = Conditional<sizeof(member) == sizeof(ptrdiff_t), ptrdiff_t, u32>;
382
2.52k
    static_assert(sizeof(EquivalentNumericTypeForDataMemberPointer) == sizeof(member),
383
2.52k
        "The equivalent numeric type for the data member pointer must have the same size as the data member pointer itself.");
384
385
    // Note: Since this might seem odd, here's an explanation on what this function actually does:
386
    //       `node` is a reference that resides in some part of the actual value (of type T), the
387
    //       placement (i.e. offset) of which is described by the pointer-to-data-member parameter
388
    //       named `member`.
389
    //       This function effectively takes in the address of the data member, and returns the address
390
    //       of the value (of type T) holding that member.
391
2.52k
    return bit_cast<T*>(bit_cast<unsigned char*>(&node) - bit_cast<EquivalentNumericTypeForDataMemberPointer>(member));
392
2.52k
}
Unexecuted instantiation: AK::Detail::IntrusiveList<AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment, AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment*, &AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment::node>::node_to_value(AK::Detail::IntrusiveListNode<AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment, AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment*>&)
393
394
template<typename T, typename Container>
395
inline IntrusiveListNode<T, Container>::~IntrusiveListNode()
396
7.63k
{
397
7.63k
    VERIFY(!is_in_list());
398
7.63k
}
Unexecuted instantiation: AK::Detail::IntrusiveListNode<AK::Queue<Gfx::Point<int>, 1000>::QueueSegment, AK::Queue<Gfx::Point<int>, 1000>::QueueSegment*>::~IntrusiveListNode()
Unexecuted instantiation: AK::Detail::IntrusiveListNode<AK::Queue<IPC::File, 1000>::QueueSegment, AK::Queue<IPC::File, 1000>::QueueSegment*>::~IntrusiveListNode()
Unexecuted instantiation: AK::Detail::IntrusiveListNode<AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment, AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment*>::~IntrusiveListNode()
AK::Detail::IntrusiveListNode<JS::HeapBlock, JS::HeapBlock*>::~IntrusiveListNode()
Line
Count
Source
396
4.19k
{
397
4.19k
    VERIFY(!is_in_list());
398
4.19k
}
Unexecuted instantiation: AK::Detail::IntrusiveListNode<JS::ConservativeVectorBase, JS::ConservativeVectorBase*>::~IntrusiveListNode()
AK::Detail::IntrusiveListNode<JS::HandleImpl, JS::HandleImpl*>::~IntrusiveListNode()
Line
Count
Source
396
1.19k
{
397
1.19k
    VERIFY(!is_in_list());
398
1.19k
}
AK::Detail::IntrusiveListNode<JS::CellAllocator, JS::CellAllocator*>::~IntrusiveListNode()
Line
Count
Source
396
364
{
397
364
    VERIFY(!is_in_list());
398
364
}
AK::Detail::IntrusiveListNode<JS::MarkedVectorBase, JS::MarkedVectorBase*>::~IntrusiveListNode()
Line
Count
Source
396
22
{
397
22
    VERIFY(!is_in_list());
398
22
}
Unexecuted instantiation: AK::Detail::IntrusiveListNode<JS::WeakContainer, JS::WeakContainer*>::~IntrusiveListNode()
RegexOptimizer.cpp:AK::Detail::IntrusiveListNode<AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment, AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment*>::~IntrusiveListNode()
Line
Count
Source
396
839
{
397
839
    VERIFY(!is_in_list());
398
839
}
Unexecuted instantiation: AK::Detail::IntrusiveListNode<Shell::Shell::Promise, Shell::Shell::Promise*>::~IntrusiveListNode()
Unexecuted instantiation: AK::Detail::IntrusiveListNode<AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment, AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment*>::~IntrusiveListNode()
Unexecuted instantiation: AK::Detail::IntrusiveListNode<AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment, AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment*>::~IntrusiveListNode()
Unexecuted instantiation: AK::Detail::IntrusiveListNode<AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment, AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment*>::~IntrusiveListNode()
AK::Detail::IntrusiveListNode<AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment, AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment*>::~IntrusiveListNode()
Line
Count
Source
396
1.02k
{
397
1.02k
    VERIFY(!is_in_list());
398
1.02k
}
Unexecuted instantiation: AK::Detail::IntrusiveListNode<AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment, AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment*>::~IntrusiveListNode()
399
400
template<typename T, typename Container>
401
inline void IntrusiveListNode<T, Container>::remove()
402
11.5k
{
403
11.5k
    VERIFY(m_storage);
404
11.5k
    if (m_storage->m_first == this)
405
11.5k
        m_storage->m_first = m_next;
406
11.5k
    if (m_storage->m_last == this)
407
6.82k
        m_storage->m_last = m_prev;
408
11.5k
    if (m_prev)
409
0
        m_prev->m_next = m_next;
410
11.5k
    if (m_next)
411
4.70k
        m_next->m_prev = m_prev;
412
11.5k
    m_prev = nullptr;
413
11.5k
    m_next = nullptr;
414
11.5k
    m_storage = nullptr;
415
    if constexpr (!IsRaw)
416
        m_self.reference = nullptr;
417
11.5k
}
Unexecuted instantiation: AK::Detail::IntrusiveListNode<AK::Queue<Gfx::Point<int>, 1000>::QueueSegment, AK::Queue<Gfx::Point<int>, 1000>::QueueSegment*>::remove()
Unexecuted instantiation: AK::Detail::IntrusiveListNode<AK::Queue<IPC::File, 1000>::QueueSegment, AK::Queue<IPC::File, 1000>::QueueSegment*>::remove()
AK::Detail::IntrusiveListNode<JS::HandleImpl, JS::HandleImpl*>::remove()
Line
Count
Source
402
1.19k
{
403
1.19k
    VERIFY(m_storage);
404
1.19k
    if (m_storage->m_first == this)
405
1.19k
        m_storage->m_first = m_next;
406
1.19k
    if (m_storage->m_last == this)
407
1.19k
        m_storage->m_last = m_prev;
408
1.19k
    if (m_prev)
409
0
        m_prev->m_next = m_next;
410
1.19k
    if (m_next)
411
0
        m_next->m_prev = m_prev;
412
1.19k
    m_prev = nullptr;
413
1.19k
    m_next = nullptr;
414
1.19k
    m_storage = nullptr;
415
    if constexpr (!IsRaw)
416
        m_self.reference = nullptr;
417
1.19k
}
AK::Detail::IntrusiveListNode<JS::MarkedVectorBase, JS::MarkedVectorBase*>::remove()
Line
Count
Source
402
22
{
403
22
    VERIFY(m_storage);
404
22
    if (m_storage->m_first == this)
405
22
        m_storage->m_first = m_next;
406
22
    if (m_storage->m_last == this)
407
22
        m_storage->m_last = m_prev;
408
22
    if (m_prev)
409
0
        m_prev->m_next = m_next;
410
22
    if (m_next)
411
0
        m_next->m_prev = m_prev;
412
22
    m_prev = nullptr;
413
22
    m_next = nullptr;
414
22
    m_storage = nullptr;
415
    if constexpr (!IsRaw)
416
        m_self.reference = nullptr;
417
22
}
Unexecuted instantiation: AK::Detail::IntrusiveListNode<JS::ConservativeVectorBase, JS::ConservativeVectorBase*>::remove()
Unexecuted instantiation: AK::Detail::IntrusiveListNode<JS::WeakContainer, JS::WeakContainer*>::remove()
AK::Detail::IntrusiveListNode<JS::CellAllocator, JS::CellAllocator*>::remove()
Line
Count
Source
402
2.78k
{
403
2.78k
    VERIFY(m_storage);
404
2.78k
    if (m_storage->m_first == this)
405
2.78k
        m_storage->m_first = m_next;
406
2.78k
    if (m_storage->m_last == this)
407
52
        m_storage->m_last = m_prev;
408
2.78k
    if (m_prev)
409
0
        m_prev->m_next = m_next;
410
2.78k
    if (m_next)
411
2.73k
        m_next->m_prev = m_prev;
412
2.78k
    m_prev = nullptr;
413
2.78k
    m_next = nullptr;
414
2.78k
    m_storage = nullptr;
415
    if constexpr (!IsRaw)
416
        m_self.reference = nullptr;
417
2.78k
}
Unexecuted instantiation: AK::Detail::IntrusiveListNode<AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment, AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment*>::remove()
AK::Detail::IntrusiveListNode<JS::HeapBlock, JS::HeapBlock*>::remove()
Line
Count
Source
402
5.65k
{
403
5.65k
    VERIFY(m_storage);
404
5.65k
    if (m_storage->m_first == this)
405
5.65k
        m_storage->m_first = m_next;
406
5.65k
    if (m_storage->m_last == this)
407
4.46k
        m_storage->m_last = m_prev;
408
5.65k
    if (m_prev)
409
0
        m_prev->m_next = m_next;
410
5.65k
    if (m_next)
411
1.19k
        m_next->m_prev = m_prev;
412
5.65k
    m_prev = nullptr;
413
5.65k
    m_next = nullptr;
414
5.65k
    m_storage = nullptr;
415
    if constexpr (!IsRaw)
416
        m_self.reference = nullptr;
417
5.65k
}
RegexOptimizer.cpp:AK::Detail::IntrusiveListNode<AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment, AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment*>::remove()
Line
Count
Source
402
839
{
403
839
    VERIFY(m_storage);
404
839
    if (m_storage->m_first == this)
405
839
        m_storage->m_first = m_next;
406
839
    if (m_storage->m_last == this)
407
553
        m_storage->m_last = m_prev;
408
839
    if (m_prev)
409
0
        m_prev->m_next = m_next;
410
839
    if (m_next)
411
286
        m_next->m_prev = m_prev;
412
839
    m_prev = nullptr;
413
839
    m_next = nullptr;
414
839
    m_storage = nullptr;
415
    if constexpr (!IsRaw)
416
        m_self.reference = nullptr;
417
839
}
Unexecuted instantiation: AK::Detail::IntrusiveListNode<Shell::Shell::Promise, Shell::Shell::Promise*>::remove()
Unexecuted instantiation: AK::Detail::IntrusiveListNode<AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment, AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment*>::remove()
Unexecuted instantiation: AK::Detail::IntrusiveListNode<AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment, AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment*>::remove()
Unexecuted instantiation: AK::Detail::IntrusiveListNode<AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment, AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment*>::remove()
AK::Detail::IntrusiveListNode<AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment, AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment*>::remove()
Line
Count
Source
402
1.02k
{
403
1.02k
    VERIFY(m_storage);
404
1.02k
    if (m_storage->m_first == this)
405
1.02k
        m_storage->m_first = m_next;
406
1.02k
    if (m_storage->m_last == this)
407
537
        m_storage->m_last = m_prev;
408
1.02k
    if (m_prev)
409
0
        m_prev->m_next = m_next;
410
1.02k
    if (m_next)
411
483
        m_next->m_prev = m_prev;
412
1.02k
    m_prev = nullptr;
413
1.02k
    m_next = nullptr;
414
1.02k
    m_storage = nullptr;
415
    if constexpr (!IsRaw)
416
        m_self.reference = nullptr;
417
1.02k
}
Unexecuted instantiation: AK::Detail::IntrusiveListNode<AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment, AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment*>::remove()
418
419
template<typename T, typename Container>
420
inline bool IntrusiveListNode<T, Container>::is_in_list() const
421
75.2k
{
422
75.2k
    return m_storage != nullptr;
423
75.2k
}
Unexecuted instantiation: AK::Detail::IntrusiveListNode<AK::Queue<Gfx::Point<int>, 1000>::QueueSegment, AK::Queue<Gfx::Point<int>, 1000>::QueueSegment*>::is_in_list() const
Unexecuted instantiation: AK::Detail::IntrusiveListNode<AK::Queue<IPC::File, 1000>::QueueSegment, AK::Queue<IPC::File, 1000>::QueueSegment*>::is_in_list() const
Unexecuted instantiation: AK::Detail::IntrusiveListNode<AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment, AK::Queue<JS::Bytecode::BasicBlock*, 1000>::QueueSegment*>::is_in_list() const
AK::Detail::IntrusiveListNode<JS::HeapBlock, JS::HeapBlock*>::is_in_list() const
Line
Count
Source
421
4.19k
{
422
4.19k
    return m_storage != nullptr;
423
4.19k
}
AK::Detail::IntrusiveListNode<JS::CellAllocator, JS::CellAllocator*>::is_in_list() const
Line
Count
Source
421
67.9k
{
422
67.9k
    return m_storage != nullptr;
423
67.9k
}
Unexecuted instantiation: AK::Detail::IntrusiveListNode<JS::ConservativeVectorBase, JS::ConservativeVectorBase*>::is_in_list() const
AK::Detail::IntrusiveListNode<JS::HandleImpl, JS::HandleImpl*>::is_in_list() const
Line
Count
Source
421
1.19k
{
422
1.19k
    return m_storage != nullptr;
423
1.19k
}
AK::Detail::IntrusiveListNode<JS::MarkedVectorBase, JS::MarkedVectorBase*>::is_in_list() const
Line
Count
Source
421
22
{
422
22
    return m_storage != nullptr;
423
22
}
Unexecuted instantiation: AK::Detail::IntrusiveListNode<JS::WeakContainer, JS::WeakContainer*>::is_in_list() const
RegexOptimizer.cpp:AK::Detail::IntrusiveListNode<AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment, AK::Queue<AK::Trie<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> >, AK::Vector<regex::Optimizer::append_alternation(regex::ByteCode&, AK::Span<regex::ByteCode>)::QualifiedIP, 0ul>, AK::Traits<AK::DisjointSpans<unsigned long const, AK::Vector<AK::Span<unsigned long const>, 0ul> > >, void, regex::OrderedHashMapForTrie>*, 1000>::QueueSegment*>::is_in_list() const
Line
Count
Source
421
839
{
422
839
    return m_storage != nullptr;
423
839
}
Unexecuted instantiation: AK::Detail::IntrusiveListNode<Shell::Shell::Promise, Shell::Shell::Promise*>::is_in_list() const
Unexecuted instantiation: AK::Detail::IntrusiveListNode<AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment, AK::Queue<Web::HTML::HTMLToken, 1000>::QueueSegment*>::is_in_list() const
Unexecuted instantiation: AK::Detail::IntrusiveListNode<AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment, AK::Queue<JS::Handle<Web::HTML::ChangingNavigableContinuationState>, 1000>::QueueSegment*>::is_in_list() const
Unexecuted instantiation: AK::Detail::IntrusiveListNode<AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment, AK::Queue<Web::Layout::InlineLevelIterator::Item, 1000>::QueueSegment*>::is_in_list() const
AK::Detail::IntrusiveListNode<AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment, AK::Queue<AK::NonnullOwnPtr<Media::VideoFrame>, 1>::QueueSegment*>::is_in_list() const
Line
Count
Source
421
1.02k
{
422
1.02k
    return m_storage != nullptr;
423
1.02k
}
Unexecuted instantiation: AK::Detail::IntrusiveListNode<AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment, AK::Queue<AK::NonnullOwnPtr<Media::Video::VP8::BitmapVideoFrame>, 1>::QueueSegment*>::is_in_list() const
424
425
// Specialise IntrusiveList for NonnullRefPtr
426
// By default, intrusive lists cannot contain null entries anyway, so switch to RefPtr
427
// and just make the user-facing functions deref the pointers.
428
429
template<class T, SubstitutedIntrusiveListNode<T, NonnullRefPtr<T>> T::* member>
430
class IntrusiveList<T, NonnullRefPtr<T>, member> : public IntrusiveList<T, RefPtr<T>, member> {
431
public:
432
    [[nodiscard]] NonnullRefPtr<T> first() const { return *IntrusiveList<T, RefPtr<T>, member>::first(); }
433
    [[nodiscard]] NonnullRefPtr<T> last() const { return *IntrusiveList<T, RefPtr<T>, member>::last(); }
434
435
    [[nodiscard]] NonnullRefPtr<T> take_first() { return *IntrusiveList<T, RefPtr<T>, member>::take_first(); }
436
    [[nodiscard]] NonnullRefPtr<T> take_last() { return *IntrusiveList<T, RefPtr<T>, member>::take_last(); }
437
};
438
439
#ifdef KERNEL
440
// Specialise IntrusiveList for NonnullLockRefPtr
441
// By default, intrusive lists cannot contain null entries anyway, so switch to LockRefPtr
442
// and just make the user-facing functions deref the pointers.
443
444
template<class T, SubstitutedIntrusiveListNode<T, NonnullLockRefPtr<T>> T::* member>
445
class IntrusiveList<T, NonnullLockRefPtr<T>, member> : public IntrusiveList<T, LockRefPtr<T>, member> {
446
public:
447
    [[nodiscard]] NonnullLockRefPtr<T> first() const { return *IntrusiveList<T, LockRefPtr<T>, member>::first(); }
448
    [[nodiscard]] NonnullLockRefPtr<T> last() const { return *IntrusiveList<T, LockRefPtr<T>, member>::last(); }
449
450
    [[nodiscard]] NonnullLockRefPtr<T> take_first() { return *IntrusiveList<T, LockRefPtr<T>, member>::take_first(); }
451
    [[nodiscard]] NonnullLockRefPtr<T> take_last() { return *IntrusiveList<T, LockRefPtr<T>, member>::take_last(); }
452
};
453
#endif
454
455
}
456
457
namespace AK {
458
459
template<typename T, typename Container = RawPtr<T>>
460
using IntrusiveListNode = Detail::SubstitutedIntrusiveListNode<T, Container>;
461
462
template<auto member>
463
using IntrusiveList = Detail::IntrusiveList<
464
    decltype(Detail::ExtractIntrusiveListTypes::value(member)),
465
    decltype(Detail::ExtractIntrusiveListTypes::container(member)),
466
    member>;
467
468
}
469
470
#if USING_AK_GLOBALLY
471
using AK::IntrusiveList;
472
using AK::IntrusiveListNode;
473
#endif