╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Value.zig ────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭ find file ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ ╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │ │ │http│ ssh │ │ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
2552 var buffer: InternPool.Key.Int.Storage.BigIntSpace = undefined; 2553 const big_int = int.storage.toBigInt(&buffer); 2554 return big_int.fitsInTwosComp(info.signedness, info.bits); 2555 }, 2556 .aggregate => |aggregate| { 2557 assert(ty.zigTypeTag(zcu) == .vector); 2558 return switch (aggregate.storage) { 2559 .bytes => |bytes| for (bytes.toSlice(ty.vectorLen(zcu), &zcu.intern_pool), 0..) |byte, i| { 2560 if (byte == 0) continue; 2561 const actual_needed_bits = std.math.log2(byte) + 1 + @intFromBool(info.signedness == .signed); 2562 if (info.bits >= actual_needed_bits) continue; 2563 if (vector_index) |vi| vi.* = i; 2564 break false; 2565 } else true, 2566 .elems, .repeated_elem => for (switch (aggregate.storage) { 2567 .bytes => unreachable, 2568 .elems => |elems| elems, 2569 .repeated_elem => |elem| @as(*const [1]InternPool.Index, &elem), 2570 }, 0..) |elem, i| { 2571 if (Value.fromInterned(elem).intFitsInType(ty.scalarType(zcu), null, zcu)) continue; 2572 if (vector_index) |vi| vi.* = i; 2573 break false; 2574 } else true, 2575 }; 2576 }, 2577 else => unreachable, 2578 }, 2579 } 2580 } 2581