1 /* 2 * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 20 * CA 95054 USA or visit www.sun.com if you need additional information or 21 * have any questions. 22 * 23 */ 24 25 class ciEnv; 26 class ciObjectFactory; 27 class ciConstantPoolCache; 28 class ciCPCache; 29 30 class ciField; 31 class ciConstant; 32 class ciFlags; 33 class ciExceptionHandler; 34 class ciCallProfile; 35 class ciSignature; 36 37 class ciBytecodeStream; 38 class ciSignatureStream; 39 class ciExceptionHandlerStream; 40 41 class ciTypeFlow; 42 43 class ciObject; 44 class ciNullObject; 45 class ciInstance; 46 class ciMethod; 47 class ciMethodData; 48 class ciReceiverTypeData; // part of ciMethodData 49 class ciSymbol; 50 class ciArray; 51 class ciObjArray; 52 class ciTypeArray; 53 class ciType; 54 class ciReturnAddress; 55 class ciKlass; 56 class ciInstanceKlass; 57 class ciMethodKlass; 58 class ciSymbolKlass; 59 class ciArrayKlass; 60 class ciObjArrayKlass; 61 class ciTypeArrayKlass; 62 class ciKlassKlass; 63 class ciInstanceKlassKlass; 64 class ciArrayKlassKlass; 65 class ciObjArrayKlassKlass; 66 class ciTypeArrayKlassKlass; 67 68 // Simulate Java Language style package-private access with 69 // friend declarations. 70 // This is a great idea but gcc and other C++ compilers give an 71 // error for being friends with yourself, so this macro does not 72 // compile on some platforms. 73 74 // Everyone gives access to ciObjectFactory 75 #define CI_PACKAGE_ACCESS \ 76 friend class ciObjectFactory; 77 78 // These are the packages that have access to ciEnv 79 // Any more access must be given explicitly. 80 #define CI_PACKAGE_ACCESS_TO \ 81 friend class ciObjectFactory; \ 82 friend class ciConstantPoolCache; \ 83 friend class ciField; \ 84 friend class ciConstant; \ 85 friend class ciFlags; \ 86 friend class ciExceptionHandler; \ 87 friend class ciCallProfile; \ 88 friend class ciSignature; \ 89 friend class ciBytecodeStream; \ 90 friend class ciSignatureStream; \ 91 friend class ciExceptionHandlerStream; \ 92 friend class ciObject; \ 93 friend class ciNullObject; \ 94 friend class ciInstance; \ 95 friend class ciMethod; \ 96 friend class ciMethodData; \ 97 friend class ciReceiverTypeData; \ 98 friend class ciSymbol; \ 99 friend class ciArray; \ 100 friend class ciObjArray; \ 101 friend class ciTypeArray; \ 102 friend class ciType; \ 103 friend class ciReturnAddress; \ 104 friend class ciKlass; \ 105 friend class ciInstanceKlass; \ 106 friend class ciMethodKlass; \ 107 friend class ciSymbolKlass; \ 108 friend class ciArrayKlass; \ 109 friend class ciObjArrayKlass; \ 110 friend class ciTypeArrayKlass; \ 111 friend class ciKlassKlass; \ 112 friend class ciInstanceKlassKlass; \ 113 friend class ciArrayKlassKlass; \ 114 friend class ciObjArrayKlassKlass; \ 115 friend class ciTypeArrayKlassKlass;