ladybird/Libraries/LibGC/HeapRoot.h
2026-05-28 21:16:23 +02:00

36 lines
692 B
C++

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