xo-procedure2 stack: + report-gc-object-ages() primitive

This commit is contained in:
Roland Conybeare 2026-03-30 14:51:51 -04:00
commit a8536f89cb
13 changed files with 187 additions and 1 deletions

View file

@ -155,6 +155,26 @@
noexcept: true,
attributes: [],
},
// bool report_object_ages(obj<AAllocator> report_mm, obj<AAllocator> error_mm, obj<AGCObject> * output);
{
name: "report_object_ages",
doc: [
"Report gc object ages, at discretion of collector implementation.",
"Creates array of dictionaries using memory from @p report_mm.",
"Each dictionary has keys n-live and bytes, indexed by object age.",
"If unable to comply (e.g. oom), return runtime error allocated from @p error_mm.",
"Avoiding obj<AGCObject> return type to avoid #include cycle",
],
return_type: "bool",
args: [
{type: "obj<AAllocator>", name: "report_mm"},
{type: "obj<AAllocator>", name: "error_mm"},
{type: "obj<AGCObject> *", name: "output"},
],
const: true,
noexcept: true,
attributes: [],
},
],
nonconst_methods: [
// bool install_type(const AGCObject & iface)