$_invoke$3 method
dynamic
$_invoke$3(
- dynamic v$2,
- dynamic start$3,
- dynamic end$1
override
Implementation
dc.dynamic $_invoke$3(dc.dynamic v$2, dc.dynamic start$3, dc.dynamic end$1, ){
final dc.num start$4=(start$3 as dc.num);
final dc.num end$2=(end$1 as dc.num);
final dc.dynamic coll7677$2=v$2;
late final dc.dynamic n$1;
if((coll7677$2 is lcoc_core.ICounted$iface)){
n$1=((coll7677$2 as lcoc_core.ICounted$iface).$_count$0());
}else{
n$1=((lcoc_core.ICounted.extensions(coll7677$2, ) as lcoc_core.ICounted$ext).$_count$0(coll7677$2, ));
}
final dc.int start$5=(start$4.toInt());
final dc.int end$3=(end$2.toInt());
late final dc.bool $if_$2;
if(((lcoc_core.ISubvecable.satisfies(v$2, )) as dc.bool)){
$if_$2=false;
}else{
$if_$2=true;
}
if($if_$2){
throw dc.ArgumentError("v must satisfy ISubvecable", );
}
final dc.bool or$7508_$AUTO_$1=(0>start$5);
late final dc.bool $if_$3;
if(or$7508_$AUTO_$1){
$if_$3=or$7508_$AUTO_$1;
}else{
final dc.bool or$7508_$AUTO_$2=(end$3<start$5);
if(or$7508_$AUTO_$2){
$if_$3=or$7508_$AUTO_$2;
}else{
$if_$3=((n$1 as dc.num)<end$3);
}
}
if($if_$3){
throw dc.ArgumentError("Index out of bounds", );
}
final dc.bool and$7468_$AUTO_$1=(0==start$5);
late final dc.bool $if_$4;
if(and$7468_$AUTO_$1){
$if_$4=(end$3==n$1);
}else{
$if_$4=and$7468_$AUTO_$1;
}
if($if_$4){
return v$2;
}
if((start$5<end$3)){
final dc.dynamic vector7718$1=v$2;
final dc.int start7719$1=start$5;
final dc.int end7720$1=end$3;
if((vector7718$1 is lcoc_core.ISubvecable$iface)){
return ((vector7718$1 as lcoc_core.ISubvecable$iface).$_subvec$2(start7719$1, end7720$1, ));
}
return ((lcoc_core.ISubvecable.extensions(vector7718$1, ) as lcoc_core.ISubvecable$ext).$_subvec$2(vector7718$1, start7719$1, end7720$1, ));
}
return lcoc_core.$_EMPTY_VECTOR;
}