╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ codegen.zig ──────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭ find file ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ ╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │ │ │http│ ssh │ │ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
1254 for (tuple_type.types.get(ip)) |field_ty_ip| { 1255 const field_ty: Type = .fromInterned(field_ty_ip); 1256 offset = field_ty.abiAlignment(zcu).forward(offset); 1257 items_len += (flattenType(items_buf[items_len..], field_ty, zcu, opts.increaseOffset( 1258 offset, 1259 )) orelse return null).len; 1260 offset += field_ty.abiSize(zcu); 1261 } 1262 return items_buf[0..items_len]; 1263 }, 1264 .union_type => { 1265 const loaded_union = ip.loadUnionType(ty.toIntern()); 1266 return switch (loaded_union.layout) { 1267 .auto, .@"extern" => return null, 1268 .@"packed" => return flattenType(items_buf, .fromInterned( 1269 loaded_union.packed_backing_int_type, 1270 ), zcu, opts), 1271 }; 1272 }, 1273 .opaque_type, .spirv_type, .func_type => return null, 1274 .enum_type => return flattenType(items_buf, .fromInterned( 1275 ip.loadEnumType(ty.toIntern()).int_tag_type, 1276 ), zcu, opts), 1277 .error_set_type, .inferred_error_set_type => { 1278 if (items_buf.len < 1) return null; 1279 const items = items_buf[0..1]; 1280 items.* = .{.{ .offset = opts.offset, .type = ty }}; 1281 return items; 1282 }, 1283 .anyframe_type, 1284 // values, not types 1285 .undef, 1286 .simple_value, 1287 .@"extern", 1288 .func, 1289 .int, 1290 .err, 1291 .error_union, 1292 .enum_literal, 1293 .enum_tag, 1294 .float, 1295 .ptr, 1296 .slice, 1297 .opt, 1298 .aggregate, 1299 .un, 1300 .bitpack, 1301 // memoization, not types 1302 .memoized_call, 1303 => unreachable, 1304 } 1305 } 1306 1307 test { 1308 _ = aarch64; 1309 _ = loongarch; 1310 } 1311