Pb.word64.shl: def of bendonnect-rpc@0.1.0.0 Import: import bendonnect-rpc@0.1.0.0/src/pb.bend as Pb Lines 80-87 of bendonnect-rpc@0.1.0.0/src/pb.bend: https://jend.leeeet.dev/read.txt?path=bendonnect-rpc@0.1.0.0/src/pb.bend&start_line=80&end_line=87 import Base import bend-kit-protobuf@0.1.0.0/protobuf.bend as Pb # Logical shifts, n in 0..63. def word64.shl(w: Pb.Word64, +n: U32) -> Pb.Word64: Pb.Word64{+h, +l} = w +a = (n .&. 31 : U32) +big = U32.is_ge(n, 32) Pb.Word64{ Bool.pick(U32, big, (l << U32.to_nat(a) : U32), ((h << U32.to_nat(a)) .|. (l >> U32.to_nat((32 - a : U32))) : U32)), Bool.pick(U32, big, 0, (l << U32.to_nat(a) : U32))} Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_ge https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.shln https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.shrn https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=bend-kit-protobuf@0.2.0.0/protobuf.bend&name=Word64