The GitHub Actions job "CI" on tvm-ffi.git/main has succeeded.
Run started by GitHub user tlopex (triggered by tlopex).

Head commit for run:
c62b07c2b27ec09a2616eb314a0ef2acc006d55d / Linzhang Li 
<[email protected]>
[CORE] Publish native layout traits from ObjectDef (#721)

Class::_type_final never reaches the runtime. TVMFFITypeInfo exposes the
type index, depth, ancestors, fields and methods; TVMFFITypeMetadata
adds the creator, total_size and the structural-eq kind. Neither carries
num_child_slots / child_slots_can_overflow — those are arguments to the
registration call and stay inside the registry. So nothing downstream
can ask whether a class admits subtypes, and a binding generator that
wants to store an object by value has no way to find out.

Every ObjectDef<Class> now registers __ffi_type_final__ as a bool type
attribute, reusing the existing RegisterTypeAttrValue mechanism (one
bool Any per type, no C ABI change). ObjectInfo.is_final surfaces it to
the stub generator.

is_final stays None for a type registered without an ObjectDef (e.g.
ffi.Object), so a registered False remains distinguishable from "never
published" — the distinction matters because a consumer must not treat
"not final" and "unknown" alike.

Testing — tests/cpp/test_reflection.cc: a non-final type, a final one,
and ffi.Module. tests/python/test_stubgen.py: the same three cases
through ObjectInfo, including the None case.

Signed-off-by: yuchuan <[email protected]>

Report URL: https://github.com/apache/tvm-ffi/actions/runs/33661776073

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to