`PreservedMarks::push` is called only in one place. In `G1FullGCMarker::mark_object`:
```
if (obj->mark_must_be_preserved(mark) &&
// It is not necessary to preserve marks for objects in regions we do not
// compact because we do not change their headers (i.e. forward them).
_collector->is_compacting(obj)) {
preserved_stack()->push(obj, mark);
}
```
One can merge `mark_must_be_preserved` into `push`, which becomes `push_if_necessary`.
```
if (obj->mark_must_be_preserved(mark) &&
// It is not necessary to preserve marks for objects in regions we do not
// compact because we do not change their headers (i.e. forward them).
_collector->is_compacting(obj)) {
preserved_stack()->push(obj, mark);
}
```
One can merge `mark_must_be_preserved` into `push`, which becomes `push_if_necessary`.