001 /*
002 * This file is part of the Jikes RVM project (http://jikesrvm.org).
003 *
004 * This file is licensed to You under the Eclipse Public License (EPL);
005 * You may not use this file except in compliance with the License. You
006 * may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/eclipse-1.0.php
009 *
010 * See the COPYRIGHT.txt file distributed with this work for information
011 * regarding copyright ownership.
012 */
013 package org.mmtk.plan.refcount;
014
015 import org.mmtk.utility.Constants;
016 import org.mmtk.utility.deque.*;
017
018 import org.vmmagic.pragma.*;
019 import org.vmmagic.unboxed.*;
020
021 /**
022 * This class implements a dec-buffer for a reference counting collector
023 *
024 * @see org.mmtk.plan.TransitiveClosure
025 */
026 @Uninterruptible
027 public final class RCDecBuffer extends ObjectReferenceBuffer implements Constants {
028 /****************************************************************************
029 *
030 * Initialization
031 */
032
033 /**
034 * Constructor
035 *
036 * @param queue The shared deque that is used.
037 */
038 public RCDecBuffer(SharedDeque queue) {
039 super("dec", queue);
040 }
041
042 @Override
043 @Inline
044 protected void process(ObjectReference object) {
045 if (RCBase.isRCObject(object)) {
046 push(object);
047 }
048 }
049 }