[Nice-commit] Nice/src/bossa/syntax Arguments.java,1.21,1.22 ClassDefinition.java,1.99,1.100 Express
Brought to you by:
bonniot
From: <ar...@us...> - 2003-12-09 15:21:08
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv13951/F:/nice/src/bossa/syntax Modified Files: Arguments.java ClassDefinition.java Expression.java ImplementsCst.java Node.java OverloadedSymbolExp.java SuperExp.java TypeIdent.java TypeParameters.java VarScope.java VarSymbol.java Log Message: Removed unused methods. Index: Arguments.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Arguments.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Arguments.java 22 Nov 2003 16:37:39 -0000 1.21 --- Arguments.java 9 Dec 2003 15:21:05 -0000 1.22 *************** *** 193,201 **** return true; } - - public gnu.expr.Expression[] compile() - { - return null; //Expression.compile(arguments); - } public String toString() --- 193,196 ---- Index: ClassDefinition.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/ClassDefinition.java,v retrieving revision 1.99 retrieving revision 1.100 diff -C2 -d -r1.99 -r1.100 *** ClassDefinition.java 15 Nov 2003 17:25:47 -0000 1.99 --- ClassDefinition.java 9 Dec 2003 15:21:05 -0000 1.100 *************** *** 676,692 **** } - final ClassType javaClass() - { - return (ClassType) javaType; - } - - static final Type javaClass(ClassDefinition c) - { - if (c == null) - return gnu.bytecode.Type.pointer_type; - - return c.getJavaType(); - } - /**************************************************************** * Printing --- 676,679 ---- Index: Expression.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Expression.java,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** Expression.java 22 Jul 2003 12:09:05 -0000 1.52 --- Expression.java 9 Dec 2003 15:21:05 -0000 1.53 *************** *** 132,149 **** } - /** - * Iterates the resolveOverloading() method. - */ - static List /* of Expression */ noOverloading(List expressions) - { - Iterator i=expressions.iterator(); - List res=new ArrayList(expressions.size()); - - while(i.hasNext()) - res.add( ((Expression) i.next()) .noOverloading()); - - return res; - } - /** computes the static type of the expression */ abstract void computeType(); --- 132,135 ---- *************** *** 160,180 **** return type; } - - /** - * Maps getType over a collection of Expressions - * - * @param Expressions the list of Expressions - * @return the list of their PolyTypes - */ - static Polytype[] getType(List expressions) - { - Polytype[] res = new Polytype[expressions.size()]; - - int n = 0; - for(Iterator i=expressions.iterator(); i.hasNext();) - res[n++] = ((Expression) i.next()).getType(); - - return res; - } /** --- 146,149 ---- *************** *** 234,253 **** // Default implementation. return generateCode(); - } - - /** - * Maps {@link #generateCode()} over a list of expressions. - */ - public static gnu.expr.Expression[] compile(List expressions) - { - gnu.expr.Expression[] res = new gnu.expr.Expression[expressions.size()]; - int n = 0; - for(Iterator i = expressions.iterator(); i.hasNext();n++) - { - Expression exp = (Expression)i.next(); - res[n] = exp.generateCode(); - } - - return res; } --- 203,206 ---- Index: ImplementsCst.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/ImplementsCst.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ImplementsCst.java 11 Oct 2000 09:35:15 -0000 1.5 --- ImplementsCst.java 9 Dec 2003 15:21:05 -0000 1.6 *************** *** 57,69 **** } - /* - String getParentFor(TypeConstructor tc) - { - if(this.tc==tc) - return def().toString(); - else - return null; - } - */ TypeIdent tc, itf; } --- 57,60 ---- Index: Node.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Node.java,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** Node.java 28 Nov 2003 14:01:29 -0000 1.58 --- Node.java 9 Dec 2003 15:21:05 -0000 1.59 *************** *** 72,85 **** } - final Statement child(Statement n) - { - if(n==null) - return null; - - if (children == null) children=new ArrayList(); - children.add(n); - return n; - } - void removeChild(Node n) { --- 72,75 ---- *************** *** 90,101 **** } - void removeChildren(List c) - { - if(c==null) return; - for(Iterator i = c.iterator(); - i.hasNext();) - removeChild((Node) i.next()); - } - /** * Always returns the argument (except an empty list for 'null'). --- 80,83 ---- *************** *** 112,121 **** return c; } - - void addChildren(Node[] values) - { - for (int i = 0; i < values.length; i++) - addChild(values[i]); - } void addSymbol(VarSymbol s) --- 94,97 ---- *************** *** 126,139 **** } - void addSymbols(Collection c) - { - if(c!=null) - { - if (varSymbols == null) - varSymbols = new ArrayList(); - varSymbols.addAll(c); - } - } - void addTypeSymbol(TypeSymbol s) { --- 102,105 ---- *************** *** 160,179 **** typeMapsNames.add(name); typeMapsSymbols.add(symbol); - } - - void addTypeMaps(Collection names, Collection symbols) - { - if(names.size()!=symbols.size()) - throw new Error(symbols.size()+" != "+names.size()); - - if (typeMapsNames == null) - { - typeMapsNames = new ArrayList(); - typeMapsSymbols = new ArrayList(); - } - - for(Iterator n = names.iterator();n.hasNext();) - typeMapsNames.add(((LocatedString) n.next()).toString()); - typeMapsSymbols.addAll(symbols); } --- 126,129 ---- Index: OverloadedSymbolExp.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/OverloadedSymbolExp.java,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** OverloadedSymbolExp.java 8 Nov 2003 20:31:53 -0000 1.61 --- OverloadedSymbolExp.java 9 Dec 2003 15:21:05 -0000 1.62 *************** *** 56,69 **** } - OverloadedSymbolExp(VarSymbol[] symbols, LocatedString ident) - { - this.symbols = new ArrayList(symbols.length); - for (int i = 0; i < symbols.length; i++) - this.symbols.add(symbols[i]); - - this.ident = ident; - setLocation(ident.location()); - } - public boolean isAssignable() { --- 56,59 ---- Index: SuperExp.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/SuperExp.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** SuperExp.java 29 Aug 2003 17:41:45 -0000 1.12 --- SuperExp.java 9 Dec 2003 15:21:05 -0000 1.13 *************** *** 110,118 **** } - private boolean leq(MethodBodyDefinition a, MethodBodyDefinition b) - { - return mlsub.typing.Typing.testRigidLeq(a.firstArgument(), b.firstArgument()); - } - /**************************************************************** * Typing --- 110,113 ---- Index: TypeIdent.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/TypeIdent.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** TypeIdent.java 3 Dec 2003 21:50:41 -0000 1.25 --- TypeIdent.java 9 Dec 2003 15:21:05 -0000 1.26 *************** *** 164,180 **** } - public static TypeConstructor[] resolveToTC(TypeMap scope, List idents) - { - if (idents==null || idents.size()==0) return null; - - TypeConstructor[] res = new TypeConstructor[idents.size()]; - - int n = 0; - for(Iterator i = idents.iterator(); i.hasNext();) - res[n++] = ((TypeIdent) i.next()).resolveToTC(scope); - - return res; - } - public static Interface[] resolveToItf(TypeMap scope, List idents) { --- 164,167 ---- Index: TypeParameters.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/TypeParameters.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** TypeParameters.java 1 Aug 2002 00:25:32 -0000 1.17 --- TypeParameters.java 9 Dec 2003 15:21:05 -0000 1.18 *************** *** 41,51 **** } - TypeParameters(LocatedString s, Variance v) - { - if (v == null) - Internal.error(s, s + " has no variance"); - this.content = Monotype.freshs(v.arity(), s); - } - mlsub.typing.Monotype[] resolve(TypeMap ts) { --- 41,44 ---- *************** *** 56,64 **** { return Util.map("<",", ",">", content); - } - - public int size() - { - return content.length; } --- 49,52 ---- Index: VarScope.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/VarScope.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** VarScope.java 28 Nov 2003 14:01:29 -0000 1.18 --- VarScope.java 9 Dec 2003 15:21:05 -0000 1.19 *************** *** 94,119 **** } - /** - * Verifies that a collection of VarSymbol - * does not contains twice the same identifier - * - * @param symbols the collection of VarSymbols - * @exception DuplicateIdentEx if the same identifer occurs twice - */ - static void checkDuplicates(Collection symbols) - throws DuplicateIdentEx - { - LocatedString name; - Collection seen = new ArrayList(symbols.size()); - Iterator i = symbols.iterator(); - while(i.hasNext()) - { - name = ((VarSymbol)i.next()).name; - if(seen.contains(name)) - throw new DuplicateIdentEx(name); - seen.add(name); - } - } - /**************************************************************** * Debugging --- 94,97 ---- Index: VarSymbol.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/VarSymbol.java,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** VarSymbol.java 7 Nov 2003 23:34:19 -0000 1.35 --- VarSymbol.java 9 Dec 2003 15:21:05 -0000 1.36 *************** *** 88,109 **** abstract Polytype getType(); - /** - * Maps getType over a collection of VarSymbols - * - * @param varsymbols the colleciton of Varsymbols - * @return the collection of their Types - */ - static Polytype[] getType(Collection varsymbols) - { - Iterator i=varsymbols.iterator(); - Polytype[] res = new Polytype[varsymbols.size()]; - - int n = 0; - while(i.hasNext()) - res[n++] = ((VarSymbol) i.next()).getType(); - - return res; - } - /**************************************************************** * Overloading resolution --- 88,91 ---- |