|
tvm
|
Native object dispatch over one constraint-aware structural visitor. More...
#include <object_functor_with_constraint_context.h>
Public Member Functions | |
| ObjectVisitorWithConstraintContext () | |
| ObjectVisitorWithConstraintContext (const ObjectVisitorWithConstraintContext &)=delete | |
| ObjectVisitorWithConstraintContext & | operator= (const ObjectVisitorWithConstraintContext &)=delete |
| virtual ffi::Optional< ffi::VisitInterrupt > | Visit (ffi::AnyView value) |
| Dispatch a borrowed value, preserving structural error context. | |
| ffi::Expected< ffi::Optional< ffi::VisitInterrupt > > | VisitExpected (ffi::AnyView value) noexcept |
Public Member Functions inherited from tvm::tirx::StructuralVisitorWithConstraintContextObj | |
| StructuralVisitorWithConstraintContextObj () | |
| Construct a visitor using constraint-aware default descent. | |
| void | AppendConstraint (const sym::Constraint &constraint) |
| Add a fact to the current scope, creating its child context on the first append. | |
| template<typename F > | |
| auto | WithConstraintScope (F &&f) -> decltype(f()) |
| Run an Expected-returning callback in a constraint scope. Use AppendConstraint to add facts. Scopes without facts keep the incoming context. Success and visit interrupts restore the incoming position. Terminal errors propagate without restoration; discard the traversal context after failure. | |
| ffi::Expected< ffi::Optional< ffi::VisitInterrupt > > | DefaultVisitExpected (ffi::AnyView value) noexcept |
| Descend with the sparse specialized hook, or the ordinary fallback. Call this from a Visit callback to descend its matched node exactly once. Calling it from that node's registered hook re-enters the same hook. | |
| TVM_FFI_DECLARE_OBJECT_INFO ("tirx.StructuralVisitorWithConstraintContext", StructuralVisitorWithConstraintContextObj, ffi::StructuralVisitorObj) | |
Protected Types | |
| using | VTable = ObjectFunctor< ffi::Optional< ffi::VisitInterrupt >(const ffi::Object *, ObjectVisitorWithConstraintContext *)> |
Protected Member Functions | |
| ObjectVisitorWithConstraintContext (const VTable *table) | |
Protected Member Functions inherited from tvm::tirx::StructuralVisitorWithConstraintContextObj | |
| StructuralVisitorWithConstraintContextObj (const ffi::StructuralVisitorVTable *vtable) | |
| StateTupleType | StateTuple () const noexcept |
Static Protected Member Functions | |
| static void | InitVTable (VTable *table) |
| template<typename Self , typename Node > | |
| static void | SetDispatch (VTable *table) |
Additional Inherited Members | |
Public Types inherited from tvm::tirx::StructuralVisitorWithConstraintContextObj | |
| using | VisitorObjType = StructuralVisitorWithConstraintContextObj |
| using | StateTupleType = std::tuple< const sym::ConstraintContext & > |
Public Attributes inherited from tvm::tirx::StructuralVisitorWithConstraintContextObj | |
| sym::ConstraintContext | constraints |
| Active effective premises. Consumers must not append during traversal. Retain this handle and constraints->LocalSize() for a stable position, or use constraints->ToArray() for an independent sequence of handles. The context itself remains live. | |
Native object dispatch over one constraint-aware structural visitor.
Override Visit for general dispatch. Derived visitors initialize a native table with InitVTable and SetDispatch; unregistered values use structural fallback. Allocate with ffi::make_object. The inherited constraints handle is the active context.
|
protected |
|
inline |
|
delete |
|
inlineexplicitprotected |
|
inlinestaticprotected |
|
delete |
|
inlinestaticprotected |
|
virtual |
Dispatch a borrowed value, preserving structural error context.
|
inlinenoexcept |