Reviewers: titzer,
Message:
I will add a repo test in a follow up cl.
Description:
Set promotion queue limit before migrating object.
BUG=
Please review this at https://codereview.chromium.org/357263004/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+5, -1 lines):
M src/heap.cc
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index
9612ce4c78771e10ba2dbce984052bdec185bb84..c4cf04ad1ed20bff3f813ee8ab220a01d416aa57
100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -1992,13 +1992,17 @@ class ScavengingVisitor : public StaticVisitorBase {
target = EnsureDoubleAligned(heap, target, allocation_size);
}
+ // Order is important here: Set the promotion limit before migrating
+ // the object. Otherwise we may end up overwriting promotion queue
+ // entries when we migrate the object.
+ heap->promotion_queue()->SetNewLimit(heap->new_space()->top());
+
// Order is important: slot might be inside of the target if target
// was allocated over a dead object and slot comes from the store
// buffer.
*slot = target;
MigrateObject(heap, object, target, object_size);
- heap->promotion_queue()->SetNewLimit(heap->new_space()->top());
heap->IncrementSemiSpaceCopiedObjectSize(object_size);
return true;
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.