xo-gc: retire Collector.forward_inplace + mock x-gc utest
W/ MockCollector supporting AGCObjectVisitor facet
This commit is contained in:
parent
d7c2ae295a
commit
a6d23ddb83
6 changed files with 20 additions and 38 deletions
|
|
@ -283,25 +283,26 @@
|
|||
noexcept: false,
|
||||
attributes: [],
|
||||
},
|
||||
// void forward_inplace(AGCObject * lhs_iface, void ** lhs_data);
|
||||
{
|
||||
name: "forward_inplace",
|
||||
doc: [
|
||||
"evacuate @p *lhs, that refers to state with interface @p lhs_iface,",
|
||||
"to collector @p d's to-space. Replace *lhs_data with forwarding pointer",
|
||||
"",
|
||||
"Require: gc in progress",
|
||||
"",
|
||||
],
|
||||
return_type: "void",
|
||||
args: [
|
||||
{type: "AGCObject *", name: "lhs_iface"},
|
||||
{type: "void **", name: "lhs_data"},
|
||||
],
|
||||
const: false,
|
||||
noexcept: false,
|
||||
attributes: [],
|
||||
},
|
||||
// obsolete. use GCObjectVisitor.visit_child()
|
||||
// // void forward_inplace(AGCObject * lhs_iface, void ** lhs_data);
|
||||
// {
|
||||
// name: "forward_inplace",
|
||||
// doc: [
|
||||
// "evacuate @p *lhs, that refers to state with interface @p lhs_iface,",
|
||||
// "to collector @p d's to-space. Replace *lhs_data with forwarding pointer",
|
||||
// "",
|
||||
// "Require: gc in progress",
|
||||
// "",
|
||||
// ],
|
||||
// return_type: "void",
|
||||
// args: [
|
||||
// {type: "AGCObject *", name: "lhs_iface"},
|
||||
// {type: "void **", name: "lhs_data"},
|
||||
// ],
|
||||
// const: false,
|
||||
// noexcept: false,
|
||||
// attributes: [],
|
||||
// },
|
||||
],
|
||||
router_facet_explicit_content: [
|
||||
"/** convenience template for gc object copy **/",
|
||||
|
|
|
|||
|
|
@ -123,12 +123,6 @@ Require: gc not in progress **/
|
|||
Source must be owned by this collector.
|
||||
Increments object age **/
|
||||
virtual void * alloc_copy(Opaque data, std::byte * src) = 0;
|
||||
/** evacuate @p *lhs, that refers to state with interface @p lhs_iface,
|
||||
to collector @p d's to-space. Replace *lhs_data with forwarding pointer
|
||||
|
||||
Require: gc in progress
|
||||
**/
|
||||
virtual void forward_inplace(Opaque data, AGCObject * lhs_iface, void ** lhs_data) = 0;
|
||||
///@}
|
||||
}; /*ACollector*/
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,6 @@ namespace mm {
|
|||
[[noreturn]] void request_gc(Opaque, Generation) override;
|
||||
[[noreturn]] void assign_member(Opaque, void *, obj<AGCObject> *, obj<AGCObject> &) override;
|
||||
[[noreturn]] void * alloc_copy(Opaque, std::byte *) override;
|
||||
[[noreturn]] void forward_inplace(Opaque, AGCObject *, void **) override;
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -93,9 +93,6 @@ namespace mm {
|
|||
void * alloc_copy(Opaque data, std::byte * src) override {
|
||||
return I::alloc_copy(_dcast(data), src);
|
||||
}
|
||||
void forward_inplace(Opaque data, AGCObject * lhs_iface, void ** lhs_data) override {
|
||||
return I::forward_inplace(_dcast(data), lhs_iface, lhs_data);
|
||||
}
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
|||
|
|
@ -142,9 +142,6 @@ public:
|
|||
void * alloc_copy(std::byte * src) {
|
||||
return O::iface()->alloc_copy(O::data(), src);
|
||||
}
|
||||
void forward_inplace(AGCObject * lhs_iface, void ** lhs_data) {
|
||||
return O::iface()->forward_inplace(O::data(), lhs_iface, lhs_data);
|
||||
}
|
||||
|
||||
///@}
|
||||
/** @defgroup mm-collector-member-vars **/
|
||||
|
|
|
|||
|
|
@ -71,12 +71,6 @@ ICollector_Any::alloc_copy(Opaque, std::byte *) -> void *
|
|||
_fatal();
|
||||
}
|
||||
|
||||
auto
|
||||
ICollector_Any::forward_inplace(Opaque, AGCObject *, void **) -> void
|
||||
{
|
||||
_fatal();
|
||||
}
|
||||
|
||||
|
||||
} /*namespace mm*/
|
||||
} /*namespace xo*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue