Expand description
Shared pre-conversion alias checks and Self-reference lowering for trait shims.
Functions§
- alias_
checks 🔒 - Reject overlapping Self arguments before any of their references exist. Shared/shared pairs are allowed. Reentrant access remains a separate concern.
- argument 🔒
- Convert one shim argument with the C wrapper’s structured error arm. Arity and native alias checks must run first. Self handles are borrowed later, after their address checks; rooted views retain a local scope until the method’s return has been converted.
- borrow 🔒
- Borrow a
&Selfargument’s value for the rest of the shim, exclusively for&mut Self, as a C wrapper borrows a&T/&mut Targument (#2106): a call still running on the object makes the borrow raise theminiextendr_borrow_conflicterror. The handleargumentmade roots the pointer of a class-wrapped argument. Runs afteralias_checks. - cell_
address 🔒 - A shim’s receiver address for
alias_checks: the value inside the receiver’sRefCell, comparable withExternalPtr::as_ptrof a&Selfargument. - handle_
ident 🔒 - native_
borrow_ 🔒checks - Check native arguments before conversion can create references. Arity
must already be checked, and the caller must be inside the shim’s R unwind
boundary.
&Selfuses ExternalPtr handles and its separate address check. - receiver_
borrow 🔒 - Borrow a shim’s receiver from its
RefCellfor the rest of the shim: shared for&self, exclusive for&mut self. A call still running on the same object makes this raise theminiextendr_borrow_conflicterror.