g1_specialized_oop_closures.hpp revision 1261
430N/A/*
430N/A * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved.
430N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
430N/A *
430N/A * This code is free software; you can redistribute it and/or modify it
430N/A * under the terms of the GNU General Public License version 2 only, as
430N/A * published by the Free Software Foundation.
430N/A *
430N/A * This code is distributed in the hope that it will be useful, but WITHOUT
430N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
430N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
430N/A * version 2 for more details (a copy is included in the LICENSE file that
430N/A * accompanied this code).
430N/A *
430N/A * You should have received a copy of the GNU General Public License version
430N/A * 2 along with this work; if not, write to the Free Software Foundation,
430N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
430N/A *
430N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
430N/A * CA 95054 USA or visit www.sun.com if you need additional information or
430N/A * have any questions.
430N/A *
430N/A */
430N/A
430N/A// The following OopClosure types get specialized versions of
430N/A// "oop_oop_iterate" that invoke the closures' do_oop methods
430N/A// non-virtually, using a mechanism defined in this file. Extend these
430N/A// macros in the obvious way to add specializations for new closures.
430N/A
430N/A// Forward declarations.
430N/Aenum G1Barrier {
430N/A G1BarrierNone, G1BarrierRS, G1BarrierEvac
430N/A};
430N/A
430N/Atemplate<bool do_gen_barrier, G1Barrier barrier,
430N/A bool do_mark_forwardee>
430N/Aclass G1ParCopyClosure;
430N/Aclass G1ParScanClosure;
430N/Aclass G1ParPushHeapRSClosure;
430N/A
430N/Atypedef G1ParCopyClosure<false, G1BarrierEvac, false> G1ParScanHeapEvacClosure;
430N/A
430N/Aclass FilterIntoCSClosure;
430N/Aclass FilterOutOfRegionClosure;
430N/Aclass FilterInHeapRegionAndIntoCSClosure;
430N/Aclass FilterAndMarkInHeapRegionAndIntoCSClosure;
430N/A
430N/A#ifdef FURTHER_SPECIALIZED_OOP_OOP_ITERATE_CLOSURES
430N/A#error "FURTHER_SPECIALIZED_OOP_OOP_ITERATE_CLOSURES already defined."
430N/A#endif
430N/A
430N/A#define FURTHER_SPECIALIZED_OOP_OOP_ITERATE_CLOSURES(f) \
430N/A f(G1ParScanHeapEvacClosure,_nv) \
430N/A f(G1ParScanClosure,_nv) \
430N/A f(G1ParPushHeapRSClosure,_nv) \
430N/A f(FilterIntoCSClosure,_nv) \
430N/A f(FilterOutOfRegionClosure,_nv) \
430N/A f(FilterInHeapRegionAndIntoCSClosure,_nv) \
430N/A f(FilterAndMarkInHeapRegionAndIntoCSClosure,_nv)
430N/A
430N/A#ifdef FURTHER_SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES
430N/A#error "FURTHER_SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES already defined."
430N/A#endif
430N/A
430N/A#define FURTHER_SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES(f)
430N/A