last ditch efford to separate names and type descriptors
[org.ibex.classgen.git] / src / org / ibex / classgen / ConstantPool.java
index dbd958c..967d317 100644 (file)
@@ -86,7 +86,7 @@ class ConstantPool implements CGConst {
         ClassEnt(String s) { this(); this.utf8 = (Utf8Ent) addUtf8(s); }
         void dump(DataOutput o) throws IOException { super.dump(o); o.writeShort(utf8.n); }
         Type.Class getTypeClass() { return  (Type.Class) key(); }
-        Object _key() { return new Type.Class(utf8.s); }
+        Object _key() { return Type.Class.instance(utf8.s); }
         void unref() { utf8.unref(); super.unref(); }
         String debugToString() { return "[Class: " + utf8.s + "]"; }
     }
@@ -236,7 +236,7 @@ class ConstantPool implements CGConst {
                     : m instanceof Type.Class.Method ? CONSTANT_METHODREF
                     : 0;
             if (tag == 0) throw new Error("should never happen");
-            ent = new MemberEnt(tag, m.getDeclaringClass(), m.name, m.getDescriptor());
+            ent = new MemberEnt(tag, m.getDeclaringClass(), m.name, m.getTypeDescriptor());
         } 
         else {
             throw new IllegalArgumentException("Unknown type passed to add");