summaryrefslogtreecommitdiff
path: root/deps/v8/src/heap/pretenuring-handler-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/heap/pretenuring-handler-inl.h')
-rw-r--r--deps/v8/src/heap/pretenuring-handler-inl.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/deps/v8/src/heap/pretenuring-handler-inl.h b/deps/v8/src/heap/pretenuring-handler-inl.h
index 33c337ec46..45ac665404 100644
--- a/deps/v8/src/heap/pretenuring-handler-inl.h
+++ b/deps/v8/src/heap/pretenuring-handler-inl.h
@@ -16,7 +16,7 @@
namespace v8 {
namespace internal {
-void PretenturingHandler::UpdateAllocationSite(
+void PretenuringHandler::UpdateAllocationSite(
Map map, HeapObject object, PretenuringFeedbackMap* pretenuring_feedback) {
DCHECK_NE(pretenuring_feedback, &global_pretenuring_feedback_);
#ifdef DEBUG
@@ -24,7 +24,7 @@ void PretenturingHandler::UpdateAllocationSite(
DCHECK_IMPLIES(chunk->IsToPage(),
v8_flags.minor_mc ||
chunk->IsFlagSet(MemoryChunk::PAGE_NEW_NEW_PROMOTION));
- DCHECK_IMPLIES(!chunk->InYoungGeneration(),
+ DCHECK_IMPLIES(!v8_flags.minor_mc && !chunk->InYoungGeneration(),
chunk->IsFlagSet(MemoryChunk::PAGE_NEW_OLD_PROMOTION));
#endif
if (!v8_flags.allocation_site_pretenuring ||
@@ -34,6 +34,7 @@ void PretenturingHandler::UpdateAllocationSite(
AllocationMemento memento_candidate =
FindAllocationMemento<kForGC>(map, object);
if (memento_candidate.is_null()) return;
+ DCHECK(map.IsJSObjectMap());
// Entering cached feedback is used in the parallel case. We are not allowed
// to dereference the allocation site and rather have to postpone all checks
@@ -42,9 +43,9 @@ void PretenturingHandler::UpdateAllocationSite(
(*pretenuring_feedback)[AllocationSite::unchecked_cast(Object(key))]++;
}
-template <PretenturingHandler::FindMementoMode mode>
-AllocationMemento PretenturingHandler::FindAllocationMemento(
- Map map, HeapObject object) {
+template <PretenuringHandler::FindMementoMode mode>
+AllocationMemento PretenuringHandler::FindAllocationMemento(Map map,
+ HeapObject object) {
Address object_address = object.address();
Address memento_address =
object_address + ALIGN_TO_ALLOCATION_ALIGNMENT(object.SizeFromMap(map));