hashCall computes the composite bucket key for an async call. Only string, int, double, uint, and bool argument values contribute to the hash. More complex types rely on a richer notion of equivalence (e.g. unordered maps, proto equality, custom types) that a byte-level hash cannot capture safely,
(id int64, overload string, args []ref.Val)
| 200 | // that a byte-level hash cannot capture safely, so they are intentionally excluded from the key |
| 201 | // and are instead disambiguated within the bucket by asyncCallState.matches. |
| 202 | func hashCall(id int64, overload string, args []ref.Val) uint64 { |
| 203 | result := 31*uint64(id) + hashString(overload) |
| 204 | for _, arg := range args { |
| 205 | result = 31*result + hashArg(arg) |
| 206 | } |
| 207 | return result |
| 208 | } |
| 209 | |
| 210 | // findInBucket returns the call state in the bucket matching the same node id and call identity, |
| 211 | // or nil if no match is present. |