[Nice-commit] Nice/src/nice/tools/code TupleType.java,1.1,1.2 SpecialArray.java,1.14,1.15
Brought to you by:
bonniot
From: <bo...@us...> - 2003-11-25 19:23:01
|
Update of /cvsroot/nice/Nice/src/nice/tools/code In directory sc8-pr-cvs1:/tmp/cvs-serv1841/src/nice/tools/code Modified Files: TupleType.java SpecialArray.java Log Message: Make the bytecode TupleType a subclass of SpecialArray so that polymorphic tuples also get automatically converted to their monomorphic version as needed. Index: TupleType.java =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/code/TupleType.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TupleType.java 17 Mar 2003 20:11:42 -0000 1.1 --- TupleType.java 25 Nov 2003 19:22:58 -0000 1.2 *************** *** 22,26 **** import gnu.bytecode.*; ! public class TupleType extends ArrayType { TupleType (Type arrayType, Type[] componentTypes) --- 22,26 ---- import gnu.bytecode.*; ! public class TupleType extends SpecialArray { TupleType (Type arrayType, Type[] componentTypes) Index: SpecialArray.java =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/code/SpecialArray.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** SpecialArray.java 24 Jun 2003 20:07:38 -0000 1.14 --- SpecialArray.java 25 Nov 2003 19:22:58 -0000 1.15 *************** *** 11,15 **** */ ! public final class SpecialArray extends gnu.bytecode.ArrayType { /** --- 11,15 ---- */ ! public class SpecialArray extends gnu.bytecode.ArrayType { /** *************** *** 27,31 **** return res; ! return new SpecialArray(elements, prefix, false); } --- 27,31 ---- return res; ! return new SpecialArray(elements, prefix, false, true); } *************** *** 33,37 **** { if (unknownTypeArray == null) ! unknownTypeArray = new SpecialArray(objectType, null, true); return unknownTypeArray; } --- 33,37 ---- { if (unknownTypeArray == null) ! unknownTypeArray = new SpecialArray(objectType, null, true, true); return unknownTypeArray; } *************** *** 49,53 **** private boolean unknown; ! private SpecialArray (Type elements, String prefix, boolean unknown) { super (elements); --- 49,61 ---- private boolean unknown; ! protected SpecialArray (Type elements) ! { ! this(elements, ! elements instanceof PrimType ? elements.getName() : null, ! false, false); ! } ! ! private SpecialArray (Type elements, String prefix, boolean unknown, ! boolean register) { super (elements); *************** *** 65,69 **** field.setType(objectType); ! if (!unknown) { Class c = elements.getReflectClass(); --- 73,77 ---- field.setType(objectType); ! if (register && !unknown) { Class c = elements.getReflectClass(); |