< prev index next >

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/StackValueCollection.java

Print this page

        

@@ -25,10 +25,11 @@
 package sun.jvm.hotspot.runtime;
 
 import java.util.*;
 
 import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.types.*;
 
 public class StackValueCollection {
   private List list;
 
   public StackValueCollection()           { list = new ArrayList(); }

@@ -46,9 +47,17 @@
   public char      charAt(int slot)      { return (char) get(slot).getInteger(); }
   public short     shortAt(int slot)     { return (short) get(slot).getInteger(); }
   public int       intAt(int slot)       { return (int) get(slot).getInteger(); }
   public long      longAt(int slot)      { return VM.getVM().buildLongFromIntsPD((int) get(slot).getInteger(),
                                                                                  (int) get(slot+1).getInteger()); }
-  public OopHandle oopHandleAt(int slot) { return get(slot).getObject(); }
+
+  public OopHandle oopHandleAt(int slot) {
+    StackValue sv = get(slot);
+    if (sv.getType() == BasicType.getTConflict()) {
+      throw new WrongTypeException("Conflict type");
+    }
+    return sv.getObject();
+  }
+
   public float     floatAt(int slot)     { return Float.intBitsToFloat(intAt(slot)); }
   public double    doubleAt(int slot)    { return Double.longBitsToDouble(longAt(slot)); }
 }
< prev index next >