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