diff --git a/self-host/bootstrap/ir_driver.ir b/self-host/bootstrap/ir_driver.ir index c0047e86..23bdc9eb 100644 --- a/self-host/bootstrap/ir_driver.ir +++ b/self-host/bootstrap/ir_driver.ir @@ -50085,650 +50085,614 @@ load 953 scope_id call 954 checker_check_list_method_call int 4 950 951 952 953 store result 954 load 955 result -iconst 956 0 -gte 957 955 956 -load 958 result -call 959 types_is_error_type bool 1 958 -iconst 960 0 -eq 961 959 960 -and 962 957 961 -brif 962 L2675 L2676 +call 956 checker_method_table_answered bool 1 955 +brif 956 L2675 L2676 label L2675 -load 963 result -load 964 method_name +load 957 result +load 958 method_name +call 959 pith_cstring_release void 1 958 +load 960 recv_node +call 961 pith_struct_release void 1 960 +load 962 arg_indices +call 963 pith_list_release_handle void 1 962 +load 964 recv_name call 965 pith_cstring_release void 1 964 -load 966 recv_node -call 967 pith_struct_release void 1 966 -load 968 arg_indices -call 969 pith_list_release_handle void 1 968 -load 970 recv_name +load 966 module_path +call 967 pith_cstring_release void 1 966 +load 968 qualified_name +call 969 pith_cstring_release void 1 968 +load 970 module_name call 971 pith_cstring_release void 1 970 -load 972 module_path +load 972 generic_name call 973 pith_cstring_release void 1 972 -load 974 qualified_name -call 975 pith_cstring_release void 1 974 -load 976 module_name -call 977 pith_cstring_release void 1 976 -load 978 generic_name -call 979 pith_cstring_release void 1 978 -load 980 recv_info -call 981 pith_struct_release void 1 980 -load 982 payload_types -call 983 pith_list_release_handle void 1 982 -load 984 pa_node -call 985 pith_struct_release void 1 984 -load 986 type_name -call 987 pith_cstring_release void 1 986 -load 988 key -call 989 pith_cstring_release void 1 988 -load 990 base_name -call 991 pith_cstring_release void 1 990 -load 992 method_node -call 993 pith_struct_release void 1 992 -load 994 struct_params -call 995 pith_list_release_handle void 1 994 -load 996 struct_args +load 974 recv_info +call 975 pith_struct_release void 1 974 +load 976 payload_types +call 977 pith_list_release_handle void 1 976 +load 978 pa_node +call 979 pith_struct_release void 1 978 +load 980 type_name +call 981 pith_cstring_release void 1 980 +load 982 key +call 983 pith_cstring_release void 1 982 +load 984 base_name +call 985 pith_cstring_release void 1 984 +load 986 method_node +call 987 pith_struct_release void 1 986 +load 988 struct_params +call 989 pith_list_release_handle void 1 988 +load 990 struct_args +call 991 pith_list_release_handle void 1 990 +load 992 base +call 993 pith_cstring_release void 1 992 +load 994 sdecl +call 995 pith_struct_release void 1 994 +load 996 param_types call 997 pith_list_release_handle void 1 996 -load 998 base -call 999 pith_cstring_release void 1 998 -load 1000 sdecl -call 1001 pith_struct_release void 1 1000 -load 1002 param_types -call 1003 pith_list_release_handle void 1 1002 -load 1004 arg_node -call 1005 pith_struct_release void 1 1004 -ret 963 +load 998 arg_node +call 999 pith_struct_release void 1 998 +ret 957 label L2676 label L2674 jmp L2671 label L2673 label L2671 -load 1006 recv_info -load 1007 recv_info -field 1008 1007 0 string kind -strref 1009 m13s20 -call 1010 pith_cstring_eq bool 2 1008 1009 -call 1011 pith_cstring_release void 1 1009 -brif 1010 L2678 L2679 +load 1000 recv_info +load 1001 recv_info +field 1002 1001 0 string kind +strref 1003 m13s20 +call 1004 pith_cstring_eq bool 2 1002 1003 +call 1005 pith_cstring_release void 1 1003 +brif 1004 L2678 L2679 label L2678 -load 1012 method_name -load 1013 recv_info -load 1014 arg_indices -load 1015 scope_id -call 1016 checker_check_map_method_call int 4 1012 1013 1014 1015 -store result 1016 -load 1017 result -iconst 1018 0 -gte 1019 1017 1018 -load 1020 result -call 1021 types_is_error_type bool 1 1020 -iconst 1022 0 -eq 1023 1021 1022 -and 1024 1019 1023 -brif 1024 L2681 L2682 +load 1006 method_name +load 1007 recv_info +load 1008 arg_indices +load 1009 scope_id +call 1010 checker_check_map_method_call int 4 1006 1007 1008 1009 +store result 1010 +load 1011 result +call 1012 checker_method_table_answered bool 1 1011 +brif 1012 L2681 L2682 label L2681 -load 1025 result -load 1026 method_name +load 1013 result +load 1014 method_name +call 1015 pith_cstring_release void 1 1014 +load 1016 recv_node +call 1017 pith_struct_release void 1 1016 +load 1018 arg_indices +call 1019 pith_list_release_handle void 1 1018 +load 1020 recv_name +call 1021 pith_cstring_release void 1 1020 +load 1022 module_path +call 1023 pith_cstring_release void 1 1022 +load 1024 qualified_name +call 1025 pith_cstring_release void 1 1024 +load 1026 module_name call 1027 pith_cstring_release void 1 1026 -load 1028 recv_node -call 1029 pith_struct_release void 1 1028 -load 1030 arg_indices -call 1031 pith_list_release_handle void 1 1030 -load 1032 recv_name -call 1033 pith_cstring_release void 1 1032 -load 1034 module_path -call 1035 pith_cstring_release void 1 1034 -load 1036 qualified_name +load 1028 generic_name +call 1029 pith_cstring_release void 1 1028 +load 1030 recv_info +call 1031 pith_struct_release void 1 1030 +load 1032 payload_types +call 1033 pith_list_release_handle void 1 1032 +load 1034 pa_node +call 1035 pith_struct_release void 1 1034 +load 1036 type_name call 1037 pith_cstring_release void 1 1036 -load 1038 module_name +load 1038 key call 1039 pith_cstring_release void 1 1038 -load 1040 generic_name +load 1040 base_name call 1041 pith_cstring_release void 1 1040 -load 1042 recv_info +load 1042 method_node call 1043 pith_struct_release void 1 1042 -load 1044 payload_types +load 1044 struct_params call 1045 pith_list_release_handle void 1 1044 -load 1046 pa_node -call 1047 pith_struct_release void 1 1046 -load 1048 type_name +load 1046 struct_args +call 1047 pith_list_release_handle void 1 1046 +load 1048 base call 1049 pith_cstring_release void 1 1048 -load 1050 key -call 1051 pith_cstring_release void 1 1050 -load 1052 base_name -call 1053 pith_cstring_release void 1 1052 -load 1054 method_node +load 1050 sdecl +call 1051 pith_struct_release void 1 1050 +load 1052 param_types +call 1053 pith_list_release_handle void 1 1052 +load 1054 arg_node call 1055 pith_struct_release void 1 1054 -load 1056 struct_params -call 1057 pith_list_release_handle void 1 1056 -load 1058 struct_args -call 1059 pith_list_release_handle void 1 1058 -load 1060 base -call 1061 pith_cstring_release void 1 1060 -load 1062 sdecl -call 1063 pith_struct_release void 1 1062 -load 1064 param_types -call 1065 pith_list_release_handle void 1 1064 -load 1066 arg_node -call 1067 pith_struct_release void 1 1066 -ret 1025 +ret 1013 label L2682 label L2680 jmp L2677 label L2679 label L2677 -load 1068 recv_info -load 1069 recv_info -field 1070 1069 0 string kind -strref 1071 m13s18 -call 1072 pith_cstring_eq bool 2 1070 1071 -call 1073 pith_cstring_release void 1 1071 -brif 1072 L2684 L2685 +load 1056 recv_info +load 1057 recv_info +field 1058 1057 0 string kind +strref 1059 m13s18 +call 1060 pith_cstring_eq bool 2 1058 1059 +call 1061 pith_cstring_release void 1 1059 +brif 1060 L2684 L2685 label L2684 -load 1074 method_name -load 1075 recv_info -load 1076 arg_indices -load 1077 scope_id -call 1078 checker_check_set_method_call int 4 1074 1075 1076 1077 -store result 1078 -load 1079 result -iconst 1080 0 -gte 1081 1079 1080 -load 1082 result -call 1083 types_is_error_type bool 1 1082 -iconst 1084 0 -eq 1085 1083 1084 -and 1086 1081 1085 -brif 1086 L2687 L2688 +load 1062 method_name +load 1063 recv_info +load 1064 arg_indices +load 1065 scope_id +call 1066 checker_check_set_method_call int 4 1062 1063 1064 1065 +store result 1066 +load 1067 result +call 1068 checker_method_table_answered bool 1 1067 +brif 1068 L2687 L2688 label L2687 -load 1087 result -load 1088 method_name -call 1089 pith_cstring_release void 1 1088 -load 1090 recv_node +load 1069 result +load 1070 method_name +call 1071 pith_cstring_release void 1 1070 +load 1072 recv_node +call 1073 pith_struct_release void 1 1072 +load 1074 arg_indices +call 1075 pith_list_release_handle void 1 1074 +load 1076 recv_name +call 1077 pith_cstring_release void 1 1076 +load 1078 module_path +call 1079 pith_cstring_release void 1 1078 +load 1080 qualified_name +call 1081 pith_cstring_release void 1 1080 +load 1082 module_name +call 1083 pith_cstring_release void 1 1082 +load 1084 generic_name +call 1085 pith_cstring_release void 1 1084 +load 1086 recv_info +call 1087 pith_struct_release void 1 1086 +load 1088 payload_types +call 1089 pith_list_release_handle void 1 1088 +load 1090 pa_node call 1091 pith_struct_release void 1 1090 -load 1092 arg_indices -call 1093 pith_list_release_handle void 1 1092 -load 1094 recv_name +load 1092 type_name +call 1093 pith_cstring_release void 1 1092 +load 1094 key call 1095 pith_cstring_release void 1 1094 -load 1096 module_path +load 1096 base_name call 1097 pith_cstring_release void 1 1096 -load 1098 qualified_name -call 1099 pith_cstring_release void 1 1098 -load 1100 module_name -call 1101 pith_cstring_release void 1 1100 -load 1102 generic_name -call 1103 pith_cstring_release void 1 1102 -load 1104 recv_info -call 1105 pith_struct_release void 1 1104 -load 1106 payload_types -call 1107 pith_list_release_handle void 1 1106 -load 1108 pa_node -call 1109 pith_struct_release void 1 1108 -load 1110 type_name -call 1111 pith_cstring_release void 1 1110 -load 1112 key -call 1113 pith_cstring_release void 1 1112 -load 1114 base_name -call 1115 pith_cstring_release void 1 1114 -load 1116 method_node -call 1117 pith_struct_release void 1 1116 -load 1118 struct_params -call 1119 pith_list_release_handle void 1 1118 -load 1120 struct_args -call 1121 pith_list_release_handle void 1 1120 -load 1122 base -call 1123 pith_cstring_release void 1 1122 -load 1124 sdecl -call 1125 pith_struct_release void 1 1124 -load 1126 param_types -call 1127 pith_list_release_handle void 1 1126 -load 1128 arg_node -call 1129 pith_struct_release void 1 1128 -ret 1087 +load 1098 method_node +call 1099 pith_struct_release void 1 1098 +load 1100 struct_params +call 1101 pith_list_release_handle void 1 1100 +load 1102 struct_args +call 1103 pith_list_release_handle void 1 1102 +load 1104 base +call 1105 pith_cstring_release void 1 1104 +load 1106 sdecl +call 1107 pith_struct_release void 1 1106 +load 1108 param_types +call 1109 pith_list_release_handle void 1 1108 +load 1110 arg_node +call 1111 pith_struct_release void 1 1110 +ret 1069 label L2688 label L2686 jmp L2683 label L2685 label L2683 -load 1130 recv_info -load 1131 recv_info -field 1132 1131 0 string kind -strref 1133 m13s24 -call 1134 pith_cstring_eq bool 2 1132 1133 -call 1135 pith_cstring_release void 1 1133 -brif 1134 L2690 L2691 +load 1112 recv_info +load 1113 recv_info +field 1114 1113 0 string kind +strref 1115 m13s24 +call 1116 pith_cstring_eq bool 2 1114 1115 +call 1117 pith_cstring_release void 1 1115 +brif 1116 L2690 L2691 label L2690 -load 1136 method_name -load 1137 recv_info -load 1138 arg_indices -load 1139 scope_id -call 1140 checker_check_channel_method_call int 4 1136 1137 1138 1139 -store ch_result 1140 -load 1141 ch_result -iconst 1142 0 -gte 1143 1141 1142 -load 1144 ch_result -call 1145 types_is_error_type bool 1 1144 -iconst 1146 0 -eq 1147 1145 1146 -and 1148 1143 1147 -brif 1148 L2693 L2694 +load 1118 method_name +load 1119 recv_info +load 1120 arg_indices +load 1121 scope_id +call 1122 checker_check_channel_method_call int 4 1118 1119 1120 1121 +store ch_result 1122 +load 1123 ch_result +call 1124 checker_method_table_answered bool 1 1123 +brif 1124 L2693 L2694 label L2693 -load 1149 ch_result -load 1150 method_name +load 1125 ch_result +load 1126 method_name +call 1127 pith_cstring_release void 1 1126 +load 1128 recv_node +call 1129 pith_struct_release void 1 1128 +load 1130 arg_indices +call 1131 pith_list_release_handle void 1 1130 +load 1132 recv_name +call 1133 pith_cstring_release void 1 1132 +load 1134 module_path +call 1135 pith_cstring_release void 1 1134 +load 1136 qualified_name +call 1137 pith_cstring_release void 1 1136 +load 1138 module_name +call 1139 pith_cstring_release void 1 1138 +load 1140 generic_name +call 1141 pith_cstring_release void 1 1140 +load 1142 recv_info +call 1143 pith_struct_release void 1 1142 +load 1144 payload_types +call 1145 pith_list_release_handle void 1 1144 +load 1146 pa_node +call 1147 pith_struct_release void 1 1146 +load 1148 type_name +call 1149 pith_cstring_release void 1 1148 +load 1150 key call 1151 pith_cstring_release void 1 1150 -load 1152 recv_node -call 1153 pith_struct_release void 1 1152 -load 1154 arg_indices -call 1155 pith_list_release_handle void 1 1154 -load 1156 recv_name -call 1157 pith_cstring_release void 1 1156 -load 1158 module_path -call 1159 pith_cstring_release void 1 1158 -load 1160 qualified_name +load 1152 base_name +call 1153 pith_cstring_release void 1 1152 +load 1154 method_node +call 1155 pith_struct_release void 1 1154 +load 1156 struct_params +call 1157 pith_list_release_handle void 1 1156 +load 1158 struct_args +call 1159 pith_list_release_handle void 1 1158 +load 1160 base call 1161 pith_cstring_release void 1 1160 -load 1162 module_name -call 1163 pith_cstring_release void 1 1162 -load 1164 generic_name -call 1165 pith_cstring_release void 1 1164 -load 1166 recv_info +load 1162 sdecl +call 1163 pith_struct_release void 1 1162 +load 1164 param_types +call 1165 pith_list_release_handle void 1 1164 +load 1166 arg_node call 1167 pith_struct_release void 1 1166 -load 1168 payload_types -call 1169 pith_list_release_handle void 1 1168 -load 1170 pa_node -call 1171 pith_struct_release void 1 1170 -load 1172 type_name -call 1173 pith_cstring_release void 1 1172 -load 1174 key -call 1175 pith_cstring_release void 1 1174 -load 1176 base_name -call 1177 pith_cstring_release void 1 1176 -load 1178 method_node -call 1179 pith_struct_release void 1 1178 -load 1180 struct_params -call 1181 pith_list_release_handle void 1 1180 -load 1182 struct_args -call 1183 pith_list_release_handle void 1 1182 -load 1184 base -call 1185 pith_cstring_release void 1 1184 -load 1186 sdecl -call 1187 pith_struct_release void 1 1186 -load 1188 param_types -call 1189 pith_list_release_handle void 1 1188 -load 1190 arg_node -call 1191 pith_struct_release void 1 1190 -ret 1149 +ret 1125 label L2694 label L2692 jmp L2689 label L2691 label L2689 -load 1192 recv_info -load 1193 recv_info -field 1194 1193 0 string kind -strref 1195 m13s26 -call 1196 pith_cstring_eq bool 2 1194 1195 -call 1197 pith_cstring_release void 1 1195 -brif 1196 L2696 L2697 +load 1168 recv_info +load 1169 recv_info +field 1170 1169 0 string kind +strref 1171 m13s26 +call 1172 pith_cstring_eq bool 2 1170 1171 +call 1173 pith_cstring_release void 1 1171 +brif 1172 L2696 L2697 label L2696 -load 1198 method_name -load 1199 recv_info -load 1200 arg_indices -load 1201 scope_id -call 1202 checker_check_task_method_call int 4 1198 1199 1200 1201 -store task_result 1202 -load 1203 task_result -iconst 1204 0 -gte 1205 1203 1204 -load 1206 task_result -call 1207 types_is_error_type bool 1 1206 -iconst 1208 0 -eq 1209 1207 1208 -and 1210 1205 1209 -brif 1210 L2699 L2700 +load 1174 method_name +load 1175 recv_info +load 1176 arg_indices +load 1177 scope_id +call 1178 checker_check_task_method_call int 4 1174 1175 1176 1177 +store task_result 1178 +load 1179 task_result +call 1180 checker_method_table_answered bool 1 1179 +brif 1180 L2699 L2700 label L2699 -load 1211 task_result -load 1212 method_name -call 1213 pith_cstring_release void 1 1212 -load 1214 recv_node -call 1215 pith_struct_release void 1 1214 -load 1216 arg_indices -call 1217 pith_list_release_handle void 1 1216 -load 1218 recv_name -call 1219 pith_cstring_release void 1 1218 -load 1220 module_path -call 1221 pith_cstring_release void 1 1220 -load 1222 qualified_name -call 1223 pith_cstring_release void 1 1222 -load 1224 module_name -call 1225 pith_cstring_release void 1 1224 -load 1226 generic_name -call 1227 pith_cstring_release void 1 1226 -load 1228 recv_info -call 1229 pith_struct_release void 1 1228 -load 1230 payload_types -call 1231 pith_list_release_handle void 1 1230 -load 1232 pa_node -call 1233 pith_struct_release void 1 1232 -load 1234 type_name -call 1235 pith_cstring_release void 1 1234 -load 1236 key -call 1237 pith_cstring_release void 1 1236 -load 1238 base_name -call 1239 pith_cstring_release void 1 1238 -load 1240 method_node -call 1241 pith_struct_release void 1 1240 -load 1242 struct_params -call 1243 pith_list_release_handle void 1 1242 -load 1244 struct_args -call 1245 pith_list_release_handle void 1 1244 -load 1246 base -call 1247 pith_cstring_release void 1 1246 -load 1248 sdecl -call 1249 pith_struct_release void 1 1248 -load 1250 param_types -call 1251 pith_list_release_handle void 1 1250 -load 1252 arg_node -call 1253 pith_struct_release void 1 1252 -ret 1211 +load 1181 task_result +load 1182 method_name +call 1183 pith_cstring_release void 1 1182 +load 1184 recv_node +call 1185 pith_struct_release void 1 1184 +load 1186 arg_indices +call 1187 pith_list_release_handle void 1 1186 +load 1188 recv_name +call 1189 pith_cstring_release void 1 1188 +load 1190 module_path +call 1191 pith_cstring_release void 1 1190 +load 1192 qualified_name +call 1193 pith_cstring_release void 1 1192 +load 1194 module_name +call 1195 pith_cstring_release void 1 1194 +load 1196 generic_name +call 1197 pith_cstring_release void 1 1196 +load 1198 recv_info +call 1199 pith_struct_release void 1 1198 +load 1200 payload_types +call 1201 pith_list_release_handle void 1 1200 +load 1202 pa_node +call 1203 pith_struct_release void 1 1202 +load 1204 type_name +call 1205 pith_cstring_release void 1 1204 +load 1206 key +call 1207 pith_cstring_release void 1 1206 +load 1208 base_name +call 1209 pith_cstring_release void 1 1208 +load 1210 method_node +call 1211 pith_struct_release void 1 1210 +load 1212 struct_params +call 1213 pith_list_release_handle void 1 1212 +load 1214 struct_args +call 1215 pith_list_release_handle void 1 1214 +load 1216 base +call 1217 pith_cstring_release void 1 1216 +load 1218 sdecl +call 1219 pith_struct_release void 1 1218 +load 1220 param_types +call 1221 pith_list_release_handle void 1 1220 +load 1222 arg_node +call 1223 pith_struct_release void 1 1222 +ret 1181 label L2700 label L2698 jmp L2695 label L2697 label L2695 -load 1254 recv_info -load 1255 recv_info -field 1256 1255 0 string kind -strref 1257 m13s34 -call 1258 pith_cstring_eq bool 2 1256 1257 -call 1259 pith_cstring_release void 1 1257 -brif 1258 L2702 L2703 +load 1224 recv_info +load 1225 recv_info +field 1226 1225 0 string kind +strref 1227 m13s34 +call 1228 pith_cstring_eq bool 2 1226 1227 +call 1229 pith_cstring_release void 1 1227 +brif 1228 L2702 L2703 label L2702 -load 1260 recv_info -load 1261 recv_info -field 1262 1261 8 string name -load 1263 method_name -load 1264 arg_indices -load 1265 scope_id -call 1266 checker_check_sync_primitive_method_call int 4 1262 1263 1264 1265 -store sync_result 1266 -load 1267 sync_result -iconst 1268 0 -gte 1269 1267 1268 -load 1270 sync_result -call 1271 types_is_error_type bool 1 1270 -iconst 1272 0 -eq 1273 1271 1272 -and 1274 1269 1273 -brif 1274 L2705 L2706 +load 1230 recv_info +load 1231 recv_info +field 1232 1231 8 string name +load 1233 method_name +load 1234 arg_indices +load 1235 scope_id +call 1236 checker_check_sync_primitive_method_call int 4 1232 1233 1234 1235 +store sync_result 1236 +load 1237 sync_result +call 1238 checker_method_table_answered bool 1 1237 +brif 1238 L2705 L2706 label L2705 -load 1275 sync_result -load 1276 method_name -call 1277 pith_cstring_release void 1 1276 -load 1278 recv_node -call 1279 pith_struct_release void 1 1278 -load 1280 arg_indices -call 1281 pith_list_release_handle void 1 1280 -load 1282 recv_name -call 1283 pith_cstring_release void 1 1282 -load 1284 module_path -call 1285 pith_cstring_release void 1 1284 -load 1286 qualified_name -call 1287 pith_cstring_release void 1 1286 -load 1288 module_name -call 1289 pith_cstring_release void 1 1288 -load 1290 generic_name -call 1291 pith_cstring_release void 1 1290 -load 1292 recv_info -call 1293 pith_struct_release void 1 1292 -load 1294 payload_types -call 1295 pith_list_release_handle void 1 1294 -load 1296 pa_node -call 1297 pith_struct_release void 1 1296 -load 1298 type_name -call 1299 pith_cstring_release void 1 1298 -load 1300 key -call 1301 pith_cstring_release void 1 1300 -load 1302 base_name -call 1303 pith_cstring_release void 1 1302 -load 1304 method_node -call 1305 pith_struct_release void 1 1304 -load 1306 struct_params -call 1307 pith_list_release_handle void 1 1306 -load 1308 struct_args -call 1309 pith_list_release_handle void 1 1308 -load 1310 base -call 1311 pith_cstring_release void 1 1310 -load 1312 sdecl -call 1313 pith_struct_release void 1 1312 -load 1314 param_types -call 1315 pith_list_release_handle void 1 1314 -load 1316 arg_node -call 1317 pith_struct_release void 1 1316 -ret 1275 +load 1239 sync_result +load 1240 method_name +call 1241 pith_cstring_release void 1 1240 +load 1242 recv_node +call 1243 pith_struct_release void 1 1242 +load 1244 arg_indices +call 1245 pith_list_release_handle void 1 1244 +load 1246 recv_name +call 1247 pith_cstring_release void 1 1246 +load 1248 module_path +call 1249 pith_cstring_release void 1 1248 +load 1250 qualified_name +call 1251 pith_cstring_release void 1 1250 +load 1252 module_name +call 1253 pith_cstring_release void 1 1252 +load 1254 generic_name +call 1255 pith_cstring_release void 1 1254 +load 1256 recv_info +call 1257 pith_struct_release void 1 1256 +load 1258 payload_types +call 1259 pith_list_release_handle void 1 1258 +load 1260 pa_node +call 1261 pith_struct_release void 1 1260 +load 1262 type_name +call 1263 pith_cstring_release void 1 1262 +load 1264 key +call 1265 pith_cstring_release void 1 1264 +load 1266 base_name +call 1267 pith_cstring_release void 1 1266 +load 1268 method_node +call 1269 pith_struct_release void 1 1268 +load 1270 struct_params +call 1271 pith_list_release_handle void 1 1270 +load 1272 struct_args +call 1273 pith_list_release_handle void 1 1272 +load 1274 base +call 1275 pith_cstring_release void 1 1274 +load 1276 sdecl +call 1277 pith_struct_release void 1 1276 +load 1278 param_types +call 1279 pith_list_release_handle void 1 1278 +load 1280 arg_node +call 1281 pith_struct_release void 1 1280 +ret 1239 label L2706 label L2704 jmp L2701 label L2703 label L2701 -load 1318 recv_info -load 1319 recv_info -field 1320 1319 0 string kind -strref 1321 m13s33 -call 1322 pith_cstring_eq bool 2 1320 1321 -call 1323 pith_cstring_release void 1 1321 -brif 1322 L2708 L2709 +load 1282 recv_info +load 1283 recv_info +field 1284 1283 0 string kind +strref 1285 m13s33 +call 1286 pith_cstring_eq bool 2 1284 1285 +call 1287 pith_cstring_release void 1 1285 +brif 1286 L2708 L2709 label L2708 -iconst 1324 0 -store vi 1324 +iconst 1288 0 +store vi 1288 label L2710 -load 1325 vi -load 1326 recv_info -load 1327 recv_info -field 1328 1327 96 list_string variants -call 1329 pith_list_len int 1 1328 -lt 1330 1325 1329 -brif 1330 L2711 L2712 +load 1289 vi +load 1290 recv_info +load 1291 recv_info +field 1292 1291 96 list_string variants +call 1293 pith_list_len int 1 1292 +lt 1294 1289 1293 +brif 1294 L2711 L2712 label L2711 -load 1331 recv_info -load 1332 recv_info -field 1333 1332 96 list_string variants -load 1334 vi -call 1335 pith_list_get_value string 2 1333 1334 -load 1336 method_name -call 1337 pith_cstring_eq bool 2 1335 1336 -brif 1337 L2714 L2715 +load 1295 recv_info +load 1296 recv_info +field 1297 1296 96 list_string variants +load 1298 vi +call 1299 pith_list_get_value string 2 1297 1298 +load 1300 method_name +call 1301 pith_cstring_eq bool 2 1299 1300 +brif 1301 L2714 L2715 label L2714 -load 1338 payload_types -load 1339 recv_info -load 1340 recv_info -field 1341 1340 104 list variant_types -load 1342 vi -call 1343 pith_list_get_value list 2 1341 1342 -call 1344 pith_list_retain_handle void 1 1343 -call 1345 pith_list_release_handle void 1 1338 -store payload_types 1343 -load 1346 arg_indices -call 1347 pith_list_len int 1 1346 -load 1348 payload_types -call 1349 pith_list_len int 1 1348 -neq 1350 1347 1349 -brif 1350 L2717 L2718 +load 1302 payload_types +load 1303 recv_info +load 1304 recv_info +field 1305 1304 104 list variant_types +load 1306 vi +call 1307 pith_list_get_value list 2 1305 1306 +call 1308 pith_list_retain_handle void 1 1307 +call 1309 pith_list_release_handle void 1 1302 +store payload_types 1307 +load 1310 arg_indices +call 1311 pith_list_len int 1 1310 +load 1312 payload_types +call 1313 pith_list_len int 1 1312 +neq 1314 1311 1313 +brif 1314 L2717 L2718 label L2717 -strref 1351 m13s284 -load 1352 method_name -strref 1353 m13s516 -concat 1354 1352 1353 -call 1355 pith_cstring_release void 1 1353 -load 1356 payload_types -call 1357 pith_list_len int 1 1356 -call 1358 int_to_string string 1 1357 -concat 1359 1354 1358 -call 1360 pith_cstring_release void 1 1354 -call 1361 pith_cstring_release void 1 1358 -strref 1362 m13s515 -concat 1363 1359 1362 -call 1364 pith_cstring_release void 1 1359 -call 1365 pith_cstring_release void 1 1362 -load 1366 arg_indices -call 1367 pith_list_len int 1 1366 -call 1368 int_to_string string 1 1367 -concat 1369 1363 1368 -call 1370 pith_cstring_release void 1 1363 -call 1371 pith_cstring_release void 1 1368 -call 1372 checker_diagnostics_report_error unknown 2 1351 1369 -call 1373 pith_cstring_release void 1 1351 -call 1374 pith_cstring_release void 1 1369 -load 1375 types_TID_ERR -load 1376 method_name -call 1377 pith_cstring_release void 1 1376 -load 1378 recv_node -call 1379 pith_struct_release void 1 1378 -load 1380 arg_indices -call 1381 pith_list_release_handle void 1 1380 -load 1382 recv_name -call 1383 pith_cstring_release void 1 1382 -load 1384 module_path -call 1385 pith_cstring_release void 1 1384 -load 1386 qualified_name -call 1387 pith_cstring_release void 1 1386 -load 1388 module_name -call 1389 pith_cstring_release void 1 1388 -load 1390 generic_name -call 1391 pith_cstring_release void 1 1390 -load 1392 recv_info -call 1393 pith_struct_release void 1 1392 -load 1394 payload_types -call 1395 pith_list_release_handle void 1 1394 -load 1396 pa_node -call 1397 pith_struct_release void 1 1396 -load 1398 type_name -call 1399 pith_cstring_release void 1 1398 -load 1400 key -call 1401 pith_cstring_release void 1 1400 -load 1402 base_name -call 1403 pith_cstring_release void 1 1402 -load 1404 method_node -call 1405 pith_struct_release void 1 1404 -load 1406 struct_params -call 1407 pith_list_release_handle void 1 1406 -load 1408 struct_args -call 1409 pith_list_release_handle void 1 1408 -load 1410 base -call 1411 pith_cstring_release void 1 1410 -load 1412 sdecl -call 1413 pith_struct_release void 1 1412 -load 1414 param_types -call 1415 pith_list_release_handle void 1 1414 -load 1416 arg_node -call 1417 pith_struct_release void 1 1416 -ret 1375 +strref 1315 m13s284 +load 1316 method_name +strref 1317 m13s516 +concat 1318 1316 1317 +call 1319 pith_cstring_release void 1 1317 +load 1320 payload_types +call 1321 pith_list_len int 1 1320 +call 1322 int_to_string string 1 1321 +concat 1323 1318 1322 +call 1324 pith_cstring_release void 1 1318 +call 1325 pith_cstring_release void 1 1322 +strref 1326 m13s515 +concat 1327 1323 1326 +call 1328 pith_cstring_release void 1 1323 +call 1329 pith_cstring_release void 1 1326 +load 1330 arg_indices +call 1331 pith_list_len int 1 1330 +call 1332 int_to_string string 1 1331 +concat 1333 1327 1332 +call 1334 pith_cstring_release void 1 1327 +call 1335 pith_cstring_release void 1 1332 +call 1336 checker_diagnostics_report_error unknown 2 1315 1333 +call 1337 pith_cstring_release void 1 1315 +call 1338 pith_cstring_release void 1 1333 +load 1339 types_TID_ERR +load 1340 method_name +call 1341 pith_cstring_release void 1 1340 +load 1342 recv_node +call 1343 pith_struct_release void 1 1342 +load 1344 arg_indices +call 1345 pith_list_release_handle void 1 1344 +load 1346 recv_name +call 1347 pith_cstring_release void 1 1346 +load 1348 module_path +call 1349 pith_cstring_release void 1 1348 +load 1350 qualified_name +call 1351 pith_cstring_release void 1 1350 +load 1352 module_name +call 1353 pith_cstring_release void 1 1352 +load 1354 generic_name +call 1355 pith_cstring_release void 1 1354 +load 1356 recv_info +call 1357 pith_struct_release void 1 1356 +load 1358 payload_types +call 1359 pith_list_release_handle void 1 1358 +load 1360 pa_node +call 1361 pith_struct_release void 1 1360 +load 1362 type_name +call 1363 pith_cstring_release void 1 1362 +load 1364 key +call 1365 pith_cstring_release void 1 1364 +load 1366 base_name +call 1367 pith_cstring_release void 1 1366 +load 1368 method_node +call 1369 pith_struct_release void 1 1368 +load 1370 struct_params +call 1371 pith_list_release_handle void 1 1370 +load 1372 struct_args +call 1373 pith_list_release_handle void 1 1372 +load 1374 base +call 1375 pith_cstring_release void 1 1374 +load 1376 sdecl +call 1377 pith_struct_release void 1 1376 +load 1378 param_types +call 1379 pith_list_release_handle void 1 1378 +load 1380 arg_node +call 1381 pith_struct_release void 1 1380 +ret 1339 label L2718 label L2716 -iconst 1418 0 -store pi 1418 -load 1419 arg_indices -call 1420 pith_auto_len int 1 1419 -iconst 1421 0 -store __for_idx_153 1421 -store __for_len_153 1420 -store __for_iter_153 1419 +iconst 1382 0 +store pi 1382 +load 1383 arg_indices +call 1384 pith_auto_len int 1 1383 +iconst 1385 0 +store __for_idx_153 1385 +store __for_len_153 1384 +store __for_iter_153 1383 label L2719 -load 1422 __for_idx_153 -load 1423 __for_len_153 -lt 1424 1422 1423 -brif 1424 L2720 L2722 +load 1386 __for_idx_153 +load 1387 __for_len_153 +lt 1388 1386 1387 +brif 1388 L2720 L2722 label L2720 -load 1425 __for_iter_153 -load 1426 __for_idx_153 -call 1427 pith_list_get_value unknown 2 1425 1426 -store pai 1427 -load 1428 pa_node -load 1429 pai -call 1430 ast_get_node struct:Node 1 1429 -call 1431 pith_struct_release void 1 1428 -store pa_node 1430 -load 1432 pai -store pa_expr 1432 -load 1433 pa_node -load 1434 pa_node -field 1435 1434 0 string kind -strref 1436 m13s419 -call 1437 pith_cstring_eq bool 2 1435 1436 -call 1438 pith_cstring_release void 1 1436 -brif 1437 L2724 L2725 +load 1389 __for_iter_153 +load 1390 __for_idx_153 +call 1391 pith_list_get_value unknown 2 1389 1390 +store pai 1391 +load 1392 pa_node +load 1393 pai +call 1394 ast_get_node struct:Node 1 1393 +call 1395 pith_struct_release void 1 1392 +store pa_node 1394 +load 1396 pai +store pa_expr 1396 +load 1397 pa_node +load 1398 pa_node +field 1399 1398 0 string kind +strref 1400 m13s419 +call 1401 pith_cstring_eq bool 2 1399 1400 +call 1402 pith_cstring_release void 1 1400 +brif 1401 L2724 L2725 label L2724 -load 1439 pa_node -load 1440 pa_node -field 1441 1440 16 list children -call 1442 pith_list_len int 1 1441 -iconst 1443 0 -gt 1444 1442 1443 -brif 1444 L2727 L2728 +load 1403 pa_node +load 1404 pa_node +field 1405 1404 16 list children +call 1406 pith_list_len int 1 1405 +iconst 1407 0 +gt 1408 1406 1407 +brif 1408 L2727 L2728 label L2727 -load 1445 pa_node -load 1446 pa_node -field 1447 1446 16 list children -iconst 1448 0 -call 1449 pith_list_get_value int 2 1447 1448 -store pa_expr 1449 +load 1409 pa_node +load 1410 pa_node +field 1411 1410 16 list children +iconst 1412 0 +call 1413 pith_list_get_value int 2 1411 1412 +store pa_expr 1413 jmp L2726 label L2728 label L2726 jmp L2723 label L2725 label L2723 -load 1450 pa_expr -load 1451 scope_id -call 1452 checker_c_check_expr int 2 1450 1451 -store pa_type 1452 -load 1453 pa_type -call 1454 types_is_error_type bool 1 1453 -iconst 1455 0 -eq 1456 1454 1455 -load 1457 pi -load 1458 payload_types -call 1459 pith_list_len int 1 1458 -lt 1460 1457 1459 -and 1461 1456 1460 -brif 1461 L2730 L2731 +load 1414 pa_expr +load 1415 scope_id +call 1416 checker_c_check_expr int 2 1414 1415 +store pa_type 1416 +load 1417 pa_type +call 1418 types_is_error_type bool 1 1417 +iconst 1419 0 +eq 1420 1418 1419 +load 1421 pi +load 1422 payload_types +call 1423 pith_list_len int 1 1422 +lt 1424 1421 1423 +and 1425 1420 1424 +brif 1425 L2730 L2731 label L2730 -load 1462 pa_type -load 1463 payload_types -load 1464 pi -call 1465 pith_list_get_value int 2 1463 1464 -neq 1466 1462 1465 -brif 1466 L2733 L2734 +load 1426 pa_type +load 1427 payload_types +load 1428 pi +call 1429 pith_list_get_value int 2 1427 1428 +neq 1430 1426 1429 +brif 1430 L2733 L2734 label L2733 -load 1467 pa_type -load 1468 payload_types -load 1469 pi -call 1470 pith_list_get_value int 2 1468 1469 -call 1471 checker_types_structurally_equal bool 2 1467 1470 -iconst 1472 0 -eq 1473 1471 1472 -brif 1473 L2736 L2737 +load 1431 pa_type +load 1432 payload_types +load 1433 pi +call 1434 pith_list_get_value int 2 1432 1433 +call 1435 checker_types_structurally_equal bool 2 1431 1434 +iconst 1436 0 +eq 1437 1435 1436 +brif 1437 L2736 L2737 label L2736 -strref 1474 m13s281 -strref 1475 m13s418 -load 1476 payload_types -load 1477 pi -call 1478 pith_list_get_value int 2 1476 1477 -call 1479 types_get_type_name string 1 1478 -concat 1480 1475 1479 -call 1481 pith_cstring_release void 1 1475 -call 1482 pith_cstring_release void 1 1479 -strref 1483 m13s278 -concat 1484 1480 1483 -call 1485 pith_cstring_release void 1 1480 -call 1486 pith_cstring_release void 1 1483 -load 1487 pa_type -call 1488 types_get_type_name string 1 1487 -concat 1489 1484 1488 -call 1490 pith_cstring_release void 1 1484 -call 1491 pith_cstring_release void 1 1488 -call 1492 checker_diagnostics_report_error unknown 2 1474 1489 -call 1493 pith_cstring_release void 1 1474 -call 1494 pith_cstring_release void 1 1489 +strref 1438 m13s281 +strref 1439 m13s418 +load 1440 payload_types +load 1441 pi +call 1442 pith_list_get_value int 2 1440 1441 +call 1443 types_get_type_name string 1 1442 +concat 1444 1439 1443 +call 1445 pith_cstring_release void 1 1439 +call 1446 pith_cstring_release void 1 1443 +strref 1447 m13s278 +concat 1448 1444 1447 +call 1449 pith_cstring_release void 1 1444 +call 1450 pith_cstring_release void 1 1447 +load 1451 pa_type +call 1452 types_get_type_name string 1 1451 +concat 1453 1448 1452 +call 1454 pith_cstring_release void 1 1448 +call 1455 pith_cstring_release void 1 1452 +call 1456 checker_diagnostics_report_error unknown 2 1438 1453 +call 1457 pith_cstring_release void 1 1438 +call 1458 pith_cstring_release void 1 1453 jmp L2735 label L2737 label L2735 @@ -50738,178 +50702,178 @@ label L2732 jmp L2729 label L2731 label L2729 -load 1495 pi -iconst 1496 1 -add 1497 1495 1496 -store pi 1497 +load 1459 pi +iconst 1460 1 +add 1461 1459 1460 +store pi 1461 label L2721 -load 1498 __for_idx_153 -iconst 1499 1 -add 1500 1498 1499 -store __for_idx_153 1500 +load 1462 __for_idx_153 +iconst 1463 1 +add 1464 1462 1463 +store __for_idx_153 1464 jmp L2719 label L2722 -load 1501 receiver_type -load 1502 method_name -call 1503 pith_cstring_release void 1 1502 -load 1504 recv_node -call 1505 pith_struct_release void 1 1504 -load 1506 arg_indices -call 1507 pith_list_release_handle void 1 1506 -load 1508 recv_name -call 1509 pith_cstring_release void 1 1508 -load 1510 module_path -call 1511 pith_cstring_release void 1 1510 -load 1512 qualified_name -call 1513 pith_cstring_release void 1 1512 -load 1514 module_name -call 1515 pith_cstring_release void 1 1514 -load 1516 generic_name -call 1517 pith_cstring_release void 1 1516 -load 1518 recv_info -call 1519 pith_struct_release void 1 1518 -load 1520 payload_types -call 1521 pith_list_release_handle void 1 1520 -load 1522 pa_node -call 1523 pith_struct_release void 1 1522 -load 1524 type_name -call 1525 pith_cstring_release void 1 1524 -load 1526 key -call 1527 pith_cstring_release void 1 1526 -load 1528 base_name -call 1529 pith_cstring_release void 1 1528 -load 1530 method_node -call 1531 pith_struct_release void 1 1530 -load 1532 struct_params -call 1533 pith_list_release_handle void 1 1532 -load 1534 struct_args -call 1535 pith_list_release_handle void 1 1534 -load 1536 base -call 1537 pith_cstring_release void 1 1536 -load 1538 sdecl -call 1539 pith_struct_release void 1 1538 -load 1540 param_types -call 1541 pith_list_release_handle void 1 1540 -load 1542 arg_node -call 1543 pith_struct_release void 1 1542 -ret 1501 +load 1465 receiver_type +load 1466 method_name +call 1467 pith_cstring_release void 1 1466 +load 1468 recv_node +call 1469 pith_struct_release void 1 1468 +load 1470 arg_indices +call 1471 pith_list_release_handle void 1 1470 +load 1472 recv_name +call 1473 pith_cstring_release void 1 1472 +load 1474 module_path +call 1475 pith_cstring_release void 1 1474 +load 1476 qualified_name +call 1477 pith_cstring_release void 1 1476 +load 1478 module_name +call 1479 pith_cstring_release void 1 1478 +load 1480 generic_name +call 1481 pith_cstring_release void 1 1480 +load 1482 recv_info +call 1483 pith_struct_release void 1 1482 +load 1484 payload_types +call 1485 pith_list_release_handle void 1 1484 +load 1486 pa_node +call 1487 pith_struct_release void 1 1486 +load 1488 type_name +call 1489 pith_cstring_release void 1 1488 +load 1490 key +call 1491 pith_cstring_release void 1 1490 +load 1492 base_name +call 1493 pith_cstring_release void 1 1492 +load 1494 method_node +call 1495 pith_struct_release void 1 1494 +load 1496 struct_params +call 1497 pith_list_release_handle void 1 1496 +load 1498 struct_args +call 1499 pith_list_release_handle void 1 1498 +load 1500 base +call 1501 pith_cstring_release void 1 1500 +load 1502 sdecl +call 1503 pith_struct_release void 1 1502 +load 1504 param_types +call 1505 pith_list_release_handle void 1 1504 +load 1506 arg_node +call 1507 pith_struct_release void 1 1506 +ret 1465 label L2715 label L2713 -load 1544 vi -iconst 1545 1 -add 1546 1544 1545 -store vi 1546 +load 1508 vi +iconst 1509 1 +add 1510 1508 1509 +store vi 1510 jmp L2710 label L2712 jmp L2707 label L2709 label L2707 -load 1547 type_name -load 1548 dispatch_type -call 1549 types_get_type_name string 1 1548 -call 1550 pith_cstring_release void 1 1547 -store type_name 1549 -load 1551 key -load 1552 type_name -strref 1553 m13s119 -concat 1554 1552 1553 -call 1555 pith_cstring_release void 1 1553 -load 1556 method_name -concat 1557 1554 1556 -call 1558 pith_cstring_release void 1 1554 -call 1559 pith_cstring_release void 1 1551 -store key 1557 -load 1560 key -call 1561 checker_methods_has_method_declaration bool 1 1560 -iconst 1562 0 -eq 1563 1561 1562 -brif 1563 L2739 L2740 +load 1511 type_name +load 1512 dispatch_type +call 1513 types_get_type_name string 1 1512 +call 1514 pith_cstring_release void 1 1511 +store type_name 1513 +load 1515 key +load 1516 type_name +strref 1517 m13s119 +concat 1518 1516 1517 +call 1519 pith_cstring_release void 1 1517 +load 1520 method_name +concat 1521 1518 1520 +call 1522 pith_cstring_release void 1 1518 +call 1523 pith_cstring_release void 1 1515 +store key 1521 +load 1524 key +call 1525 checker_methods_has_method_declaration bool 1 1524 +iconst 1526 0 +eq 1527 1525 1526 +brif 1527 L2739 L2740 label L2739 -load 1564 base_name -load 1565 type_name -call 1566 checker_extract_base_type_name string 1 1565 -call 1567 pith_cstring_release void 1 1564 -store base_name 1566 -load 1568 base_name -load 1569 type_name -call 1571 pith_cstring_eq bool 2 1568 1569 -iconst 1572 1 -sub 1570 1572 1571 -brif 1570 L2742 L2743 +load 1528 base_name +load 1529 type_name +call 1530 checker_extract_base_type_name string 1 1529 +call 1531 pith_cstring_release void 1 1528 +store base_name 1530 +load 1532 base_name +load 1533 type_name +call 1535 pith_cstring_eq bool 2 1532 1533 +iconst 1536 1 +sub 1534 1536 1535 +brif 1534 L2742 L2743 label L2742 -load 1573 key -load 1574 base_name -strref 1575 m13s119 -concat 1576 1574 1575 -call 1577 pith_cstring_release void 1 1575 -load 1578 method_name -concat 1579 1576 1578 -call 1580 pith_cstring_release void 1 1576 -call 1581 pith_cstring_release void 1 1573 -store key 1579 +load 1537 key +load 1538 base_name +strref 1539 m13s119 +concat 1540 1538 1539 +call 1541 pith_cstring_release void 1 1539 +load 1542 method_name +concat 1543 1540 1542 +call 1544 pith_cstring_release void 1 1540 +call 1545 pith_cstring_release void 1 1537 +store key 1543 jmp L2741 label L2743 label L2741 jmp L2738 label L2740 label L2738 -load 1582 key -call 1583 checker_methods_has_method_declaration bool 1 1582 -brif 1583 L2745 L2746 +load 1546 key +call 1547 checker_methods_has_method_declaration bool 1 1546 +brif 1547 L2745 L2746 label L2745 -load 1584 method_node -load 1585 key -call 1586 checker_methods_get_method_declaration_index int 1 1585 -call 1587 ast_get_node struct:Node 1 1586 -call 1588 pith_struct_release void 1 1584 -store method_node 1587 -load 1589 struct_params -call 1590 pith_list_new_cstr list_string 0 -call 1591 pith_list_release_handle void 1 1589 -store struct_params 1590 -load 1592 struct_args -call 1593 pith_list_new_default list 0 -call 1594 pith_list_release_handle void 1 1592 -store struct_args 1593 -load 1595 checker_struct_instance_type_args -load 1596 dispatch_type -call 1597 map_contains_ikey bool 2 1595 1596 -brif 1597 L2748 L2749 +load 1548 method_node +load 1549 key +call 1550 checker_methods_get_method_declaration_index int 1 1549 +call 1551 ast_get_node struct:Node 1 1550 +call 1552 pith_struct_release void 1 1548 +store method_node 1551 +load 1553 struct_params +call 1554 pith_list_new_cstr list_string 0 +call 1555 pith_list_release_handle void 1 1553 +store struct_params 1554 +load 1556 struct_args +call 1557 pith_list_new_default list 0 +call 1558 pith_list_release_handle void 1 1556 +store struct_args 1557 +load 1559 checker_struct_instance_type_args +load 1560 dispatch_type +call 1561 map_contains_ikey bool 2 1559 1560 +brif 1561 L2748 L2749 label L2748 -load 1598 struct_args -load 1599 checker_struct_instance_type_args -load 1600 dispatch_type -call 1601 map_get_ikey string 2 1599 1600 -call 1602 checker_decode_tid_list list 1 1601 -call 1603 pith_list_release_handle void 1 1598 -store struct_args 1602 -load 1604 checker_struct_instance_base_name -load 1605 dispatch_type -call 1606 map_contains_ikey bool 2 1604 1605 -brif 1606 L2751 L2752 +load 1562 struct_args +load 1563 checker_struct_instance_type_args +load 1564 dispatch_type +call 1565 map_get_ikey string 2 1563 1564 +call 1566 checker_decode_tid_list list 1 1565 +call 1567 pith_list_release_handle void 1 1562 +store struct_args 1566 +load 1568 checker_struct_instance_base_name +load 1569 dispatch_type +call 1570 map_contains_ikey bool 2 1568 1569 +brif 1570 L2751 L2752 label L2751 -load 1607 base -load 1608 checker_struct_instance_base_name -load 1609 dispatch_type -call 1610 map_get_ikey string 2 1608 1609 -call 1611 pith_cstring_retain void 1 1610 -call 1612 pith_cstring_release void 1 1607 -store base 1610 -load 1613 base -call 1614 checker_has_generic_declaration bool 1 1613 -brif 1614 L2754 L2755 +load 1571 base +load 1572 checker_struct_instance_base_name +load 1573 dispatch_type +call 1574 map_get_ikey string 2 1572 1573 +call 1575 pith_cstring_retain void 1 1574 +call 1576 pith_cstring_release void 1 1571 +store base 1574 +load 1577 base +call 1578 checker_has_generic_declaration bool 1 1577 +brif 1578 L2754 L2755 label L2754 -load 1615 sdecl -load 1616 base -call 1617 checker_get_generic_declaration_index int 1 1616 -call 1618 ast_get_node struct:Node 1 1617 -call 1619 pith_struct_release void 1 1615 -store sdecl 1618 -load 1620 struct_params -load 1621 sdecl -call 1622 checker_collect_generic_parameter_names list_string 1 1621 -call 1623 pith_list_release_handle void 1 1620 -store struct_params 1622 +load 1579 sdecl +load 1580 base +call 1581 checker_get_generic_declaration_index int 1 1580 +call 1582 ast_get_node struct:Node 1 1581 +call 1583 pith_struct_release void 1 1579 +store sdecl 1582 +load 1584 struct_params +load 1585 sdecl +call 1586 checker_collect_generic_parameter_names list_string 1 1585 +call 1587 pith_list_release_handle void 1 1584 +store struct_params 1586 jmp L2753 label L2755 label L2753 @@ -50919,201 +50883,201 @@ label L2750 jmp L2747 label L2749 label L2747 -load 1624 param_types -load 1625 method_node -load 1626 struct_params -load 1627 struct_args -call 1628 checker_collect_function_param_types_with_subst list 3 1625 1626 1627 -call 1629 pith_list_release_handle void 1 1624 -store param_types 1628 -load 1630 method_node -load 1631 struct_params -load 1632 struct_args -call 1633 checker_collect_function_return_type_with_subst int 3 1630 1631 1632 -store ret_type 1633 -load 1634 arg_indices -call 1635 pith_list_len int 1 1634 -load 1636 param_types -call 1637 pith_list_len int 1 1636 -neq 1638 1635 1637 -brif 1638 L2757 L2758 +load 1588 param_types +load 1589 method_node +load 1590 struct_params +load 1591 struct_args +call 1592 checker_collect_function_param_types_with_subst list 3 1589 1590 1591 +call 1593 pith_list_release_handle void 1 1588 +store param_types 1592 +load 1594 method_node +load 1595 struct_params +load 1596 struct_args +call 1597 checker_collect_function_return_type_with_subst int 3 1594 1595 1596 +store ret_type 1597 +load 1598 arg_indices +call 1599 pith_list_len int 1 1598 +load 1600 param_types +call 1601 pith_list_len int 1 1600 +neq 1602 1599 1601 +brif 1602 L2757 L2758 label L2757 -strref 1639 m13s284 -load 1640 method_name -strref 1641 m13s516 -concat 1642 1640 1641 -call 1643 pith_cstring_release void 1 1641 -load 1644 param_types -call 1645 pith_list_len int 1 1644 -call 1646 int_to_string string 1 1645 -concat 1647 1642 1646 -call 1648 pith_cstring_release void 1 1642 -call 1649 pith_cstring_release void 1 1646 -strref 1650 m13s515 -concat 1651 1647 1650 -call 1652 pith_cstring_release void 1 1647 -call 1653 pith_cstring_release void 1 1650 -load 1654 arg_indices -call 1655 pith_list_len int 1 1654 -call 1656 int_to_string string 1 1655 -concat 1657 1651 1656 -call 1658 pith_cstring_release void 1 1651 -call 1659 pith_cstring_release void 1 1656 -call 1660 checker_diagnostics_report_error unknown 2 1639 1657 -call 1661 pith_cstring_release void 1 1639 -call 1662 pith_cstring_release void 1 1657 -load 1663 types_TID_ERR -load 1664 method_name -call 1665 pith_cstring_release void 1 1664 -load 1666 recv_node -call 1667 pith_struct_release void 1 1666 -load 1668 arg_indices -call 1669 pith_list_release_handle void 1 1668 -load 1670 recv_name -call 1671 pith_cstring_release void 1 1670 -load 1672 module_path -call 1673 pith_cstring_release void 1 1672 -load 1674 qualified_name -call 1675 pith_cstring_release void 1 1674 -load 1676 module_name -call 1677 pith_cstring_release void 1 1676 -load 1678 generic_name -call 1679 pith_cstring_release void 1 1678 -load 1680 recv_info -call 1681 pith_struct_release void 1 1680 -load 1682 payload_types -call 1683 pith_list_release_handle void 1 1682 -load 1684 pa_node -call 1685 pith_struct_release void 1 1684 -load 1686 type_name -call 1687 pith_cstring_release void 1 1686 -load 1688 key -call 1689 pith_cstring_release void 1 1688 -load 1690 base_name -call 1691 pith_cstring_release void 1 1690 -load 1692 method_node -call 1693 pith_struct_release void 1 1692 -load 1694 struct_params -call 1695 pith_list_release_handle void 1 1694 -load 1696 struct_args -call 1697 pith_list_release_handle void 1 1696 -load 1698 base -call 1699 pith_cstring_release void 1 1698 -load 1700 sdecl -call 1701 pith_struct_release void 1 1700 -load 1702 param_types -call 1703 pith_list_release_handle void 1 1702 -load 1704 arg_node -call 1705 pith_struct_release void 1 1704 -ret 1663 +strref 1603 m13s284 +load 1604 method_name +strref 1605 m13s516 +concat 1606 1604 1605 +call 1607 pith_cstring_release void 1 1605 +load 1608 param_types +call 1609 pith_list_len int 1 1608 +call 1610 int_to_string string 1 1609 +concat 1611 1606 1610 +call 1612 pith_cstring_release void 1 1606 +call 1613 pith_cstring_release void 1 1610 +strref 1614 m13s515 +concat 1615 1611 1614 +call 1616 pith_cstring_release void 1 1611 +call 1617 pith_cstring_release void 1 1614 +load 1618 arg_indices +call 1619 pith_list_len int 1 1618 +call 1620 int_to_string string 1 1619 +concat 1621 1615 1620 +call 1622 pith_cstring_release void 1 1615 +call 1623 pith_cstring_release void 1 1620 +call 1624 checker_diagnostics_report_error unknown 2 1603 1621 +call 1625 pith_cstring_release void 1 1603 +call 1626 pith_cstring_release void 1 1621 +load 1627 types_TID_ERR +load 1628 method_name +call 1629 pith_cstring_release void 1 1628 +load 1630 recv_node +call 1631 pith_struct_release void 1 1630 +load 1632 arg_indices +call 1633 pith_list_release_handle void 1 1632 +load 1634 recv_name +call 1635 pith_cstring_release void 1 1634 +load 1636 module_path +call 1637 pith_cstring_release void 1 1636 +load 1638 qualified_name +call 1639 pith_cstring_release void 1 1638 +load 1640 module_name +call 1641 pith_cstring_release void 1 1640 +load 1642 generic_name +call 1643 pith_cstring_release void 1 1642 +load 1644 recv_info +call 1645 pith_struct_release void 1 1644 +load 1646 payload_types +call 1647 pith_list_release_handle void 1 1646 +load 1648 pa_node +call 1649 pith_struct_release void 1 1648 +load 1650 type_name +call 1651 pith_cstring_release void 1 1650 +load 1652 key +call 1653 pith_cstring_release void 1 1652 +load 1654 base_name +call 1655 pith_cstring_release void 1 1654 +load 1656 method_node +call 1657 pith_struct_release void 1 1656 +load 1658 struct_params +call 1659 pith_list_release_handle void 1 1658 +load 1660 struct_args +call 1661 pith_list_release_handle void 1 1660 +load 1662 base +call 1663 pith_cstring_release void 1 1662 +load 1664 sdecl +call 1665 pith_struct_release void 1 1664 +load 1666 param_types +call 1667 pith_list_release_handle void 1 1666 +load 1668 arg_node +call 1669 pith_struct_release void 1 1668 +ret 1627 label L2758 label L2756 -iconst 1706 0 -store aidx 1706 -load 1707 arg_indices -call 1708 pith_auto_len int 1 1707 -iconst 1709 0 -store __for_idx_154 1709 -store __for_len_154 1708 -store __for_iter_154 1707 +iconst 1670 0 +store aidx 1670 +load 1671 arg_indices +call 1672 pith_auto_len int 1 1671 +iconst 1673 0 +store __for_idx_154 1673 +store __for_len_154 1672 +store __for_iter_154 1671 label L2759 -load 1710 __for_idx_154 -load 1711 __for_len_154 -lt 1712 1710 1711 -brif 1712 L2760 L2762 +load 1674 __for_idx_154 +load 1675 __for_len_154 +lt 1676 1674 1675 +brif 1676 L2760 L2762 label L2760 -load 1713 __for_iter_154 -load 1714 __for_idx_154 -call 1715 pith_list_get_value unknown 2 1713 1714 -store ai 1715 -load 1716 arg_node -load 1717 ai -call 1718 ast_get_node struct:Node 1 1717 -call 1719 pith_struct_release void 1 1716 -store arg_node 1718 -load 1720 ai -store arg_expr 1720 -load 1721 arg_node -load 1722 arg_node -field 1723 1722 0 string kind -strref 1724 m13s419 -call 1725 pith_cstring_eq bool 2 1723 1724 -call 1726 pith_cstring_release void 1 1724 -brif 1725 L2764 L2765 +load 1677 __for_iter_154 +load 1678 __for_idx_154 +call 1679 pith_list_get_value unknown 2 1677 1678 +store ai 1679 +load 1680 arg_node +load 1681 ai +call 1682 ast_get_node struct:Node 1 1681 +call 1683 pith_struct_release void 1 1680 +store arg_node 1682 +load 1684 ai +store arg_expr 1684 +load 1685 arg_node +load 1686 arg_node +field 1687 1686 0 string kind +strref 1688 m13s419 +call 1689 pith_cstring_eq bool 2 1687 1688 +call 1690 pith_cstring_release void 1 1688 +brif 1689 L2764 L2765 label L2764 -load 1727 arg_node -load 1728 arg_node -field 1729 1728 16 list children -call 1730 pith_list_len int 1 1729 -iconst 1731 0 -gt 1732 1730 1731 -brif 1732 L2767 L2768 +load 1691 arg_node +load 1692 arg_node +field 1693 1692 16 list children +call 1694 pith_list_len int 1 1693 +iconst 1695 0 +gt 1696 1694 1695 +brif 1696 L2767 L2768 label L2767 -load 1733 arg_node -load 1734 arg_node -field 1735 1734 16 list children -iconst 1736 0 -call 1737 pith_list_get_value int 2 1735 1736 -store arg_expr 1737 +load 1697 arg_node +load 1698 arg_node +field 1699 1698 16 list children +iconst 1700 0 +call 1701 pith_list_get_value int 2 1699 1700 +store arg_expr 1701 jmp L2766 label L2768 label L2766 jmp L2763 label L2765 label L2763 -load 1738 arg_expr -load 1739 scope_id -call 1740 checker_c_check_expr int 2 1738 1739 -store atype 1740 -load 1741 atype -call 1742 types_is_error_type bool 1 1741 -iconst 1743 0 -eq 1744 1742 1743 -brif 1744 L2770 L2771 +load 1702 arg_expr +load 1703 scope_id +call 1704 checker_c_check_expr int 2 1702 1703 +store atype 1704 +load 1705 atype +call 1706 types_is_error_type bool 1 1705 +iconst 1707 0 +eq 1708 1706 1707 +brif 1708 L2770 L2771 label L2770 -load 1745 aidx -load 1746 param_types -call 1747 pith_list_len int 1 1746 -lt 1748 1745 1747 -brif 1748 L2773 L2774 +load 1709 aidx +load 1710 param_types +call 1711 pith_list_len int 1 1710 +lt 1712 1709 1711 +brif 1712 L2773 L2774 label L2773 -load 1749 atype -load 1750 param_types -load 1751 aidx -call 1752 pith_list_get_value int 2 1750 1751 -neq 1753 1749 1752 -brif 1753 L2776 L2777 +load 1713 atype +load 1714 param_types +load 1715 aidx +call 1716 pith_list_get_value int 2 1714 1715 +neq 1717 1713 1716 +brif 1717 L2776 L2777 label L2776 -load 1754 atype -load 1755 param_types -load 1756 aidx -call 1757 pith_list_get_value int 2 1755 1756 -call 1758 checker_types_structurally_equal bool 2 1754 1757 -iconst 1759 0 -eq 1760 1758 1759 -brif 1760 L2779 L2780 +load 1718 atype +load 1719 param_types +load 1720 aidx +call 1721 pith_list_get_value int 2 1719 1720 +call 1722 checker_types_structurally_equal bool 2 1718 1721 +iconst 1723 0 +eq 1724 1722 1723 +brif 1724 L2779 L2780 label L2779 -strref 1761 m13s281 -strref 1762 m13s418 -load 1763 param_types -load 1764 aidx -call 1765 pith_list_get_value int 2 1763 1764 -call 1766 types_get_type_name string 1 1765 -concat 1767 1762 1766 -call 1768 pith_cstring_release void 1 1762 -call 1769 pith_cstring_release void 1 1766 -strref 1770 m13s278 -concat 1771 1767 1770 -call 1772 pith_cstring_release void 1 1767 -call 1773 pith_cstring_release void 1 1770 -load 1774 atype -call 1775 types_get_type_name string 1 1774 -concat 1776 1771 1775 -call 1777 pith_cstring_release void 1 1771 -call 1778 pith_cstring_release void 1 1775 -call 1779 checker_diagnostics_report_error unknown 2 1761 1776 -call 1780 pith_cstring_release void 1 1761 -call 1781 pith_cstring_release void 1 1776 +strref 1725 m13s281 +strref 1726 m13s418 +load 1727 param_types +load 1728 aidx +call 1729 pith_list_get_value int 2 1727 1728 +call 1730 types_get_type_name string 1 1729 +concat 1731 1726 1730 +call 1732 pith_cstring_release void 1 1726 +call 1733 pith_cstring_release void 1 1730 +strref 1734 m13s278 +concat 1735 1731 1734 +call 1736 pith_cstring_release void 1 1731 +call 1737 pith_cstring_release void 1 1734 +load 1738 atype +call 1739 types_get_type_name string 1 1738 +concat 1740 1735 1739 +call 1741 pith_cstring_release void 1 1735 +call 1742 pith_cstring_release void 1 1739 +call 1743 checker_diagnostics_report_error unknown 2 1725 1740 +call 1744 pith_cstring_release void 1 1725 +call 1745 pith_cstring_release void 1 1740 jmp L2778 label L2780 label L2778 @@ -51126,168 +51090,182 @@ label L2772 jmp L2769 label L2771 label L2769 -load 1782 aidx -iconst 1783 1 -add 1784 1782 1783 -store aidx 1784 +load 1746 aidx +iconst 1747 1 +add 1748 1746 1747 +store aidx 1748 label L2761 -load 1785 __for_idx_154 -iconst 1786 1 -add 1787 1785 1786 -store __for_idx_154 1787 +load 1749 __for_idx_154 +iconst 1750 1 +add 1751 1749 1750 +store __for_idx_154 1751 jmp L2759 label L2762 -load 1788 ret_type -load 1789 method_name -call 1790 pith_cstring_release void 1 1789 -load 1791 recv_node -call 1792 pith_struct_release void 1 1791 -load 1793 arg_indices -call 1794 pith_list_release_handle void 1 1793 -load 1795 recv_name -call 1796 pith_cstring_release void 1 1795 -load 1797 module_path -call 1798 pith_cstring_release void 1 1797 -load 1799 qualified_name -call 1800 pith_cstring_release void 1 1799 -load 1801 module_name -call 1802 pith_cstring_release void 1 1801 -load 1803 generic_name -call 1804 pith_cstring_release void 1 1803 -load 1805 recv_info -call 1806 pith_struct_release void 1 1805 -load 1807 payload_types -call 1808 pith_list_release_handle void 1 1807 -load 1809 pa_node -call 1810 pith_struct_release void 1 1809 -load 1811 type_name -call 1812 pith_cstring_release void 1 1811 -load 1813 key +load 1752 ret_type +load 1753 method_name +call 1754 pith_cstring_release void 1 1753 +load 1755 recv_node +call 1756 pith_struct_release void 1 1755 +load 1757 arg_indices +call 1758 pith_list_release_handle void 1 1757 +load 1759 recv_name +call 1760 pith_cstring_release void 1 1759 +load 1761 module_path +call 1762 pith_cstring_release void 1 1761 +load 1763 qualified_name +call 1764 pith_cstring_release void 1 1763 +load 1765 module_name +call 1766 pith_cstring_release void 1 1765 +load 1767 generic_name +call 1768 pith_cstring_release void 1 1767 +load 1769 recv_info +call 1770 pith_struct_release void 1 1769 +load 1771 payload_types +call 1772 pith_list_release_handle void 1 1771 +load 1773 pa_node +call 1774 pith_struct_release void 1 1773 +load 1775 type_name +call 1776 pith_cstring_release void 1 1775 +load 1777 key +call 1778 pith_cstring_release void 1 1777 +load 1779 base_name +call 1780 pith_cstring_release void 1 1779 +load 1781 method_node +call 1782 pith_struct_release void 1 1781 +load 1783 struct_params +call 1784 pith_list_release_handle void 1 1783 +load 1785 struct_args +call 1786 pith_list_release_handle void 1 1785 +load 1787 base +call 1788 pith_cstring_release void 1 1787 +load 1789 sdecl +call 1790 pith_struct_release void 1 1789 +load 1791 param_types +call 1792 pith_list_release_handle void 1 1791 +load 1793 arg_node +call 1794 pith_struct_release void 1 1793 +ret 1752 +label L2746 +label L2744 +strref 1795 m13s405 +load 1796 receiver_type +call 1797 types_get_type_name string 1 1796 +strref 1798 m13s514 +concat 1799 1797 1798 +call 1800 pith_cstring_release void 1 1797 +call 1801 pith_cstring_release void 1 1798 +load 1802 method_name +concat 1803 1799 1802 +call 1804 pith_cstring_release void 1 1799 +strref 1805 m13s325 +concat 1806 1803 1805 +call 1807 pith_cstring_release void 1 1803 +call 1808 pith_cstring_release void 1 1805 +call 1809 checker_diagnostics_report_error unknown 2 1795 1806 +call 1810 pith_cstring_release void 1 1795 +call 1811 pith_cstring_release void 1 1806 +load 1812 types_TID_ERR +load 1813 method_name call 1814 pith_cstring_release void 1 1813 -load 1815 base_name -call 1816 pith_cstring_release void 1 1815 -load 1817 method_node -call 1818 pith_struct_release void 1 1817 -load 1819 struct_params -call 1820 pith_list_release_handle void 1 1819 -load 1821 struct_args -call 1822 pith_list_release_handle void 1 1821 -load 1823 base +load 1815 recv_node +call 1816 pith_struct_release void 1 1815 +load 1817 arg_indices +call 1818 pith_list_release_handle void 1 1817 +load 1819 recv_name +call 1820 pith_cstring_release void 1 1819 +load 1821 module_path +call 1822 pith_cstring_release void 1 1821 +load 1823 qualified_name call 1824 pith_cstring_release void 1 1823 -load 1825 sdecl -call 1826 pith_struct_release void 1 1825 -load 1827 param_types -call 1828 pith_list_release_handle void 1 1827 -load 1829 arg_node +load 1825 module_name +call 1826 pith_cstring_release void 1 1825 +load 1827 generic_name +call 1828 pith_cstring_release void 1 1827 +load 1829 recv_info call 1830 pith_struct_release void 1 1829 -ret 1788 -label L2746 -label L2744 -strref 1831 m13s405 -load 1832 receiver_type -call 1833 types_get_type_name string 1 1832 -strref 1834 m13s514 -concat 1835 1833 1834 -call 1836 pith_cstring_release void 1 1833 -call 1837 pith_cstring_release void 1 1834 -load 1838 method_name -concat 1839 1835 1838 -call 1840 pith_cstring_release void 1 1835 -strref 1841 m13s325 -concat 1842 1839 1841 -call 1843 pith_cstring_release void 1 1839 -call 1844 pith_cstring_release void 1 1841 -call 1845 checker_diagnostics_report_error unknown 2 1831 1842 -call 1846 pith_cstring_release void 1 1831 -call 1847 pith_cstring_release void 1 1842 -load 1848 types_TID_ERR -load 1849 method_name -call 1850 pith_cstring_release void 1 1849 -load 1851 recv_node -call 1852 pith_struct_release void 1 1851 -load 1853 arg_indices -call 1854 pith_list_release_handle void 1 1853 -load 1855 recv_name +load 1831 payload_types +call 1832 pith_list_release_handle void 1 1831 +load 1833 pa_node +call 1834 pith_struct_release void 1 1833 +load 1835 type_name +call 1836 pith_cstring_release void 1 1835 +load 1837 key +call 1838 pith_cstring_release void 1 1837 +load 1839 base_name +call 1840 pith_cstring_release void 1 1839 +load 1841 method_node +call 1842 pith_struct_release void 1 1841 +load 1843 struct_params +call 1844 pith_list_release_handle void 1 1843 +load 1845 struct_args +call 1846 pith_list_release_handle void 1 1845 +load 1847 base +call 1848 pith_cstring_release void 1 1847 +load 1849 sdecl +call 1850 pith_struct_release void 1 1849 +load 1851 param_types +call 1852 pith_list_release_handle void 1 1851 +load 1853 arg_node +call 1854 pith_struct_release void 1 1853 +ret 1812 +load 1855 method_name call 1856 pith_cstring_release void 1 1855 -load 1857 module_path -call 1858 pith_cstring_release void 1 1857 -load 1859 qualified_name -call 1860 pith_cstring_release void 1 1859 -load 1861 module_name +load 1857 recv_node +call 1858 pith_struct_release void 1 1857 +load 1859 arg_indices +call 1860 pith_list_release_handle void 1 1859 +load 1861 recv_name call 1862 pith_cstring_release void 1 1861 -load 1863 generic_name +load 1863 module_path call 1864 pith_cstring_release void 1 1863 -load 1865 recv_info -call 1866 pith_struct_release void 1 1865 -load 1867 payload_types -call 1868 pith_list_release_handle void 1 1867 -load 1869 pa_node -call 1870 pith_struct_release void 1 1869 -load 1871 type_name -call 1872 pith_cstring_release void 1 1871 -load 1873 key -call 1874 pith_cstring_release void 1 1873 -load 1875 base_name -call 1876 pith_cstring_release void 1 1875 -load 1877 method_node -call 1878 pith_struct_release void 1 1877 -load 1879 struct_params -call 1880 pith_list_release_handle void 1 1879 -load 1881 struct_args -call 1882 pith_list_release_handle void 1 1881 -load 1883 base -call 1884 pith_cstring_release void 1 1883 -load 1885 sdecl -call 1886 pith_struct_release void 1 1885 -load 1887 param_types +load 1865 qualified_name +call 1866 pith_cstring_release void 1 1865 +load 1867 module_name +call 1868 pith_cstring_release void 1 1867 +load 1869 generic_name +call 1870 pith_cstring_release void 1 1869 +load 1871 recv_info +call 1872 pith_struct_release void 1 1871 +load 1873 payload_types +call 1874 pith_list_release_handle void 1 1873 +load 1875 pa_node +call 1876 pith_struct_release void 1 1875 +load 1877 type_name +call 1878 pith_cstring_release void 1 1877 +load 1879 key +call 1880 pith_cstring_release void 1 1879 +load 1881 base_name +call 1882 pith_cstring_release void 1 1881 +load 1883 method_node +call 1884 pith_struct_release void 1 1883 +load 1885 struct_params +call 1886 pith_list_release_handle void 1 1885 +load 1887 struct_args call 1888 pith_list_release_handle void 1 1887 -load 1889 arg_node -call 1890 pith_struct_release void 1 1889 -ret 1848 -load 1891 method_name -call 1892 pith_cstring_release void 1 1891 -load 1893 recv_node -call 1894 pith_struct_release void 1 1893 -load 1895 arg_indices -call 1896 pith_list_release_handle void 1 1895 -load 1897 recv_name -call 1898 pith_cstring_release void 1 1897 -load 1899 module_path -call 1900 pith_cstring_release void 1 1899 -load 1901 qualified_name -call 1902 pith_cstring_release void 1 1901 -load 1903 module_name -call 1904 pith_cstring_release void 1 1903 -load 1905 generic_name -call 1906 pith_cstring_release void 1 1905 -load 1907 recv_info -call 1908 pith_struct_release void 1 1907 -load 1909 payload_types -call 1910 pith_list_release_handle void 1 1909 -load 1911 pa_node -call 1912 pith_struct_release void 1 1911 -load 1913 type_name -call 1914 pith_cstring_release void 1 1913 -load 1915 key -call 1916 pith_cstring_release void 1 1915 -load 1917 base_name -call 1918 pith_cstring_release void 1 1917 -load 1919 method_node -call 1920 pith_struct_release void 1 1919 -load 1921 struct_params -call 1922 pith_list_release_handle void 1 1921 -load 1923 struct_args -call 1924 pith_list_release_handle void 1 1923 -load 1925 base -call 1926 pith_cstring_release void 1 1925 -load 1927 sdecl -call 1928 pith_struct_release void 1 1927 -load 1929 param_types -call 1930 pith_list_release_handle void 1 1929 -load 1931 arg_node -call 1932 pith_struct_release void 1 1931 -iconst 1933 0 -ret 1933 +load 1889 base +call 1890 pith_cstring_release void 1 1889 +load 1891 sdecl +call 1892 pith_struct_release void 1 1891 +load 1893 param_types +call 1894 pith_list_release_handle void 1 1893 +load 1895 arg_node +call 1896 pith_struct_release void 1 1895 +iconst 1897 0 +ret 1897 +endfunc +func checker_method_table_answered 1 bool +param result +load 1 result +iconst 2 0 +gte 3 1 2 +load 4 result +call 5 types_is_error_type bool 1 4 +iconst 6 0 +eq 7 5 6 +and 8 3 7 +ret 8 +iconst 9 0 +ret 9 endfunc func checker_check_string_method_call 3 int param method diff --git a/self-host/checker.pith b/self-host/checker.pith index 6edc6953..c65ac275 100644 --- a/self-host/checker.pith +++ b/self-host/checker.pith @@ -3194,35 +3194,38 @@ fn check_method_call(node: Node, scope_id: Int) -> Int: if dispatch_type == tid_bool: return check_bool_method_call(method_name, arg_indices, scope_id) - # collection methods + # collection methods. each table answers -1 for "not my method"; + # a non-error type id means it handled the call. (a table that + # reports an error and returns TID_ERR still falls through to the + # user-defined lookup — a long-standing wart, kept for now.) if recv_info.kind == "list": result := check_list_method_call(method_name, recv_info, arg_indices, scope_id) - if result >= 0 and is_error_type(result) == false: + if method_table_answered(result): return result if recv_info.kind == "map": result := check_map_method_call(method_name, recv_info, arg_indices, scope_id) - if result >= 0 and is_error_type(result) == false: + if method_table_answered(result): return result if recv_info.kind == "set": result := check_set_method_call(method_name, recv_info, arg_indices, scope_id) - if result >= 0 and is_error_type(result) == false: + if method_table_answered(result): return result # channel methods if recv_info.kind == "channel": ch_result := check_channel_method_call(method_name, recv_info, arg_indices, scope_id) - if ch_result >= 0 and is_error_type(ch_result) == false: + if method_table_answered(ch_result): return ch_result if recv_info.kind == "task": task_result := check_task_method_call(method_name, recv_info, arg_indices, scope_id) - if task_result >= 0 and is_error_type(task_result) == false: + if method_table_answered(task_result): return task_result # sync primitive methods if recv_info.kind == "struct": sync_result := check_sync_primitive_method_call(recv_info.name, method_name, arg_indices, scope_id) - if sync_result >= 0 and is_error_type(sync_result) == false: + if method_table_answered(sync_result): return sync_result # enum variant constructors: Shape.Circle(2.5). the receiver is the enum @@ -3303,6 +3306,13 @@ fn check_method_call(node: Node, scope_id: Int) -> Int: # string methods # --------------------------------------------------------------- +# a method table's answer counts when it is a real non-error type id: +# negative means "not my method, keep dispatching". this predicate is +# the whole contract — the set-insert segfault came from one gate +# testing it wrong. +fn method_table_answered(result: Int) -> Bool: + return result >= 0 and is_error_type(result) == false + fn check_string_method_call(method: String, args: List[Int], scope_id: Int) -> Int: tid_int := lookup_type_id("Int") tid_string := lookup_type_id("String") diff --git a/std/algo.pith b/std/algo.pith index ef015dd9..c82f6fc6 100644 --- a/std/algo.pith +++ b/std/algo.pith @@ -117,6 +117,32 @@ fn merge_strings(a: List[String], b: List[String]) -> List[String]: # =============================================================== # Binary search on a sorted list. Returns index or -1. +# # sort a list by a string key drawn from each element, ascending. +# # ties keep their input order (the sort is stable), so sorting by a +# # secondary key first gives a compound order. +pub fn sort_by_key[T](items: List[T], key: fn(T) -> String) -> List[T]: + mut out: List[T] := [] + for item in items: + item_key := key(item) + mut placed := false + mut i := 0 + while i < out.len() and not placed: + # strcmp instead of `<`: inside a generic body the checker + # suppresses type parameters, and an ordered string compare + # currently falls back to comparing pointers there + if strcmp(item_key, key(out[i])) < 0: + out.insert(i, item) + placed = true + i = i + 1 + if not placed: + out.push(item) + return out + +# # sort by a string key, descending: the reverse of sort_by_key. +pub fn sort_by_key_desc[T](items: List[T], key: fn(T) -> String) -> List[T]: + return sort_by_key(items, key).reverse() + +# # index of a value in a sorted int list, or -1. pub fn binary_search(list: List[Int], value: Int) -> Int: mut lo := 0 mut hi := list.len() - 1 diff --git a/tests/cases/test_sort_by_key.pith b/tests/cases/test_sort_by_key.pith new file mode 100644 index 00000000..e74eec0e --- /dev/null +++ b/tests/cases/test_sort_by_key.pith @@ -0,0 +1,16 @@ +# std.algo.sort_by_key: string-keyed struct sorts, ascending and +# descending, with stable ties. +import std.algo as algo + +struct Person: + name: String + role: String + +fn main(): + people := [Person("carol", "dev"), Person("alice", "ops"), Person("bob", "dev"), Person("alice", "dev")] + for p in algo.sort_by_key(people, fn(x: Person) => x.name): + print("{p.name} {p.role}") + for p in algo.sort_by_key_desc(people, fn(x: Person) => x.name): + print("desc {p.name}") + empty: List[Person] := [] + print("{algo.sort_by_key(empty, fn(x: Person) => x.name).len()}") diff --git a/tests/expected/test_sort_by_key.txt b/tests/expected/test_sort_by_key.txt new file mode 100644 index 00000000..6f39e226 --- /dev/null +++ b/tests/expected/test_sort_by_key.txt @@ -0,0 +1,9 @@ +alice ops +alice dev +bob dev +carol dev +desc carol +desc bob +desc alice +desc alice +0 diff --git a/tools/parq/parq_lib.pith b/tools/parq/parq_lib.pith index cfaa5925..bfb2cc8b 100644 --- a/tools/parq/parq_lib.pith +++ b/tools/parq/parq_lib.pith @@ -2,17 +2,18 @@ # a channel and reports results back on another. the fourth dogfood # program, aimed at spawn, channels, tasks, and shared state — the one # surface the earlier programs never exercised hard. +import std.algo as algo import std.fs as fs -## one unit of work: a named computation over a payload. +# # one unit of work: a named computation over a payload. pub struct Job: name: String op: String payload: String -## a finished job: its name, the computed value, and the worker that -## ran it (used for a total-count sanity check, never for output -## ordering — scheduling isn't deterministic). +# # a finished job: its name, the computed value, and the worker that +# # ran it (used for a total-count sanity check, never for output +# # ordering — scheduling isn't deterministic). pub struct Done: name: String value: Int @@ -51,7 +52,7 @@ fn collatz_steps(n: Int) -> Int: steps = steps + 1 return steps -## run one job to its integer result. +# # run one job to its integer result. pub fn run_job(job: Job) -> Int: if job.op == "checksum": return checksum(job.payload) @@ -71,7 +72,7 @@ fn worker(id: Int, jobs: Channel[Job], results: Channel[Done]): return results.send(Done(job.name, run_job(job), id)) -## parse the jobs file: one job per line, `name op payload`. +# # parse the jobs file: one job per line, `name op payload`. pub fn load_jobs(path: String) -> List[Job]!: mut out: List[Job] := [] for line in fs.read(path)!.split(chr(10)): @@ -88,9 +89,9 @@ pub fn load_jobs(path: String) -> List[Job]!: out.push(Job(t.substring(0, sp1), rest.substring(0, sp2), rest.substring(sp2 + 1, rest.len()))) return out -## dispatch every job to a pool of `workers` workers and gather the -## results, sorted by job name so output is deterministic no matter -## which worker won which job. +# # dispatch every job to a pool of `workers` workers and gather the +# # results, sorted by job name so output is deterministic no matter +# # which worker won which job. pub fn run_pool(all_jobs: List[Job], workers: Int) -> List[Done]: jobs := Channel[Job](all_jobs.len() + workers) results := Channel[Done](all_jobs.len()) @@ -121,21 +122,10 @@ fn worker_entry(id: Int, jobs: Channel[Job], results: Channel[Done]) -> Int: return id fn sort_done(items: List[Done]) -> List[Done]: - mut out: List[Done] := [] - for d in items: - mut placed := false - mut i := 0 - while i < out.len() and not placed: - if d.name < out[i].name: - out.insert(i, d) - placed = true - i = i + 1 - if not placed: - out.push(d) - return out + return algo.sort_by_key(items, fn(d: Done) => d.name) -## the report: per-job lines sorted by name, then totals. worker ids -## are counted but never printed per-job. +# # the report: per-job lines sorted by name, then totals. worker ids +# # are counted but never printed per-job. pub fn render(done: List[Done], workers: Int) -> String: nl := chr(10) mut out := "" diff --git a/tools/sitegen/sitegen_lib.pith b/tools/sitegen/sitegen_lib.pith index 143ed5db..c782d2e5 100644 --- a/tools/sitegen/sitegen_lib.pith +++ b/tools/sitegen/sitegen_lib.pith @@ -1,11 +1,12 @@ # sitegen_lib — the site generator's logic as an importable module so # the cli binary and the golden test share one implementation. +import std.algo as algo import std.fs as fs import std.toml as toml import std.json as json import std.regex as regex -## one rendered post: parsed front matter plus the body as html. +# # one rendered post: parsed front matter plus the body as html. pub struct Post: slug: String title: String @@ -13,7 +14,7 @@ pub struct Post: tags: List[String] body_html: String -## site-wide settings from site.toml. +# # site-wide settings from site.toml. pub struct Site: title: String base_url: String @@ -22,7 +23,7 @@ pub struct Site: # a post starts with a `---` block of `key: value` lines; everything # after the closing `---` is markdown. -## split a raw post into its front-matter map and markdown body. +# # split a raw post into its front-matter map and markdown body. pub fn split_front_matter(raw: String) -> (Map[String, String], String): mut meta: Map[String, String] := {} lines := raw.split(chr(10)) @@ -61,7 +62,7 @@ fn escape_html(s: String) -> String: return s.replace("&", "&").replace("<", "<").replace(">", ">") # inline spans: `code`, **bold**, *italic*, [text](url) -## render inline spans: `code`, **bold**, *italic*, [text](url). +# # render inline spans: `code`, **bold**, *italic*, [text](url). pub fn render_inline(s: String) -> String: mut out := "" mut i := 0 @@ -105,7 +106,7 @@ fn index_from(s: String, needle: String, start: Int) -> Int: if s[i] == needle: return i i = i + 1 - return -1 + return - 1 fn find_marker(s: String, marker: String, start: Int) -> Int: mut i := start @@ -113,10 +114,10 @@ fn find_marker(s: String, marker: String, start: Int) -> Int: if s[i] == "*" and s[i + 1] == "*": return i i = i + 1 - return -1 + return - 1 -## render the markdown subset to html: headings, paragraphs, -## lists, and fenced code blocks. +# # render the markdown subset to html: headings, paragraphs, +# # lists, and fenced code blocks. pub fn render_markdown(md: String) -> String: mut out := "" mut in_code := false @@ -170,7 +171,7 @@ fn placeholder(name: String) -> String: rb := chr(125) return lb + lb + name + rb + rb -## fill the layout's placeholders with the site and page values. +# # fill the layout's placeholders with the site and page values. pub fn apply_layout(layout: String, site: Site, title: String, content: String) -> String: mut page := layout.replace(placeholder("site_title"), site.title) page = page.replace(placeholder("title"), title) @@ -227,19 +228,8 @@ fn load_posts(content_dir: String) -> List[Post]!: return sort_by_date(posts) fn sort_by_date(posts: List[Post]) -> List[Post]: - # newest first; insertion sort keeps it simple for small sites - mut out: List[Post] := [] - for p in posts: - mut placed := false - mut i := 0 - while i < out.len() and not placed: - if p.date > out[i].date: - out.insert(i, p) - placed = true - i = i + 1 - if not placed: - out.push(p) - return out + # newest first + return algo.sort_by_key_desc(posts, fn(p: Post) => p.date) fn collect_tags(posts: List[Post]) -> Map[String, List[String]]: mut by_tag: Map[String, List[String]] := {} @@ -250,8 +240,8 @@ fn collect_tags(posts: List[Post]) -> Map[String, List[String]]: by_tag.insert(t, slugs) return by_tag -## build the whole site: posts, index, tag pages, and json feed. -## returns the number of posts rendered. +# # build the whole site: posts, index, tag pages, and json feed. +# # returns the number of posts rendered. pub fn build_site(site_dir: String, out_dir: String) -> Int!: config := toml.parse(fs.read(site_dir + "/site.toml")!)