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