push_tail function

VectorNode push_tail(
  1. dynamic pv$1,
  2. dynamic level$1,
  3. dynamic parent$1,
  4. dynamic tailnode$1,
)

Implementation

lcoc_core.VectorNode push_tail(dc.dynamic pv$1, dc.dynamic level$1, dc.dynamic parent$1, dc.dynamic tailnode$1, ){
final dc.int subidx$1=((((pv$1 as lcoc_core.PersistentVector).cnt-1)>>(31&(level$1 as dc.int)))&31);
final dc.List arr_parent$1=(parent$1 as lcoc_core.VectorNode).arr;
final dc.int level$2=((level$1 as dc.int)-5);
late final lcoc_core.VectorNode new_node$1;
if((0==level$2)){
new_node$1=(tailnode$1 as lcoc_core.VectorNode);
}else if((subidx$1<arr_parent$1.length)){
final dc.dynamic some$7481_$AUTO_$1=(arr_parent$1[subidx$1]);
if((null==some$7481_$AUTO_$1)){
new_node$1=lcoc_core.new_path(level$2, (tailnode$1 as lcoc_core.VectorNode), );
}else{
final dc.dynamic child$1=some$7481_$AUTO_$1;
new_node$1=lcoc_core.push_tail((pv$1 as lcoc_core.PersistentVector), level$2, child$1, (tailnode$1 as lcoc_core.VectorNode), );
}
}else{
new_node$1=lcoc_core.new_path(level$2, (tailnode$1 as lcoc_core.VectorNode), );
}
return lcoc_core.VectorNode(null, lcoc_core.aresize(arr_parent$1, subidx$1, (1+subidx$1), new_node$1, ), );
}