xo-gc: + Collector.is_type_installed()
This commit is contained in:
parent
3f1470f938
commit
44a096c6f7
9 changed files with 68 additions and 1 deletions
|
|
@ -198,6 +198,19 @@ namespace xo {
|
|||
return config_.arena_config_.header_.is_forwarding_tseq(hdr);
|
||||
}
|
||||
|
||||
bool
|
||||
DX1Collector::is_type_installed(typeseq tseq) const noexcept
|
||||
{
|
||||
if (object_types_.committed() < sizeof(AGCObject) * (tseq.seqno() + 1))
|
||||
return false;
|
||||
|
||||
AGCObject * v = reinterpret_cast<AGCObject *>(object_types_.lo_);
|
||||
|
||||
void * vtable = *(void **)&(v[tseq.seqno()]);
|
||||
|
||||
return (vtable != nullptr);
|
||||
}
|
||||
|
||||
bool
|
||||
DX1Collector::install_type(const AGCObject & meta) noexcept
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue