| ... | ... | @@ -1331,12 +1331,16 @@ pub const Value = extern union { |
| 1331 | 1331 | |
| 1332 | 1332 | .one, |
| 1333 | 1333 | .bool_true, |
| 1334 | | => { |
| 1335 | | const info = ty.intInfo(target); |
| 1336 | | return switch (info.signedness) { |
| 1337 | | .signed => info.bits >= 2, |
| 1338 | | .unsigned => info.bits >= 1, |
| 1339 | | }; |
| 1334 | => switch (ty.zigTypeTag()) { |
| 1335 | .Int => { |
| 1336 | const info = ty.intInfo(target); |
| 1337 | return switch (info.signedness) { |
| 1338 | .signed => info.bits >= 2, |
| 1339 | .unsigned => info.bits >= 1, |
| 1340 | }; |
| 1341 | }, |
| 1342 | .ComptimeInt => return true, |
| 1343 | else => unreachable, |
| 1340 | 1344 | }, |
| 1341 | 1345 | |
| 1342 | 1346 | .int_u64 => switch (ty.zigTypeTag()) { |
| ... | ... | @@ -1390,13 +1394,17 @@ pub const Value = extern union { |
| 1390 | 1394 | .decl_ref, |
| 1391 | 1395 | .function, |
| 1392 | 1396 | .variable, |
| 1393 | | => { |
| 1394 | | const info = ty.intInfo(target); |
| 1395 | | const ptr_bits = target.cpu.arch.ptrBitWidth(); |
| 1396 | | return switch (info.signedness) { |
| 1397 | | .signed => info.bits > ptr_bits, |
| 1398 | | .unsigned => info.bits >= ptr_bits, |
| 1399 | | }; |
| 1397 | => switch (ty.zigTypeTag()) { |
| 1398 | .Int => { |
| 1399 | const info = ty.intInfo(target); |
| 1400 | const ptr_bits = target.cpu.arch.ptrBitWidth(); |
| 1401 | return switch (info.signedness) { |
| 1402 | .signed => info.bits > ptr_bits, |
| 1403 | .unsigned => info.bits >= ptr_bits, |
| 1404 | }; |
| 1405 | }, |
| 1406 | .ComptimeInt => return true, |
| 1407 | else => unreachable, |
| 1400 | 1408 | }, |
| 1401 | 1409 | |
| 1402 | 1410 | else => unreachable, |