| ... | @@ -2391,12 +2391,15 @@ pub const Value = extern union { | ... | @@ -2391,12 +2391,15 @@ pub const Value = extern union { |
| 2391 | union_obj.val.hash(active_field_ty, hasher, mod); | 2391 | union_obj.val.hash(active_field_ty, hasher, mod); |
| 2392 | }, | 2392 | }, |
| 2393 | .Fn => { | 2393 | .Fn => { |
| 2394 | const func: *Module.Fn = val.castTag(.function).?.data; | 2394 | // Note that his hashes the *Fn/*ExternFn rather than the *Decl. This is |
| 2395 | // Note that his hashes the *Fn rather than the *Decl. This is | | |
| 2396 | // to differentiate function bodies from function pointers. | 2395 | // to differentiate function bodies from function pointers. |
| 2397 | // This is currently redundant since we already hash the zig type tag | 2396 | // This is currently redundant since we already hash the zig type tag |
| 2398 | // at the top of this function. | 2397 | // at the top of this function. |
| 2399 | std.hash.autoHash(hasher, func); | 2398 | if (val.castTag(.function)) |func| { |
| | 2399 | std.hash.autoHash(hasher, func.data); |
| | 2400 | } else if (val.castTag(.extern_fn)) |func| { |
| | 2401 | std.hash.autoHash(hasher, func.data); |
| | 2402 | } else unreachable; |
| 2400 | }, | 2403 | }, |
| 2401 | .Frame => { | 2404 | .Frame => { |
| 2402 | @panic("TODO implement hashing frame values"); | 2405 | @panic("TODO implement hashing frame values"); |