junrushao opened a new pull request, #665:
URL: https://github.com/apache/tvm-ffi/pull/665
Architecture:
- Add object-subclass and qualification detection for unqualified Object
pointees without depending on ObjectRef wrappers.
- Specialize runtime type indexing, subsumption, and TypeTraits for
ObjectPtr<TObject> so ownership crosses Any and packed-function boundaries.
- Integrate direct pointers with reflected field lifetime, serialization, and
structural traversal while keeping container shorthand out of this
boundary.
Public Interfaces:
- Allow ObjectPtr<TObject> in Any, typed function parameters, reflected
fields,
and containers that explicitly name ObjectPtr storage.
- Add base/derived pointer subsumption and report the pointee runtime type
key in
schemas and conversion diagnostics.
UI/UX:
- None.
Behavioral Changes:
- Copying an ObjectPtr through Any retains the object, while moving transfers
ownership and clears the source Any value.
- Null pointers map to the ABI None value and casts enforce runtime ancestry.
- Qualified and reference pointee types remain unsupported.
Docs:
- Document direct ObjectPtr FFI use, ownership behavior, qualification
limits,
and Optional's present-null ambiguity in the C++ guide.
Tests:
- Clean Debug tvm_ffi_tests build passed before container redirection was
added.
- All 19 ObjectPtr-matching Any, storage, reflection, serialization,
variant, and
structural visitor CTests passed.
- Clean editable build and 450 focused metadata/dataclass Python tests
passed.
- Scoped pre-commit hooks passed for all files in this boundary.
Untested Edge Cases:
- Rust bindings, Windows/MSVC, and the full cross-platform test matrix were
not
run for this intermediate boundary.
- Doxygen was not run; the original target tree is known to warn about
missing
documentation on the new ObjectPtr subsumption specialization.
- Stub regeneration still exposes pre-existing mutable-container annotation
drift, so those unrelated generated edits are deferred.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]