annotate agent/src/share/classes/sun/jvm/hotspot/oops/ConstantPool.java @ 0:a61af66fc99e jdk7-b24

Initial load
author duke
date Sat, 01 Dec 2007 00:00:00 +0000
parents
children ba764ed4b6f2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
2 * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved.
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
a61af66fc99e Initial load
duke
parents:
diff changeset
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
a61af66fc99e Initial load
duke
parents:
diff changeset
20 * CA 95054 USA or visit www.sun.com if you need additional information or
a61af66fc99e Initial load
duke
parents:
diff changeset
21 * have any questions.
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
a61af66fc99e Initial load
duke
parents:
diff changeset
25 package sun.jvm.hotspot.oops;
a61af66fc99e Initial load
duke
parents:
diff changeset
26
a61af66fc99e Initial load
duke
parents:
diff changeset
27 import java.io.*;
a61af66fc99e Initial load
duke
parents:
diff changeset
28 import java.util.*;
a61af66fc99e Initial load
duke
parents:
diff changeset
29 import sun.jvm.hotspot.debugger.*;
a61af66fc99e Initial load
duke
parents:
diff changeset
30 import sun.jvm.hotspot.runtime.*;
a61af66fc99e Initial load
duke
parents:
diff changeset
31 import sun.jvm.hotspot.types.*;
a61af66fc99e Initial load
duke
parents:
diff changeset
32 import sun.jvm.hotspot.utilities.*;
a61af66fc99e Initial load
duke
parents:
diff changeset
33
a61af66fc99e Initial load
duke
parents:
diff changeset
34 // A ConstantPool is an array containing class constants
a61af66fc99e Initial load
duke
parents:
diff changeset
35 // as described in the class file
a61af66fc99e Initial load
duke
parents:
diff changeset
36
a61af66fc99e Initial load
duke
parents:
diff changeset
37 public class ConstantPool extends Array implements ClassConstants {
a61af66fc99e Initial load
duke
parents:
diff changeset
38 // Used for debugging this code
a61af66fc99e Initial load
duke
parents:
diff changeset
39 private static final boolean DEBUG = false;
a61af66fc99e Initial load
duke
parents:
diff changeset
40
a61af66fc99e Initial load
duke
parents:
diff changeset
41 protected void debugMessage(String message) {
a61af66fc99e Initial load
duke
parents:
diff changeset
42 System.out.println(message);
a61af66fc99e Initial load
duke
parents:
diff changeset
43 }
a61af66fc99e Initial load
duke
parents:
diff changeset
44
a61af66fc99e Initial load
duke
parents:
diff changeset
45 static {
a61af66fc99e Initial load
duke
parents:
diff changeset
46 VM.registerVMInitializedObserver(new Observer() {
a61af66fc99e Initial load
duke
parents:
diff changeset
47 public void update(Observable o, Object data) {
a61af66fc99e Initial load
duke
parents:
diff changeset
48 initialize(VM.getVM().getTypeDataBase());
a61af66fc99e Initial load
duke
parents:
diff changeset
49 }
a61af66fc99e Initial load
duke
parents:
diff changeset
50 });
a61af66fc99e Initial load
duke
parents:
diff changeset
51 }
a61af66fc99e Initial load
duke
parents:
diff changeset
52
a61af66fc99e Initial load
duke
parents:
diff changeset
53 private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
a61af66fc99e Initial load
duke
parents:
diff changeset
54 Type type = db.lookupType("constantPoolOopDesc");
a61af66fc99e Initial load
duke
parents:
diff changeset
55 tags = new OopField(type.getOopField("_tags"), 0);
a61af66fc99e Initial load
duke
parents:
diff changeset
56 cache = new OopField(type.getOopField("_cache"), 0);
a61af66fc99e Initial load
duke
parents:
diff changeset
57 poolHolder = new OopField(type.getOopField("_pool_holder"), 0);
a61af66fc99e Initial load
duke
parents:
diff changeset
58 headerSize = type.getSize();
a61af66fc99e Initial load
duke
parents:
diff changeset
59 elementSize = db.getOopSize();
a61af66fc99e Initial load
duke
parents:
diff changeset
60 }
a61af66fc99e Initial load
duke
parents:
diff changeset
61
a61af66fc99e Initial load
duke
parents:
diff changeset
62 ConstantPool(OopHandle handle, ObjectHeap heap) {
a61af66fc99e Initial load
duke
parents:
diff changeset
63 super(handle, heap);
a61af66fc99e Initial load
duke
parents:
diff changeset
64 }
a61af66fc99e Initial load
duke
parents:
diff changeset
65
a61af66fc99e Initial load
duke
parents:
diff changeset
66 public boolean isConstantPool() { return true; }
a61af66fc99e Initial load
duke
parents:
diff changeset
67
a61af66fc99e Initial load
duke
parents:
diff changeset
68 private static OopField tags;
a61af66fc99e Initial load
duke
parents:
diff changeset
69 private static OopField cache;
a61af66fc99e Initial load
duke
parents:
diff changeset
70 private static OopField poolHolder;
a61af66fc99e Initial load
duke
parents:
diff changeset
71
a61af66fc99e Initial load
duke
parents:
diff changeset
72
a61af66fc99e Initial load
duke
parents:
diff changeset
73 private static long headerSize;
a61af66fc99e Initial load
duke
parents:
diff changeset
74 private static long elementSize;
a61af66fc99e Initial load
duke
parents:
diff changeset
75
a61af66fc99e Initial load
duke
parents:
diff changeset
76 public TypeArray getTags() { return (TypeArray) tags.getValue(this); }
a61af66fc99e Initial load
duke
parents:
diff changeset
77 public ConstantPoolCache getCache() { return (ConstantPoolCache) cache.getValue(this); }
a61af66fc99e Initial load
duke
parents:
diff changeset
78 public Klass getPoolHolder() { return (Klass) poolHolder.getValue(this); }
a61af66fc99e Initial load
duke
parents:
diff changeset
79
a61af66fc99e Initial load
duke
parents:
diff changeset
80 private long indexOffset(long index) {
a61af66fc99e Initial load
duke
parents:
diff changeset
81 if (Assert.ASSERTS_ENABLED) {
a61af66fc99e Initial load
duke
parents:
diff changeset
82 Assert.that(index > 0 && index < getLength(), "invalid cp index");
a61af66fc99e Initial load
duke
parents:
diff changeset
83 }
a61af66fc99e Initial load
duke
parents:
diff changeset
84 return (index * elementSize) + headerSize;
a61af66fc99e Initial load
duke
parents:
diff changeset
85 }
a61af66fc99e Initial load
duke
parents:
diff changeset
86
a61af66fc99e Initial load
duke
parents:
diff changeset
87 public ConstantTag getTagAt(long index) {
a61af66fc99e Initial load
duke
parents:
diff changeset
88 return new ConstantTag(getTags().getByteAt((int) index));
a61af66fc99e Initial load
duke
parents:
diff changeset
89 }
a61af66fc99e Initial load
duke
parents:
diff changeset
90
a61af66fc99e Initial load
duke
parents:
diff changeset
91 public Oop getObjAt(long index){
a61af66fc99e Initial load
duke
parents:
diff changeset
92 return getHeap().newOop(getHandle().getOopHandleAt(indexOffset(index)));
a61af66fc99e Initial load
duke
parents:
diff changeset
93 }
a61af66fc99e Initial load
duke
parents:
diff changeset
94
a61af66fc99e Initial load
duke
parents:
diff changeset
95 public Symbol getSymbolAt(long index) {
a61af66fc99e Initial load
duke
parents:
diff changeset
96 return (Symbol) getObjAt(index);
a61af66fc99e Initial load
duke
parents:
diff changeset
97 }
a61af66fc99e Initial load
duke
parents:
diff changeset
98
a61af66fc99e Initial load
duke
parents:
diff changeset
99 public int getIntAt(long index){
a61af66fc99e Initial load
duke
parents:
diff changeset
100 return getHandle().getJIntAt(indexOffset(index));
a61af66fc99e Initial load
duke
parents:
diff changeset
101 }
a61af66fc99e Initial load
duke
parents:
diff changeset
102
a61af66fc99e Initial load
duke
parents:
diff changeset
103 public float getFloatAt(long index){
a61af66fc99e Initial load
duke
parents:
diff changeset
104 return getHandle().getJFloatAt(indexOffset(index));
a61af66fc99e Initial load
duke
parents:
diff changeset
105 }
a61af66fc99e Initial load
duke
parents:
diff changeset
106
a61af66fc99e Initial load
duke
parents:
diff changeset
107 public long getLongAt(long index) {
a61af66fc99e Initial load
duke
parents:
diff changeset
108 int oneHalf = getHandle().getJIntAt(indexOffset(index + 1));
a61af66fc99e Initial load
duke
parents:
diff changeset
109 int otherHalf = getHandle().getJIntAt(indexOffset(index));
a61af66fc99e Initial load
duke
parents:
diff changeset
110 // buildLongFromIntsPD accepts higher address value, lower address value
a61af66fc99e Initial load
duke
parents:
diff changeset
111 // in that order.
a61af66fc99e Initial load
duke
parents:
diff changeset
112 return VM.getVM().buildLongFromIntsPD(oneHalf, otherHalf);
a61af66fc99e Initial load
duke
parents:
diff changeset
113 }
a61af66fc99e Initial load
duke
parents:
diff changeset
114
a61af66fc99e Initial load
duke
parents:
diff changeset
115 public double getDoubleAt(long index) {
a61af66fc99e Initial load
duke
parents:
diff changeset
116 return Double.longBitsToDouble(getLongAt(index));
a61af66fc99e Initial load
duke
parents:
diff changeset
117 }
a61af66fc99e Initial load
duke
parents:
diff changeset
118
a61af66fc99e Initial load
duke
parents:
diff changeset
119 public int getFieldOrMethodAt(int which) {
a61af66fc99e Initial load
duke
parents:
diff changeset
120 if (DEBUG) {
a61af66fc99e Initial load
duke
parents:
diff changeset
121 System.err.print("ConstantPool.getFieldOrMethodAt(" + which + "): new index = ");
a61af66fc99e Initial load
duke
parents:
diff changeset
122 }
a61af66fc99e Initial load
duke
parents:
diff changeset
123 int i = -1;
a61af66fc99e Initial load
duke
parents:
diff changeset
124 ConstantPoolCache cache = getCache();
a61af66fc99e Initial load
duke
parents:
diff changeset
125 if (cache == null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
126 i = which;
a61af66fc99e Initial load
duke
parents:
diff changeset
127 } else {
a61af66fc99e Initial load
duke
parents:
diff changeset
128 // change byte-ordering and go via cache
a61af66fc99e Initial load
duke
parents:
diff changeset
129 i = cache.getEntryAt(0xFFFF & VM.getVM().getBytes().swapShort((short) which)).getConstantPoolIndex();
a61af66fc99e Initial load
duke
parents:
diff changeset
130 }
a61af66fc99e Initial load
duke
parents:
diff changeset
131 if (Assert.ASSERTS_ENABLED) {
a61af66fc99e Initial load
duke
parents:
diff changeset
132 Assert.that(getTagAt(i).isFieldOrMethod(), "Corrupted constant pool");
a61af66fc99e Initial load
duke
parents:
diff changeset
133 }
a61af66fc99e Initial load
duke
parents:
diff changeset
134 if (DEBUG) {
a61af66fc99e Initial load
duke
parents:
diff changeset
135 System.err.println(i);
a61af66fc99e Initial load
duke
parents:
diff changeset
136 }
a61af66fc99e Initial load
duke
parents:
diff changeset
137 int res = getIntAt(i);
a61af66fc99e Initial load
duke
parents:
diff changeset
138 if (DEBUG) {
a61af66fc99e Initial load
duke
parents:
diff changeset
139 System.err.println("ConstantPool.getFieldOrMethodAt(" + i + "): result = " + res);
a61af66fc99e Initial load
duke
parents:
diff changeset
140 }
a61af66fc99e Initial load
duke
parents:
diff changeset
141 return res;
a61af66fc99e Initial load
duke
parents:
diff changeset
142 }
a61af66fc99e Initial load
duke
parents:
diff changeset
143
a61af66fc99e Initial load
duke
parents:
diff changeset
144 public int getNameAndTypeAt(int which) {
a61af66fc99e Initial load
duke
parents:
diff changeset
145 if (Assert.ASSERTS_ENABLED) {
a61af66fc99e Initial load
duke
parents:
diff changeset
146 Assert.that(getTagAt(which).isNameAndType(), "Corrupted constant pool");
a61af66fc99e Initial load
duke
parents:
diff changeset
147 }
a61af66fc99e Initial load
duke
parents:
diff changeset
148 int i = getIntAt(which);
a61af66fc99e Initial load
duke
parents:
diff changeset
149 if (DEBUG) {
a61af66fc99e Initial load
duke
parents:
diff changeset
150 System.err.println("ConstantPool.getNameAndTypeAt(" + which + "): result = " + i);
a61af66fc99e Initial load
duke
parents:
diff changeset
151 }
a61af66fc99e Initial load
duke
parents:
diff changeset
152 return i;
a61af66fc99e Initial load
duke
parents:
diff changeset
153 }
a61af66fc99e Initial load
duke
parents:
diff changeset
154
a61af66fc99e Initial load
duke
parents:
diff changeset
155 public Symbol getNameRefAt(int which) {
a61af66fc99e Initial load
duke
parents:
diff changeset
156 int refIndex = getNameAndTypeAt(getNameAndTypeRefIndexAt(which));
a61af66fc99e Initial load
duke
parents:
diff changeset
157 int nameIndex = extractLowShortFromInt(refIndex);
a61af66fc99e Initial load
duke
parents:
diff changeset
158 return getSymbolAt(nameIndex);
a61af66fc99e Initial load
duke
parents:
diff changeset
159 }
a61af66fc99e Initial load
duke
parents:
diff changeset
160
a61af66fc99e Initial load
duke
parents:
diff changeset
161 public Symbol getSignatureRefAt(int which) {
a61af66fc99e Initial load
duke
parents:
diff changeset
162 int refIndex = getNameAndTypeAt(getNameAndTypeRefIndexAt(which));
a61af66fc99e Initial load
duke
parents:
diff changeset
163 int sigIndex = extractHighShortFromInt(refIndex);
a61af66fc99e Initial load
duke
parents:
diff changeset
164 return getSymbolAt(sigIndex);
a61af66fc99e Initial load
duke
parents:
diff changeset
165 }
a61af66fc99e Initial load
duke
parents:
diff changeset
166
a61af66fc99e Initial load
duke
parents:
diff changeset
167 // returns null, if not resolved.
a61af66fc99e Initial load
duke
parents:
diff changeset
168 public Klass getKlassRefAt(int which) {
a61af66fc99e Initial load
duke
parents:
diff changeset
169 if( ! getTagAt(which).isKlass()) return null;
a61af66fc99e Initial load
duke
parents:
diff changeset
170 return (Klass) getObjAt(which);
a61af66fc99e Initial load
duke
parents:
diff changeset
171 }
a61af66fc99e Initial load
duke
parents:
diff changeset
172
a61af66fc99e Initial load
duke
parents:
diff changeset
173 // returns null, if not resolved.
a61af66fc99e Initial load
duke
parents:
diff changeset
174 public InstanceKlass getFieldOrMethodKlassRefAt(int which) {
a61af66fc99e Initial load
duke
parents:
diff changeset
175 int refIndex = getFieldOrMethodAt(which);
a61af66fc99e Initial load
duke
parents:
diff changeset
176 int klassIndex = extractLowShortFromInt(refIndex);
a61af66fc99e Initial load
duke
parents:
diff changeset
177 return (InstanceKlass) getKlassRefAt(klassIndex);
a61af66fc99e Initial load
duke
parents:
diff changeset
178 }
a61af66fc99e Initial load
duke
parents:
diff changeset
179
a61af66fc99e Initial load
duke
parents:
diff changeset
180 // returns null, if not resolved.
a61af66fc99e Initial load
duke
parents:
diff changeset
181 public Method getMethodRefAt(int which) {
a61af66fc99e Initial load
duke
parents:
diff changeset
182 InstanceKlass klass = getFieldOrMethodKlassRefAt(which);
a61af66fc99e Initial load
duke
parents:
diff changeset
183 if (klass == null) return null;
a61af66fc99e Initial load
duke
parents:
diff changeset
184 Symbol name = getNameRefAt(which);
a61af66fc99e Initial load
duke
parents:
diff changeset
185 Symbol sig = getSignatureRefAt(which);
a61af66fc99e Initial load
duke
parents:
diff changeset
186 return klass.findMethod(name, sig);
a61af66fc99e Initial load
duke
parents:
diff changeset
187 }
a61af66fc99e Initial load
duke
parents:
diff changeset
188
a61af66fc99e Initial load
duke
parents:
diff changeset
189 // returns null, if not resolved.
a61af66fc99e Initial load
duke
parents:
diff changeset
190 public Field getFieldRefAt(int which) {
a61af66fc99e Initial load
duke
parents:
diff changeset
191 InstanceKlass klass = getFieldOrMethodKlassRefAt(which);
a61af66fc99e Initial load
duke
parents:
diff changeset
192 if (klass == null) return null;
a61af66fc99e Initial load
duke
parents:
diff changeset
193 Symbol name = getNameRefAt(which);
a61af66fc99e Initial load
duke
parents:
diff changeset
194 Symbol sig = getSignatureRefAt(which);
a61af66fc99e Initial load
duke
parents:
diff changeset
195 return klass.findField(name, sig);
a61af66fc99e Initial load
duke
parents:
diff changeset
196 }
a61af66fc99e Initial load
duke
parents:
diff changeset
197
a61af66fc99e Initial load
duke
parents:
diff changeset
198 public int getNameAndTypeRefIndexAt(int index) {
a61af66fc99e Initial load
duke
parents:
diff changeset
199 int refIndex = getFieldOrMethodAt(index);
a61af66fc99e Initial load
duke
parents:
diff changeset
200 if (DEBUG) {
a61af66fc99e Initial load
duke
parents:
diff changeset
201 System.err.println("ConstantPool.getNameAndTypeRefIndexAt(" + index + "): refIndex = " + refIndex);
a61af66fc99e Initial load
duke
parents:
diff changeset
202 }
a61af66fc99e Initial load
duke
parents:
diff changeset
203 int i = extractHighShortFromInt(refIndex);
a61af66fc99e Initial load
duke
parents:
diff changeset
204 if (DEBUG) {
a61af66fc99e Initial load
duke
parents:
diff changeset
205 System.err.println("ConstantPool.getNameAndTypeRefIndexAt(" + index + "): result = " + i);
a61af66fc99e Initial load
duke
parents:
diff changeset
206 }
a61af66fc99e Initial load
duke
parents:
diff changeset
207 return i;
a61af66fc99e Initial load
duke
parents:
diff changeset
208 }
a61af66fc99e Initial load
duke
parents:
diff changeset
209
a61af66fc99e Initial load
duke
parents:
diff changeset
210 /** Lookup for entries consisting of (name_index, signature_index) */
a61af66fc99e Initial load
duke
parents:
diff changeset
211 public int getNameRefIndexAt(int index) {
a61af66fc99e Initial load
duke
parents:
diff changeset
212 int refIndex = getNameAndTypeAt(index);
a61af66fc99e Initial load
duke
parents:
diff changeset
213 if (DEBUG) {
a61af66fc99e Initial load
duke
parents:
diff changeset
214 System.err.println("ConstantPool.getNameRefIndexAt(" + index + "): refIndex = " + refIndex);
a61af66fc99e Initial load
duke
parents:
diff changeset
215 }
a61af66fc99e Initial load
duke
parents:
diff changeset
216 int i = extractLowShortFromInt(refIndex);
a61af66fc99e Initial load
duke
parents:
diff changeset
217 if (DEBUG) {
a61af66fc99e Initial load
duke
parents:
diff changeset
218 System.err.println("ConstantPool.getNameRefIndexAt(" + index + "): result = " + i);
a61af66fc99e Initial load
duke
parents:
diff changeset
219 }
a61af66fc99e Initial load
duke
parents:
diff changeset
220 return i;
a61af66fc99e Initial load
duke
parents:
diff changeset
221 }
a61af66fc99e Initial load
duke
parents:
diff changeset
222
a61af66fc99e Initial load
duke
parents:
diff changeset
223 /** Lookup for entries consisting of (name_index, signature_index) */
a61af66fc99e Initial load
duke
parents:
diff changeset
224 public int getSignatureRefIndexAt(int index) {
a61af66fc99e Initial load
duke
parents:
diff changeset
225 int refIndex = getNameAndTypeAt(index);
a61af66fc99e Initial load
duke
parents:
diff changeset
226 if (DEBUG) {
a61af66fc99e Initial load
duke
parents:
diff changeset
227 System.err.println("ConstantPool.getSignatureRefIndexAt(" + index + "): refIndex = " + refIndex);
a61af66fc99e Initial load
duke
parents:
diff changeset
228 }
a61af66fc99e Initial load
duke
parents:
diff changeset
229 int i = extractHighShortFromInt(refIndex);
a61af66fc99e Initial load
duke
parents:
diff changeset
230 if (DEBUG) {
a61af66fc99e Initial load
duke
parents:
diff changeset
231 System.err.println("ConstantPool.getSignatureRefIndexAt(" + index + "): result = " + i);
a61af66fc99e Initial load
duke
parents:
diff changeset
232 }
a61af66fc99e Initial load
duke
parents:
diff changeset
233 return i;
a61af66fc99e Initial load
duke
parents:
diff changeset
234 }
a61af66fc99e Initial load
duke
parents:
diff changeset
235
a61af66fc99e Initial load
duke
parents:
diff changeset
236 final private static String[] nameForTag = new String[] {
a61af66fc99e Initial load
duke
parents:
diff changeset
237 };
a61af66fc99e Initial load
duke
parents:
diff changeset
238
a61af66fc99e Initial load
duke
parents:
diff changeset
239 private String nameForTag(int tag) {
a61af66fc99e Initial load
duke
parents:
diff changeset
240 switch (tag) {
a61af66fc99e Initial load
duke
parents:
diff changeset
241 case JVM_CONSTANT_Utf8: return "JVM_CONSTANT_Utf8";
a61af66fc99e Initial load
duke
parents:
diff changeset
242 case JVM_CONSTANT_Unicode: return "JVM_CONSTANT_Unicode";
a61af66fc99e Initial load
duke
parents:
diff changeset
243 case JVM_CONSTANT_Integer: return "JVM_CONSTANT_Integer";
a61af66fc99e Initial load
duke
parents:
diff changeset
244 case JVM_CONSTANT_Float: return "JVM_CONSTANT_Float";
a61af66fc99e Initial load
duke
parents:
diff changeset
245 case JVM_CONSTANT_Long: return "JVM_CONSTANT_Long";
a61af66fc99e Initial load
duke
parents:
diff changeset
246 case JVM_CONSTANT_Double: return "JVM_CONSTANT_Double";
a61af66fc99e Initial load
duke
parents:
diff changeset
247 case JVM_CONSTANT_Class: return "JVM_CONSTANT_Class";
a61af66fc99e Initial load
duke
parents:
diff changeset
248 case JVM_CONSTANT_String: return "JVM_CONSTANT_String";
a61af66fc99e Initial load
duke
parents:
diff changeset
249 case JVM_CONSTANT_Fieldref: return "JVM_CONSTANT_Fieldref";
a61af66fc99e Initial load
duke
parents:
diff changeset
250 case JVM_CONSTANT_Methodref: return "JVM_CONSTANT_Methodref";
a61af66fc99e Initial load
duke
parents:
diff changeset
251 case JVM_CONSTANT_InterfaceMethodref: return "JVM_CONSTANT_InterfaceMethodref";
a61af66fc99e Initial load
duke
parents:
diff changeset
252 case JVM_CONSTANT_NameAndType: return "JVM_CONSTANT_NameAndType";
a61af66fc99e Initial load
duke
parents:
diff changeset
253 case JVM_CONSTANT_Invalid: return "JVM_CONSTANT_Invalid";
a61af66fc99e Initial load
duke
parents:
diff changeset
254 case JVM_CONSTANT_UnresolvedClass: return "JVM_CONSTANT_UnresolvedClass";
a61af66fc99e Initial load
duke
parents:
diff changeset
255 case JVM_CONSTANT_ClassIndex: return "JVM_CONSTANT_ClassIndex";
a61af66fc99e Initial load
duke
parents:
diff changeset
256 case JVM_CONSTANT_UnresolvedString: return "JVM_CONSTANT_UnresolvedString";
a61af66fc99e Initial load
duke
parents:
diff changeset
257 case JVM_CONSTANT_StringIndex: return "JVM_CONSTANT_StringIndex";
a61af66fc99e Initial load
duke
parents:
diff changeset
258 }
a61af66fc99e Initial load
duke
parents:
diff changeset
259 throw new InternalError("unknown tag");
a61af66fc99e Initial load
duke
parents:
diff changeset
260 }
a61af66fc99e Initial load
duke
parents:
diff changeset
261
a61af66fc99e Initial load
duke
parents:
diff changeset
262 public void iterateFields(OopVisitor visitor, boolean doVMFields) {
a61af66fc99e Initial load
duke
parents:
diff changeset
263 super.iterateFields(visitor, doVMFields);
a61af66fc99e Initial load
duke
parents:
diff changeset
264 if (doVMFields) {
a61af66fc99e Initial load
duke
parents:
diff changeset
265 visitor.doOop(tags, true);
a61af66fc99e Initial load
duke
parents:
diff changeset
266 visitor.doOop(cache, true);
a61af66fc99e Initial load
duke
parents:
diff changeset
267 visitor.doOop(poolHolder, true);
a61af66fc99e Initial load
duke
parents:
diff changeset
268
a61af66fc99e Initial load
duke
parents:
diff changeset
269 final int length = (int) getLength();
a61af66fc99e Initial load
duke
parents:
diff changeset
270 // zero'th pool entry is always invalid. ignore it.
a61af66fc99e Initial load
duke
parents:
diff changeset
271 for (int index = 1; index < length; index++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
272 int ctag = (int) getTags().getByteAt((int) index);
a61af66fc99e Initial load
duke
parents:
diff changeset
273 switch (ctag) {
a61af66fc99e Initial load
duke
parents:
diff changeset
274 case JVM_CONSTANT_ClassIndex:
a61af66fc99e Initial load
duke
parents:
diff changeset
275 case JVM_CONSTANT_StringIndex:
a61af66fc99e Initial load
duke
parents:
diff changeset
276 case JVM_CONSTANT_Integer:
a61af66fc99e Initial load
duke
parents:
diff changeset
277 visitor.doInt(new IntField(new NamedFieldIdentifier(nameForTag(ctag)), indexOffset(index), true), true);
a61af66fc99e Initial load
duke
parents:
diff changeset
278 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
279
a61af66fc99e Initial load
duke
parents:
diff changeset
280 case JVM_CONSTANT_Float:
a61af66fc99e Initial load
duke
parents:
diff changeset
281 visitor.doFloat(new FloatField(new NamedFieldIdentifier(nameForTag(ctag)), indexOffset(index), true), true);
a61af66fc99e Initial load
duke
parents:
diff changeset
282 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
283
a61af66fc99e Initial load
duke
parents:
diff changeset
284 case JVM_CONSTANT_Long:
a61af66fc99e Initial load
duke
parents:
diff changeset
285 visitor.doLong(new LongField(new NamedFieldIdentifier(nameForTag(ctag)), indexOffset(index), true), true);
a61af66fc99e Initial load
duke
parents:
diff changeset
286 // long entries occupy two slots
a61af66fc99e Initial load
duke
parents:
diff changeset
287 index++;
a61af66fc99e Initial load
duke
parents:
diff changeset
288 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
289
a61af66fc99e Initial load
duke
parents:
diff changeset
290 case JVM_CONSTANT_Double:
a61af66fc99e Initial load
duke
parents:
diff changeset
291 visitor.doDouble(new DoubleField(new NamedFieldIdentifier(nameForTag(ctag)), indexOffset(index), true), true);
a61af66fc99e Initial load
duke
parents:
diff changeset
292 // double entries occupy two slots
a61af66fc99e Initial load
duke
parents:
diff changeset
293 index++;
a61af66fc99e Initial load
duke
parents:
diff changeset
294 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
295
a61af66fc99e Initial load
duke
parents:
diff changeset
296 case JVM_CONSTANT_UnresolvedClass:
a61af66fc99e Initial load
duke
parents:
diff changeset
297 case JVM_CONSTANT_Class:
a61af66fc99e Initial load
duke
parents:
diff changeset
298 case JVM_CONSTANT_UnresolvedString:
a61af66fc99e Initial load
duke
parents:
diff changeset
299 case JVM_CONSTANT_Utf8:
a61af66fc99e Initial load
duke
parents:
diff changeset
300 visitor.doOop(new OopField(new NamedFieldIdentifier(nameForTag(ctag)), indexOffset(index), true), true);
a61af66fc99e Initial load
duke
parents:
diff changeset
301 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
302
a61af66fc99e Initial load
duke
parents:
diff changeset
303 case JVM_CONSTANT_Fieldref:
a61af66fc99e Initial load
duke
parents:
diff changeset
304 case JVM_CONSTANT_Methodref:
a61af66fc99e Initial load
duke
parents:
diff changeset
305 case JVM_CONSTANT_InterfaceMethodref:
a61af66fc99e Initial load
duke
parents:
diff changeset
306 case JVM_CONSTANT_NameAndType:
a61af66fc99e Initial load
duke
parents:
diff changeset
307 visitor.doInt(new IntField(new NamedFieldIdentifier(nameForTag(ctag)), indexOffset(index), true), true);
a61af66fc99e Initial load
duke
parents:
diff changeset
308 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
309 }
a61af66fc99e Initial load
duke
parents:
diff changeset
310 }
a61af66fc99e Initial load
duke
parents:
diff changeset
311 }
a61af66fc99e Initial load
duke
parents:
diff changeset
312 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
313 int length = getLength();
a61af66fc99e Initial load
duke
parents:
diff changeset
314 for (int index = 0; index < length; index++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
315 long offset = baseOffset + (index + typeDataBase.getOopSize());
a61af66fc99e Initial load
duke
parents:
diff changeset
316 visitor.doOop(new IndexableField(index, offset, false), getObjAt(index));
a61af66fc99e Initial load
duke
parents:
diff changeset
317 }
a61af66fc99e Initial load
duke
parents:
diff changeset
318 */
a61af66fc99e Initial load
duke
parents:
diff changeset
319 }
a61af66fc99e Initial load
duke
parents:
diff changeset
320
a61af66fc99e Initial load
duke
parents:
diff changeset
321 public void writeBytes(OutputStream os) throws IOException {
a61af66fc99e Initial load
duke
parents:
diff changeset
322 // Map between any modified UTF-8 and it's constant pool index.
a61af66fc99e Initial load
duke
parents:
diff changeset
323 Map utf8ToIndex = new HashMap();
a61af66fc99e Initial load
duke
parents:
diff changeset
324 DataOutputStream dos = new DataOutputStream(os);
a61af66fc99e Initial load
duke
parents:
diff changeset
325 TypeArray tags = getTags();
a61af66fc99e Initial load
duke
parents:
diff changeset
326 int len = (int)getLength();
a61af66fc99e Initial load
duke
parents:
diff changeset
327 int ci = 0; // constant pool index
a61af66fc99e Initial load
duke
parents:
diff changeset
328
a61af66fc99e Initial load
duke
parents:
diff changeset
329 // collect all modified UTF-8 Strings from Constant Pool
a61af66fc99e Initial load
duke
parents:
diff changeset
330
a61af66fc99e Initial load
duke
parents:
diff changeset
331 for (ci = 1; ci < len; ci++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
332 byte cpConstType = tags.getByteAt(ci);
a61af66fc99e Initial load
duke
parents:
diff changeset
333 if(cpConstType == JVM_CONSTANT_Utf8) {
a61af66fc99e Initial load
duke
parents:
diff changeset
334 Symbol sym = getSymbolAt(ci);
a61af66fc99e Initial load
duke
parents:
diff changeset
335 utf8ToIndex.put(sym.asString(), new Short((short) ci));
a61af66fc99e Initial load
duke
parents:
diff changeset
336 }
a61af66fc99e Initial load
duke
parents:
diff changeset
337 else if(cpConstType == JVM_CONSTANT_Long ||
a61af66fc99e Initial load
duke
parents:
diff changeset
338 cpConstType == JVM_CONSTANT_Double) {
a61af66fc99e Initial load
duke
parents:
diff changeset
339 ci++;
a61af66fc99e Initial load
duke
parents:
diff changeset
340 }
a61af66fc99e Initial load
duke
parents:
diff changeset
341 }
a61af66fc99e Initial load
duke
parents:
diff changeset
342
a61af66fc99e Initial load
duke
parents:
diff changeset
343
a61af66fc99e Initial load
duke
parents:
diff changeset
344 for(ci = 1; ci < len; ci++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
345 int cpConstType = (int)tags.getByteAt(ci);
a61af66fc99e Initial load
duke
parents:
diff changeset
346 // write cp_info
a61af66fc99e Initial load
duke
parents:
diff changeset
347 // write constant type
a61af66fc99e Initial load
duke
parents:
diff changeset
348 switch(cpConstType) {
a61af66fc99e Initial load
duke
parents:
diff changeset
349 case JVM_CONSTANT_Utf8: {
a61af66fc99e Initial load
duke
parents:
diff changeset
350 dos.writeByte(cpConstType);
a61af66fc99e Initial load
duke
parents:
diff changeset
351 Symbol sym = getSymbolAt(ci);
a61af66fc99e Initial load
duke
parents:
diff changeset
352 dos.writeShort((short)sym.getLength());
a61af66fc99e Initial load
duke
parents:
diff changeset
353 dos.write(sym.asByteArray());
a61af66fc99e Initial load
duke
parents:
diff changeset
354 if (DEBUG) debugMessage("CP[" + ci + "] = modified UTF-8 " + sym.asString());
a61af66fc99e Initial load
duke
parents:
diff changeset
355 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
356 }
a61af66fc99e Initial load
duke
parents:
diff changeset
357
a61af66fc99e Initial load
duke
parents:
diff changeset
358 case JVM_CONSTANT_Unicode:
a61af66fc99e Initial load
duke
parents:
diff changeset
359 throw new IllegalArgumentException("Unicode constant!");
a61af66fc99e Initial load
duke
parents:
diff changeset
360
a61af66fc99e Initial load
duke
parents:
diff changeset
361 case JVM_CONSTANT_Integer:
a61af66fc99e Initial load
duke
parents:
diff changeset
362 dos.writeByte(cpConstType);
a61af66fc99e Initial load
duke
parents:
diff changeset
363 dos.writeInt(getIntAt(ci));
a61af66fc99e Initial load
duke
parents:
diff changeset
364 if (DEBUG) debugMessage("CP[" + ci + "] = int " + getIntAt(ci));
a61af66fc99e Initial load
duke
parents:
diff changeset
365 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
366
a61af66fc99e Initial load
duke
parents:
diff changeset
367 case JVM_CONSTANT_Float:
a61af66fc99e Initial load
duke
parents:
diff changeset
368 dos.writeByte(cpConstType);
a61af66fc99e Initial load
duke
parents:
diff changeset
369 dos.writeFloat(getFloatAt(ci));
a61af66fc99e Initial load
duke
parents:
diff changeset
370 if (DEBUG) debugMessage("CP[" + ci + "] = float " + getFloatAt(ci));
a61af66fc99e Initial load
duke
parents:
diff changeset
371 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
372
a61af66fc99e Initial load
duke
parents:
diff changeset
373 case JVM_CONSTANT_Long: {
a61af66fc99e Initial load
duke
parents:
diff changeset
374 dos.writeByte(cpConstType);
a61af66fc99e Initial load
duke
parents:
diff changeset
375 long l = getLongAt(ci);
a61af66fc99e Initial load
duke
parents:
diff changeset
376 // long entries occupy two pool entries
a61af66fc99e Initial load
duke
parents:
diff changeset
377 ci++;
a61af66fc99e Initial load
duke
parents:
diff changeset
378 dos.writeLong(l);
a61af66fc99e Initial load
duke
parents:
diff changeset
379 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
380 }
a61af66fc99e Initial load
duke
parents:
diff changeset
381
a61af66fc99e Initial load
duke
parents:
diff changeset
382 case JVM_CONSTANT_Double:
a61af66fc99e Initial load
duke
parents:
diff changeset
383 dos.writeByte(cpConstType);
a61af66fc99e Initial load
duke
parents:
diff changeset
384 dos.writeDouble(getDoubleAt(ci));
a61af66fc99e Initial load
duke
parents:
diff changeset
385 // double entries occupy two pool entries
a61af66fc99e Initial load
duke
parents:
diff changeset
386 ci++;
a61af66fc99e Initial load
duke
parents:
diff changeset
387 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
388
a61af66fc99e Initial load
duke
parents:
diff changeset
389 case JVM_CONSTANT_Class: {
a61af66fc99e Initial load
duke
parents:
diff changeset
390 dos.writeByte(cpConstType);
a61af66fc99e Initial load
duke
parents:
diff changeset
391 // Klass already resolved. ConstantPool constains klassOop.
a61af66fc99e Initial load
duke
parents:
diff changeset
392 Klass refKls = (Klass) getObjAt(ci);
a61af66fc99e Initial load
duke
parents:
diff changeset
393 String klassName = refKls.getName().asString();
a61af66fc99e Initial load
duke
parents:
diff changeset
394 Short s = (Short) utf8ToIndex.get(klassName);
a61af66fc99e Initial load
duke
parents:
diff changeset
395 dos.writeShort(s.shortValue());
a61af66fc99e Initial load
duke
parents:
diff changeset
396 if (DEBUG) debugMessage("CP[" + ci + "] = class " + s);
a61af66fc99e Initial load
duke
parents:
diff changeset
397 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
398 }
a61af66fc99e Initial load
duke
parents:
diff changeset
399
a61af66fc99e Initial load
duke
parents:
diff changeset
400 // case JVM_CONSTANT_ClassIndex:
a61af66fc99e Initial load
duke
parents:
diff changeset
401 case JVM_CONSTANT_UnresolvedClass: {
a61af66fc99e Initial load
duke
parents:
diff changeset
402 dos.writeByte(JVM_CONSTANT_Class);
a61af66fc99e Initial load
duke
parents:
diff changeset
403 String klassName = getSymbolAt(ci).asString();
a61af66fc99e Initial load
duke
parents:
diff changeset
404 Short s = (Short) utf8ToIndex.get(klassName);
a61af66fc99e Initial load
duke
parents:
diff changeset
405 dos.writeShort(s.shortValue());
a61af66fc99e Initial load
duke
parents:
diff changeset
406 if (DEBUG) debugMessage("CP[" + ci + "] = class " + s);
a61af66fc99e Initial load
duke
parents:
diff changeset
407 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
408 }
a61af66fc99e Initial load
duke
parents:
diff changeset
409
a61af66fc99e Initial load
duke
parents:
diff changeset
410 case JVM_CONSTANT_String: {
a61af66fc99e Initial load
duke
parents:
diff changeset
411 dos.writeByte(cpConstType);
a61af66fc99e Initial load
duke
parents:
diff changeset
412 String str = OopUtilities.stringOopToString(getObjAt(ci));
a61af66fc99e Initial load
duke
parents:
diff changeset
413 Short s = (Short) utf8ToIndex.get(str);
a61af66fc99e Initial load
duke
parents:
diff changeset
414 dos.writeShort(s.shortValue());
a61af66fc99e Initial load
duke
parents:
diff changeset
415 if (DEBUG) debugMessage("CP[" + ci + "] = string " + s);
a61af66fc99e Initial load
duke
parents:
diff changeset
416 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
417 }
a61af66fc99e Initial load
duke
parents:
diff changeset
418
a61af66fc99e Initial load
duke
parents:
diff changeset
419 // case JVM_CONSTANT_StringIndex:
a61af66fc99e Initial load
duke
parents:
diff changeset
420 case JVM_CONSTANT_UnresolvedString: {
a61af66fc99e Initial load
duke
parents:
diff changeset
421 dos.writeByte(JVM_CONSTANT_String);
a61af66fc99e Initial load
duke
parents:
diff changeset
422 String val = getSymbolAt(ci).asString();
a61af66fc99e Initial load
duke
parents:
diff changeset
423
a61af66fc99e Initial load
duke
parents:
diff changeset
424 Short s = (Short) utf8ToIndex.get(val);
a61af66fc99e Initial load
duke
parents:
diff changeset
425 dos.writeShort(s.shortValue());
a61af66fc99e Initial load
duke
parents:
diff changeset
426 if (DEBUG) debugMessage("CP[" + ci + "] = string " + s);
a61af66fc99e Initial load
duke
parents:
diff changeset
427 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
428 }
a61af66fc99e Initial load
duke
parents:
diff changeset
429
a61af66fc99e Initial load
duke
parents:
diff changeset
430 // all external, internal method/field references
a61af66fc99e Initial load
duke
parents:
diff changeset
431 case JVM_CONSTANT_Fieldref:
a61af66fc99e Initial load
duke
parents:
diff changeset
432 case JVM_CONSTANT_Methodref:
a61af66fc99e Initial load
duke
parents:
diff changeset
433 case JVM_CONSTANT_InterfaceMethodref: {
a61af66fc99e Initial load
duke
parents:
diff changeset
434 dos.writeByte(cpConstType);
a61af66fc99e Initial load
duke
parents:
diff changeset
435 int value = getIntAt(ci);
a61af66fc99e Initial load
duke
parents:
diff changeset
436 short klassIndex = (short) extractLowShortFromInt(value);
a61af66fc99e Initial load
duke
parents:
diff changeset
437 short nameAndTypeIndex = (short) extractHighShortFromInt(value);
a61af66fc99e Initial load
duke
parents:
diff changeset
438 dos.writeShort(klassIndex);
a61af66fc99e Initial load
duke
parents:
diff changeset
439 dos.writeShort(nameAndTypeIndex);
a61af66fc99e Initial load
duke
parents:
diff changeset
440 if (DEBUG) debugMessage("CP[" + ci + "] = ref klass = " +
a61af66fc99e Initial load
duke
parents:
diff changeset
441 klassIndex + ", N&T = " + nameAndTypeIndex);
a61af66fc99e Initial load
duke
parents:
diff changeset
442 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
443 }
a61af66fc99e Initial load
duke
parents:
diff changeset
444
a61af66fc99e Initial load
duke
parents:
diff changeset
445 case JVM_CONSTANT_NameAndType: {
a61af66fc99e Initial load
duke
parents:
diff changeset
446 dos.writeByte(cpConstType);
a61af66fc99e Initial load
duke
parents:
diff changeset
447 int value = getIntAt(ci);
a61af66fc99e Initial load
duke
parents:
diff changeset
448 short nameIndex = (short) extractLowShortFromInt(value);
a61af66fc99e Initial load
duke
parents:
diff changeset
449 short signatureIndex = (short) extractHighShortFromInt(value);
a61af66fc99e Initial load
duke
parents:
diff changeset
450 dos.writeShort(nameIndex);
a61af66fc99e Initial load
duke
parents:
diff changeset
451 dos.writeShort(signatureIndex);
a61af66fc99e Initial load
duke
parents:
diff changeset
452 if (DEBUG) debugMessage("CP[" + ci + "] = N&T name = " + nameIndex
a61af66fc99e Initial load
duke
parents:
diff changeset
453 + ", type = " + signatureIndex);
a61af66fc99e Initial load
duke
parents:
diff changeset
454 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
455 }
a61af66fc99e Initial load
duke
parents:
diff changeset
456 } // switch
a61af66fc99e Initial load
duke
parents:
diff changeset
457 }
a61af66fc99e Initial load
duke
parents:
diff changeset
458 dos.flush();
a61af66fc99e Initial load
duke
parents:
diff changeset
459 return;
a61af66fc99e Initial load
duke
parents:
diff changeset
460 }
a61af66fc99e Initial load
duke
parents:
diff changeset
461
a61af66fc99e Initial load
duke
parents:
diff changeset
462 public void printValueOn(PrintStream tty) {
a61af66fc99e Initial load
duke
parents:
diff changeset
463 tty.print("ConstantPool for " + getPoolHolder().getName().asString());
a61af66fc99e Initial load
duke
parents:
diff changeset
464 }
a61af66fc99e Initial load
duke
parents:
diff changeset
465
a61af66fc99e Initial load
duke
parents:
diff changeset
466 public long getObjectSize() {
a61af66fc99e Initial load
duke
parents:
diff changeset
467 return alignObjectSize(headerSize + (getLength() * elementSize));
a61af66fc99e Initial load
duke
parents:
diff changeset
468 }
a61af66fc99e Initial load
duke
parents:
diff changeset
469
a61af66fc99e Initial load
duke
parents:
diff changeset
470 //----------------------------------------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
471 // Internals only below this point
a61af66fc99e Initial load
duke
parents:
diff changeset
472 //
a61af66fc99e Initial load
duke
parents:
diff changeset
473
a61af66fc99e Initial load
duke
parents:
diff changeset
474 private static int extractHighShortFromInt(int val) {
a61af66fc99e Initial load
duke
parents:
diff changeset
475 return (val >> 16) & 0xFFFF;
a61af66fc99e Initial load
duke
parents:
diff changeset
476 }
a61af66fc99e Initial load
duke
parents:
diff changeset
477
a61af66fc99e Initial load
duke
parents:
diff changeset
478 private static int extractLowShortFromInt(int val) {
a61af66fc99e Initial load
duke
parents:
diff changeset
479 return val & 0xFFFF;
a61af66fc99e Initial load
duke
parents:
diff changeset
480 }
a61af66fc99e Initial load
duke
parents:
diff changeset
481 }