#include "Collector/Collector.h"
#include "Heap/Heap.h"
#include "Mutator/Mutator.h"
namespace MapleRuntime {
namespace {
const char* const COLLECTOR_NAME[] = { "No Collector", "Proxy Collector", "Regional-Copying Collector",
"Smooth Collector" };
}
const char* Collector::GetGCPhaseName(GCPhase phase)
{
static const char* phaseNames[] = {
"undefined phase",
"idle phase",
"finish phase", "reclaim satb phase",
"stub phase", "stub phase",
"stub phase", "stub phase",
"init phase", "enum phase",
"trace phase", "clear satb phase",
"forward phase", "enum fix phase",
"trace fix phase", "clear trace fix phase",
"fix stack phase", "preforward phase",
};
return phaseNames[phase];
}
Collector::Collector() {}
const char* Collector::GetCollectorName() const { return COLLECTOR_NAME[collectorType]; }
void Collector::RequestGC(GCReason reason, bool async) { RequestGCInternal(reason, async); }
}