Chromium Code Reviews| Index: src/globals.h |
| diff --git a/src/globals.h b/src/globals.h |
| index c6a5444d8ac94fa2d29cefa2a5350b6033a27f51..efbde1622a6d6ae0122ec3488477989beeae62c8 100644 |
| --- a/src/globals.h |
| +++ b/src/globals.h |
| @@ -1043,6 +1043,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 |