Skip to main content

patch_seq_map_remove

Function patch_seq_map_remove 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn patch_seq_map_remove(stack: Stack) -> Stack
Expand description

Remove a key from the map with COW optimization.

Stack effect: ( Map key – Map )

Fast path: if the map (at sp-2) is sole-owned, pops key and removes directly from the map in place. Slow path: pops both, clones, removes, pushes new map.

§Safety

Stack must have a hashable key on top and a Map below