Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Unified Diff: src/globals.h

Issue 1640563004: Reland of "[heap] Parallel newspace evacuation, semispace copy, and compaction \o/" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Convert bogus DCHECK into proper branch Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « BUILD.gn ('k') | src/heap/array-buffer-tracker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « BUILD.gn ('k') | src/heap/array-buffer-tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698