comparison agent/src/share/classes/sun/jvm/hotspot/types/basic/BasicTypeDataBase.java @ 8755:117bb0519114

8009456: SA: typeToVtbl of BasicTypeDataBase should not be static Reviewed-by: coleenp, sla Contributed-by: yunda.mly@taobao.com
author sla
date Tue, 19 Mar 2013 13:41:05 +0100
parents f6f3bb0ee072
children de6a9e811145
comparison
equal deleted inserted replaced
8754:82ab039b9680 8755:117bb0519114
22 * 22 *
23 */ 23 */
24 24
25 package sun.jvm.hotspot.types.basic; 25 package sun.jvm.hotspot.types.basic;
26 26
27 import java.util.*; 27 import java.util.HashMap;
28 import sun.jvm.hotspot.debugger.*; 28 import java.util.Iterator;
29 import sun.jvm.hotspot.types.*; 29 import java.util.Map;
30
31 import sun.jvm.hotspot.debugger.Address;
32 import sun.jvm.hotspot.debugger.MachineDescription;
30 import sun.jvm.hotspot.runtime.VM; 33 import sun.jvm.hotspot.runtime.VM;
34 import sun.jvm.hotspot.types.Type;
35 import sun.jvm.hotspot.types.TypeDataBase;
31 36
32 /** <P> This is a basic implementation of the TypeDataBase interface. 37 /** <P> This is a basic implementation of the TypeDataBase interface.
33 It allows an external type database builder to add types to be 38 It allows an external type database builder to add types to be
34 consumed by a client through the Type interfaces. It has no 39 consumed by a client through the Type interfaces. It has no
35 knowledge of symbol lookup; for example, the builder is 40 knowledge of symbol lookup; for example, the builder is
148 153
149 public long getOopSize() { 154 public long getOopSize() {
150 return VM.getVM().getOopSize(); 155 return VM.getVM().getOopSize();
151 } 156 }
152 157
153 static HashMap typeToVtbl = new HashMap(); 158 HashMap typeToVtbl = new HashMap();
154 159
155 private Address vtblForType(Type type) { 160 private Address vtblForType(Type type) {
156 Address vtblAddr = (Address)typeToVtbl.get(type); 161 Address vtblAddr = (Address)typeToVtbl.get(type);
157 if (vtblAddr == null) { 162 if (vtblAddr == null) {
158 vtblAddr = vtblAccess.getVtblForType(type); 163 vtblAddr = vtblAccess.getVtblForType(type);