@@ -965,10 +965,17 @@ CapJitAddTypeSignature( "ListWithIdenticalEntries", [ IsInt, IsObject ], functio
965965end );
966966
967967CapJitAddTypeSignature( " Concatenation" , [ IsList ] , function ( input_types )
968+ local filter;
968969
969- Assert ( 0 , input_types[ 1 ] .element_type.filter = IsList );
970+ if input_types[ 1 ] .element_type.filter = IsList then
971+ filter := IsList;
972+ elif input_types[ 1 ] .element_type.filter = IsLazyArray then
973+ filter := IsLazyArray;
974+ else
975+ Error( input_types[ 1 ] .element_type.filter, " is not in [ IsList, IsLazyArray ]\n " );
976+ fi ;
970977
971- return rec ( filter := IsList , element_type := input_types[ 1 ] .element_type.element_type );
978+ return rec ( filter := filter , element_type := input_types[ 1 ] .element_type.element_type );
972979
973980end );
974981
@@ -1176,6 +1183,53 @@ CapJitAddTypeSignature( "[,]", [ IsList, IsInt, IsInt ], function ( input_types
11761183
11771184end );
11781185
1186+ CapJitAddTypeSignature( " LazyArray" , [ IsInt, IsFunction ] , function ( args, func_stack )
1187+
1188+ args := ShallowCopy( args );
1189+
1190+ args.2 := CAP_JIT_INTERNAL_INFERRED_DATA_TYPES_OF_FUNCTION_BY_ARGUMENTS_TYPES( args.2 , [ args.1 .data_type ] , func_stack );
1191+
1192+ if args.2 = fail then
1193+
1194+ # Error( "could not determine output type" );
1195+ return fail ;
1196+
1197+ fi ;
1198+
1199+ return rec ( args := args, output_type := rec ( filter := IsLazyArray, element_type := args.2 .data_type.signature[ 2 ] ) );
1200+
1201+ end );
1202+
1203+ CapJitAddTypeSignature( " LazyStandardInterval" , [ IsInt ] , function ( input_types )
1204+
1205+ return rec ( filter := IsLazyArray, element_type := rec ( filter := IsInt ) );
1206+
1207+ end );
1208+
1209+ CapJitAddTypeSignature( " LazyInterval" , [ IsInt, IsInt ] , function ( input_types )
1210+
1211+ return rec ( filter := IsLazyInterval, element_type := rec ( filter := IsInt ) );
1212+
1213+ end );
1214+
1215+ CapJitAddTypeSignature( " LazyConstantArray" , [ IsInt, IsInt ] , function ( input_types )
1216+
1217+ return rec ( filter := IsLazyConstantArray, element_type := rec ( filter := IsInt ) );
1218+
1219+ end );
1220+
1221+ CapJitAddTypeSignature( " LazyArrayFromList" , [ IsList ] , function ( input_types )
1222+
1223+ return rec ( filter := IsLazyArrayFromList, element_type := rec ( filter := IsInt ) );
1224+
1225+ end );
1226+
1227+ CapJitAddTypeSignature( " ListOfValues" , [ IsLazyArray ] , function ( input_types )
1228+
1229+ return rec ( filter := IsList, element_type := rec ( filter := IsInt ) );
1230+
1231+ end );
1232+
11791233CapJitAddTypeSignature( " LazyHList" , [ IsList, IsFunction ] , function ( args, func_stack )
11801234
11811235 args := ShallowCopy( args );
0 commit comments