Chromium Code Reviews| Index: src/globals.h |
| diff --git a/src/globals.h b/src/globals.h |
| index 0e24d5933269ca0f00cb212e03173dba50da1c45..e78844cf20c00bb7177dcbef38f15baa64908030 100644 |
| --- a/src/globals.h |
| +++ b/src/globals.h |
| @@ -1058,6 +1058,14 @@ inline FunctionKind WithObjectLiteralBit(FunctionKind kind) { |
| DCHECK(IsValidFunctionKind(kind)); |
| return kind; |
| } |
| + |
| +inline uint32_t ObjectHash(Address address) { |
| + // All objects are at least pointer aligned, so we can remove the trailing |
| + // zeros. |
| + return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> |
| + kPointerSizeLog2); |
| +} |
| + |
| } // namespace internal |
| } // namespace v8 |