pop_tail function
dynamic
pop_tail(
- dynamic pv$1,
- dynamic level$1,
- dynamic node$1
Implementation
dc.dynamic pop_tail(dc.dynamic pv$1, dc.dynamic level$1, dc.dynamic node$1, ){
final dc.int n$1=((pv$1 as lcoc_core.PersistentVector).cnt-2);
final dc.int subidx$1=((n$1>>(31&(level$1 as dc.int)))&31);
if((5<(level$1 as dc.int))){
final dc.dynamic some$7481_$AUTO_$1=lcoc_core.pop_tail((pv$1 as lcoc_core.PersistentVector), ((level$1 as dc.int)-5), ((node$1 as lcoc_core.VectorNode).arr[subidx$1]), );
if((null==some$7481_$AUTO_$1)){
if((0<subidx$1)){
return lcoc_core.VectorNode(null, lcoc_core.ashrink((node$1 as lcoc_core.VectorNode).arr, subidx$1, ), );
}
return null;
}
final dc.dynamic new_child$1=some$7481_$AUTO_$1;
return lcoc_core.VectorNode(null, lcoc_core.aresize((node$1 as lcoc_core.VectorNode).arr, subidx$1, (1+subidx$1), new_child$1, ), );
}
if((0<subidx$1)){
return lcoc_core.VectorNode(null, lcoc_core.ashrink((node$1 as lcoc_core.VectorNode).arr, subidx$1, ), );
}
return null;
}