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

Unified Diff: src/globals.h

Issue 1577853007: [heap] Parallel newspace evacuation, semispace copy, and compaction \o/ (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Disable concurrent sweeping for test expecting # of pages released 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 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
« 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