tlopex opened a new pull request, #723:
URL: https://github.com/apache/tvm-ffi/pull/723

   This PR separates typed mutation dispatch from structural-mutation recursion 
control.
   
   `#[dispatch(mutate)]` now implements `MutateDispatch` and passes a 
`MutateContext` to each typed handler. Dispatch is responsible only for 
selecting the matching handler, while `MutateContext` provides recursion, 
default mutation, state access, variable remapping, and the current definition 
region.
   
   This enables callbacks such as:
   
   ```rust
   fn mutate_add(
       &mut self,
       value: Add,
       mutator: &mut MutateContext<'_, State>,
   ) -> Result<Any> {
       let a = mutator.mutate(&value.a)?;
       let b = mutator.mutate(&value.b)?;
       // Build or reuse the result.
   }


-- 
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]

Reply via email to