1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-08 05:27:14 +09:00
ladybird/Libraries/LibGC/HeapRoot.h
Andreas Kling 11ece7de10 LibGC: Add GC::RootHashMap<...> template container
This is a GC-aware wrapper around AK::HashMap. Entry values are treated
as GC roots, much like the GC::RootVector we already had.

We also provide GC::OrderedRootHashMap as a convenience.
2025-05-03 17:33:54 +02:00

29 lines
483 B
C++

/*
* Copyright (c) 2023, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/SourceLocation.h>
namespace GC {
struct HeapRoot {
enum class Type {
HeapFunctionCapturedPointer,
Root,
RootVector,
RootHashMap,
ConservativeVector,
RegisterPointer,
StackPointer,
VM,
};
Type type;
SourceLocation const* location { nullptr };
};
}