angr.utils.cowdict¶
- angr.utils.cowdict.merge_candidate_keys(a, b)¶
Return the keys that may differ between two COW chain maps which (typically) descend from a common ancestor and therefore share a common suffix of layer objects.
A key whose binding lives entirely in the shared suffix – an identical
mapsentry (by identity) that is not shadowed by a deletion in either map – resolves to the same value in both maps, so unioning them is always a no-op and the key is omitted. The result is the union of the keys held in each map’s non-shared “head” layers, plus the keys either map has logically deleted: a deleted key may still be bound in the other map’s shared suffix and therefore needs to be resurrected by a merge.- Return type:
- Parameters:
a (ChainMapCOW)
b (ChainMapCOW)
- class angr.utils.cowdict.ChainMapCOW¶
-
Implements a copy-on-write version of ChainMap that supports auto-collapsing.
Tracks logically deleted keys via a _deleted set so that pop() and del work correctly even when keys live in parent maps.
- clean()¶
- Return type:
ChainMapCOW[TypeVar(K),TypeVar(V)]
- class angr.utils.cowdict.DefaultChainMapCOW¶
Bases:
ChainMapCOW,GenericImplements a copy-on-write version of ChainMap with default values that supports auto-collapsing.
- clean()¶
- Return type:
DefaultChainMapCOW[TypeVar(K),TypeVar(V)]