tv_push_tail function
VectorNode
tv_push_tail(
- dynamic tv$1,
- dynamic level$1,
- dynamic parent$1,
- dynamic tail_node$1,
)
Implementation
lcoc_core.VectorNode tv_push_tail(dc.dynamic tv$1, dc.dynamic level$1, dc.dynamic parent$1, dc.dynamic tail_node$1, ){
final dc.dynamic? edit$1=(tv$1 as lcoc_core.TransientVector).edit;
final lcoc_core.VectorNode ret$1=lcoc_core.tv_ensure_editable(edit$1, (parent$1 as lcoc_core.VectorNode), );
final dc.int subidx$1=((((tv$1 as lcoc_core.TransientVector).cnt-1)>>(31&(level$1 as dc.int)))&31);
final dc.int level$2=((level$1 as dc.int)-5);
late final dc.dynamic v$8086_$AUTO_$1;
if((0==level$2)){
v$8086_$AUTO_$1=tail_node$1;
}else{
final dc.dynamic child$1=(ret$1.arr[subidx$1]);
if((null==child$1)){
v$8086_$AUTO_$1=lcoc_core.tv_new_path(edit$1, level$2, tail_node$1, );
}else{
v$8086_$AUTO_$1=lcoc_core.tv_push_tail((tv$1 as lcoc_core.TransientVector), level$2, child$1, tail_node$1, );
}
}
ret$1.arr[subidx$1]=v$8086_$AUTO_$1;
return ret$1;
}