src/share/classes/com/sun/tools/javac/jvm/Code.java

changeset 1851
e9ebff1840e5
parent 1802
8fb68f73d4b1
child 1853
831467c4c6a7
equal deleted inserted replaced
1850:6debfa63a4a1 1851:e9ebff1840e5
917 if (o instanceof Float) return syms.floatType; 917 if (o instanceof Float) return syms.floatType;
918 if (o instanceof String) return syms.stringType; 918 if (o instanceof String) return syms.stringType;
919 if (o instanceof Long) return syms.longType; 919 if (o instanceof Long) return syms.longType;
920 if (o instanceof Double) return syms.doubleType; 920 if (o instanceof Double) return syms.doubleType;
921 if (o instanceof ClassSymbol) return syms.classType; 921 if (o instanceof ClassSymbol) return syms.classType;
922 if (o instanceof Type.ArrayType) return syms.classType; 922 if (o instanceof Pool.MethodHandle) return syms.methodHandleType;
923 if (o instanceof Type.MethodType) return syms.methodTypeType;
924 if (o instanceof UniqueType) return typeForPool(((UniqueType)o).type); 923 if (o instanceof UniqueType) return typeForPool(((UniqueType)o).type);
925 if (o instanceof Pool.MethodHandle) return syms.methodHandleType; 924 if (o instanceof Type) {
926 throw new AssertionError(o); 925 Type ty = ((Type)o).unannotatedType();
926
927 if (ty instanceof Type.ArrayType) return syms.classType;
928 if (ty instanceof Type.MethodType) return syms.methodTypeType;
929 }
930 throw new AssertionError("Invalid type of constant pool entry: " + o.getClass());
927 } 931 }
928 932
929 /** Emit an opcode with a one-byte operand field; 933 /** Emit an opcode with a one-byte operand field;
930 * widen if field does not fit in a byte. 934 * widen if field does not fit in a byte.
931 */ 935 */

mercurial