nice-commit Mailing List for The Nice Programming Language (Page 107)
Brought to you by:
bonniot
You can subscribe to this list here.
2003 |
Jan
|
Feb
(60) |
Mar
(125) |
Apr
(183) |
May
(140) |
Jun
(227) |
Jul
(141) |
Aug
(181) |
Sep
(75) |
Oct
(89) |
Nov
(187) |
Dec
(162) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(69) |
Feb
(197) |
Mar
(98) |
Apr
(26) |
May
(10) |
Jun
(85) |
Jul
(88) |
Aug
(79) |
Sep
(80) |
Oct
(81) |
Nov
(53) |
Dec
(109) |
2005 |
Jan
(68) |
Feb
(77) |
Mar
(232) |
Apr
(79) |
May
(37) |
Jun
(37) |
Jul
(3) |
Aug
(18) |
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
(10) |
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(9) |
2007 |
Jan
(2) |
Feb
(8) |
Mar
(2) |
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
|
Nov
(17) |
Dec
(6) |
2008 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <bo...@us...> - 2003-05-29 17:40:57
|
Update of /cvsroot/nice/Nice/debian In directory sc8-pr-cvs1:/tmp/cvs-serv4687/debian Modified Files: changelog Log Message: Improved some descriptions. Index: changelog =================================================================== RCS file: /cvsroot/nice/Nice/debian/changelog,v retrieving revision 1.165 retrieving revision 1.166 diff -C2 -d -r1.165 -r1.166 *** changelog 29 May 2003 08:41:17 -0000 1.165 --- changelog 29 May 2003 17:40:52 -0000 1.166 *************** *** 3,7 **** * Stable version, based on 0.7.9 * Added operators to compute with java.math.BigInteger (+,-,*,/,%,...). ! * In returntypes is '()' now equivalent to 'void' so int->() is a valid type. * Bugfixes (some cases of optional parameters, allowing arbitrarily nested tuples on the left side of an assignment, recursion for local functions, --- 3,9 ---- * Stable version, based on 0.7.9 * Added operators to compute with java.math.BigInteger (+,-,*,/,%,...). ! * In functional types, '()' is always equivalent to 'void'. Ex: int->() ! * Anonymous functions that never return normally can be used with any ! return type. * Bugfixes (some cases of optional parameters, allowing arbitrarily nested tuples on the left side of an assignment, recursion for local functions, *************** *** 10,15 **** nested type parameters in method declarations, improved some error messages, resolving overloading between fields and global variables, implemented ! nullness inference for local constants, return type of error throwing ! anonymous functions). -- Daniel Bonniot <bo...@us...> Wed, 14 May 2003 16:30:15 +0200 --- 12,16 ---- nested type parameters in method declarations, improved some error messages, resolving overloading between fields and global variables, implemented ! nullness inference for local constants). -- Daniel Bonniot <bo...@us...> Wed, 14 May 2003 16:30:15 +0200 |
From: <ar...@us...> - 2003-05-29 14:20:53
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv18120/F:/nice/src/bossa/syntax Modified Files: CallExp.java ClassDefinition.java ContinueStmt.java Contract.java Expression.java LocatedString.java MethodBodyDefinition.java SuperExp.java TupleExp.java Log Message: Some minor cleanups: removal of unused variables and some other things. Index: CallExp.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/CallExp.java,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** CallExp.java 28 May 2003 12:57:26 -0000 1.78 --- CallExp.java 29 May 2003 14:17:16 -0000 1.79 *************** *** 193,197 **** Monotype[] dom = funt.domain(); - Monotype codom = funt.codomain(); Constraint cst = type.getConstraint(); --- 193,196 ---- Index: ClassDefinition.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/ClassDefinition.java,v retrieving revision 1.91 retrieving revision 1.92 diff -C2 -d -r1.91 -r1.92 *** ClassDefinition.java 28 May 2003 12:57:26 -0000 1.91 --- ClassDefinition.java 29 May 2003 14:17:17 -0000 1.92 *************** *** 362,366 **** if (name.equals("nice.lang.Array")) tc = new mlsub.typing.TypeConstructor ! (name.toString(), variance, isConcrete(), true) { public String toString(mlsub.typing.Monotype[] parameters) --- 362,366 ---- if (name.equals("nice.lang.Array")) tc = new mlsub.typing.TypeConstructor ! (name, variance, isConcrete(), true) { public String toString(mlsub.typing.Monotype[] parameters) *************** *** 380,384 **** else if (name.equals("nice.lang.Sure")) tc = new mlsub.typing.TypeConstructor ! (name.toString(), mlsub.typing.NullnessKind.instance, isConcrete(), true) { public String toString(mlsub.typing.Monotype[] parameters, --- 380,384 ---- else if (name.equals("nice.lang.Sure")) tc = new mlsub.typing.TypeConstructor ! (name, mlsub.typing.NullnessKind.instance, isConcrete(), true) { public String toString(mlsub.typing.Monotype[] parameters, *************** *** 394,398 **** else if (name.equals("nice.lang.Maybe")) tc = new mlsub.typing.TypeConstructor ! (name.toString(), mlsub.typing.NullnessKind.instance, isConcrete(), true) { public String toString(mlsub.typing.Monotype[] parameters, --- 394,398 ---- else if (name.equals("nice.lang.Maybe")) tc = new mlsub.typing.TypeConstructor ! (name, mlsub.typing.NullnessKind.instance, isConcrete(), true) { public String toString(mlsub.typing.Monotype[] parameters, *************** *** 404,413 **** tc = new mlsub.typing.TypeConstructor ("null", mlsub.typing.NullnessKind.instance, isConcrete(), true); ! PrimitiveType.registerPrimType(name.toString(),tc); } else { tc = new mlsub.typing.TypeConstructor ! (name.toString(), variance, isConcrete(), true); if (name.equals("nice.lang.Throwable")) PrimitiveType.throwableTC = tc; --- 404,413 ---- tc = new mlsub.typing.TypeConstructor ("null", mlsub.typing.NullnessKind.instance, isConcrete(), true); ! PrimitiveType.registerPrimType(name, tc); } else { tc = new mlsub.typing.TypeConstructor ! (name, variance, isConcrete(), true); if (name.equals("nice.lang.Throwable")) PrimitiveType.throwableTC = tc; *************** *** 446,450 **** ****************************************************************/ ! private static HashMap tcToClassDef; public static void reset() { tcToClassDef = new HashMap(); } --- 446,450 ---- ****************************************************************/ ! private static Map tcToClassDef; public static void reset() { tcToClassDef = new HashMap(); } Index: ContinueStmt.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/ContinueStmt.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ContinueStmt.java 4 Mar 2003 17:02:55 -0000 1.2 --- ContinueStmt.java 29 May 2003 14:17:17 -0000 1.3 *************** *** 27,32 **** } - private static ContinueStmt instance = new ContinueStmt(null); - private ContinueStmt(LocatedString label) { --- 27,30 ---- Index: Contract.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Contract.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Contract.java 19 Mar 2003 13:48:56 -0000 1.3 --- Contract.java 29 May 2003 14:17:17 -0000 1.4 *************** *** 27,50 **** public void addRequire(Expression condition) { ! pre.add(CallExp.create(symbol("alwaysAssert", condition), condition)); } public void addRequire(Expression condition, Expression name) { ! pre.add(CallExp.create(symbol("alwaysAssert", condition), condition, name)); } public void addEnsure(Expression condition) { ! post.add(CallExp.create(symbol("alwaysAssert", condition), condition)); } public void addEnsure(Expression condition, Expression name) { ! post.add(CallExp.create(symbol("alwaysAssert", condition), condition, name)); } ! private LinkedList pre = new LinkedList(); ! private LinkedList post = new LinkedList(); private Expression symbol(String name, Located loc) --- 27,52 ---- public void addRequire(Expression condition) { ! pre.add(CallExp.create(symbol(assertName, condition), condition)); } public void addRequire(Expression condition, Expression name) { ! pre.add(CallExp.create(symbol(assertName, condition), condition, name)); } public void addEnsure(Expression condition) { ! post.add(CallExp.create(symbol(assertName, condition), condition)); } public void addEnsure(Expression condition, Expression name) { ! post.add(CallExp.create(symbol(assertName, condition), condition, name)); } ! private static final String assertName = "alwaysAssert"; ! ! private List pre = new LinkedList(); ! private List post = new LinkedList(); private Expression symbol(String name, Located loc) Index: Expression.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Expression.java,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** Expression.java 28 May 2003 12:57:26 -0000 1.49 --- Expression.java 29 May 2003 14:17:17 -0000 1.50 *************** *** 190,193 **** --- 190,194 ---- for (int i = 0; i< expressions.length; i++) { + //why has this different behavior compared to the previous method??? expressions[i] = expressions[i].noOverloading(); res[i] = expressions[i].getType(); Index: LocatedString.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/LocatedString.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** LocatedString.java 30 May 2001 19:22:44 -0000 1.17 --- LocatedString.java 29 May 2003 14:17:18 -0000 1.18 *************** *** 75,79 **** public LocatedString cloneLS() { ! return new LocatedString(new String(content),location); } --- 75,79 ---- public LocatedString cloneLS() { ! return new LocatedString(content, location); } Index: MethodBodyDefinition.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/MethodBodyDefinition.java,v retrieving revision 1.122 retrieving revision 1.123 diff -C2 -d -r1.122 -r1.123 *** MethodBodyDefinition.java 24 May 2003 14:16:53 -0000 1.122 --- MethodBodyDefinition.java 29 May 2003 14:17:18 -0000 1.123 *************** *** 165,170 **** private VarSymbol findSymbol(VarScope scope) { - VarSymbol res; - List symbols = scope.lookup(name); if(symbols.size() == 0) return null; --- 165,168 ---- Index: SuperExp.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/SuperExp.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** SuperExp.java 28 May 2003 12:57:26 -0000 1.7 --- SuperExp.java 29 May 2003 14:17:19 -0000 1.8 *************** *** 39,43 **** MethodDeclaration decl = currentMethod.getDeclaration(); - gnu.expr.Expression code; superAlternative = getSuper(decl); } --- 39,42 ---- *************** *** 55,59 **** // Look for the first alternative more general than the current one. ! for (; alternatives.hasNext();) { Alternative a = (Alternative) alternatives.next(); --- 54,58 ---- // Look for the first alternative more general than the current one. ! while (alternatives.hasNext()) { Alternative a = (Alternative) alternatives.next(); Index: TupleExp.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/TupleExp.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** TupleExp.java 28 May 2003 12:57:26 -0000 1.18 --- TupleExp.java 29 May 2003 14:17:19 -0000 1.19 *************** *** 108,113 **** getType(); - int len = expressions.length; - /* We base the array type on the expected type, but we record the --- 108,111 ---- |
From: <ar...@us...> - 2003-05-29 14:03:17
|
Update of /cvsroot/nice/Nice/testsuite/compiler/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv12503/F:/nice/testsuite/compiler/syntax Modified Files: anonymousFunctions.testsuite Log Message: fix typo in testsuite. Index: anonymousFunctions.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/syntax/anonymousFunctions.testsuite,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** anonymousFunctions.testsuite 29 May 2003 08:41:17 -0000 1.7 --- anonymousFunctions.testsuite 29 May 2003 14:03:14 -0000 1.8 *************** *** 30,34 **** /// PASS ! int->() f = int i => {}1; /// PASS --- 30,34 ---- /// PASS ! int->() f = int i => {}; /// PASS |
From: <ar...@us...> - 2003-05-29 08:41:20
|
Update of /cvsroot/nice/Nice/src/bossa/parser In directory sc8-pr-cvs1:/tmp/cvs-serv30665/F:/nice/src/bossa/parser Modified Files: Parser.jj Log Message: Make in types '()' equivalent to 'void'. fixes bug #745278 Index: Parser.jj =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v retrieving revision 1.174 retrieving revision 1.175 diff -C2 -d -r1.174 -r1.175 *** Parser.jj 27 May 2003 22:42:49 -0000 1.174 --- Parser.jj 29 May 2003 08:41:16 -0000 1.175 *************** *** 742,746 **** return (Monotype) domain.get(0); } ! TupleType res = new TupleType(domain, new Location(start, end)); res.nullness = res.absent; return res; --- 742,751 ---- return (Monotype) domain.get(0); } ! Monotype res; ! if (domain != null) ! res = new TupleType(domain, new Location(start, end)); ! else ! res = new TypeIdent(new LocatedString("void",new Location(start, end))); ! res.nullness = res.absent; return res; |
From: <ar...@us...> - 2003-05-29 08:41:20
|
Update of /cvsroot/nice/Nice/debian In directory sc8-pr-cvs1:/tmp/cvs-serv30665/F:/nice/debian Modified Files: changelog Log Message: Make in types '()' equivalent to 'void'. fixes bug #745278 Index: changelog =================================================================== RCS file: /cvsroot/nice/Nice/debian/changelog,v retrieving revision 1.164 retrieving revision 1.165 diff -C2 -d -r1.164 -r1.165 *** changelog 27 May 2003 21:35:36 -0000 1.164 --- changelog 29 May 2003 08:41:17 -0000 1.165 *************** *** 3,6 **** --- 3,7 ---- * Stable version, based on 0.7.9 * Added operators to compute with java.math.BigInteger (+,-,*,/,%,...). + * In returntypes is '()' now equivalent to 'void' so int->() is a valid type. * Bugfixes (some cases of optional parameters, allowing arbitrarily nested tuples on the left side of an assignment, recursion for local functions, |
From: <ar...@us...> - 2003-05-29 08:41:20
|
Update of /cvsroot/nice/Nice/testsuite/compiler/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv30665/F:/nice/testsuite/compiler/syntax Modified Files: anonymousFunctions.testsuite Log Message: Make in types '()' equivalent to 'void'. fixes bug #745278 Index: anonymousFunctions.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/syntax/anonymousFunctions.testsuite,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** anonymousFunctions.testsuite 28 May 2003 09:04:58 -0000 1.6 --- anonymousFunctions.testsuite 29 May 2003 08:41:17 -0000 1.7 *************** *** 28,29 **** --- 28,35 ---- /// PASS String s = (<Any T>(T x)=>x)("ABC"); + + /// PASS + int->() f = int i => {}1; + + /// PASS + void m(boolean->() f) {} |
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv15634/F:/nice/src/bossa/syntax Modified Files: AbstractInterface.java Alike.java AssignExp.java Block.java BreakStmt.java CallExp.java ClassDefinition.java Constructor.java Definition.java Expression.java FunType.java LiteralArrayExp.java MethodDeclaration.java Monotype.java NiceClass.java NiceFieldAccess.java NiceMethod.java Node.java OverloadedSymbolExp.java Pattern.java Polytype.java PrimitiveType.java ReturnStmt.java StringConstantExp.java SuperExp.java ToplevelFunction.java TupleExp.java TupleType.java TypeIdent.java TypeMap.java TypeScope.java Log Message: Lots of minor cleanups: removal of unused import statements, reordering of modifiers, inserted blank lines, etc. Index: AbstractInterface.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/AbstractInterface.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** AbstractInterface.java 14 Oct 2002 15:03:52 -0000 1.14 --- AbstractInterface.java 28 May 2003 12:57:25 -0000 1.15 *************** *** 17,21 **** import mlsub.typing.Interface; - import mlsub.typing.Variance; import mlsub.typing.Typing; --- 17,20 ---- Index: Alike.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Alike.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Alike.java 13 Sep 2001 10:24:58 -0000 1.6 --- Alike.java 28 May 2003 12:57:25 -0000 1.7 *************** *** 27,31 **** public Alike(List parameters, Location location) { ! this.parameters = Monotype.toArray(parameters);; this.location = location; } --- 27,31 ---- public Alike(List parameters, Location location) { ! this.parameters = Monotype.toArray(parameters); this.location = location; } Index: AssignExp.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/AssignExp.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** AssignExp.java 19 Nov 2002 20:17:15 -0000 1.25 --- AssignExp.java 28 May 2003 12:57:25 -0000 1.26 *************** *** 15,21 **** import bossa.util.*; import mlsub.typing.*; - import mlsub.typing.Polytype; - - import bossa.util.Debug; /** --- 15,18 ---- Index: Block.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Block.java,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** Block.java 28 May 2003 10:36:50 -0000 1.58 --- Block.java 28 May 2003 12:57:25 -0000 1.59 *************** *** 44,48 **** } ! static abstract class LocalDeclaration extends Statement { abstract String getName(); --- 44,48 ---- } ! abstract static class LocalDeclaration extends Statement { abstract String getName(); *************** *** 83,87 **** } ! public static abstract class LocalValue extends LocalDeclaration { public LocalValue() --- 83,87 ---- } ! public abstract static class LocalValue extends LocalDeclaration { public LocalValue() Index: BreakStmt.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/BreakStmt.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** BreakStmt.java 30 Apr 2003 11:30:51 -0000 1.4 --- BreakStmt.java 28 May 2003 12:57:26 -0000 1.5 *************** *** 22,26 **** public class BreakStmt extends Statement { ! public final static BreakStmt instance = new BreakStmt(); private BreakStmt() {} --- 22,26 ---- public class BreakStmt extends Statement { ! public static final BreakStmt instance = new BreakStmt(); private BreakStmt() {} Index: CallExp.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/CallExp.java,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** CallExp.java 27 May 2003 12:40:08 -0000 1.77 --- CallExp.java 28 May 2003 12:57:26 -0000 1.78 *************** *** 24,30 **** import mlsub.typing.FunType; import mlsub.typing.TupleType; - import mlsub.typing.MonotypeConstructor; import mlsub.typing.Constraint; - import mlsub.typing.MonotypeLeqCst; /** --- 24,28 ---- Index: ClassDefinition.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/ClassDefinition.java,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -d -r1.90 -r1.91 *** ClassDefinition.java 29 Apr 2003 13:25:14 -0000 1.90 --- ClassDefinition.java 28 May 2003 12:57:26 -0000 1.91 *************** *** 15,19 **** import bossa.util.*; import mlsub.typing.*; - import nice.tools.code.Types; import gnu.bytecode.*; --- 15,18 ---- *************** *** 26,30 **** @author Daniel Bonniot (bo...@us...) */ ! abstract public class ClassDefinition extends MethodContainer { public static --- 25,29 ---- @author Daniel Bonniot (bo...@us...) */ ! public abstract class ClassDefinition extends MethodContainer { public static *************** *** 259,263 **** abs = TypeIdent.resolveToItf(typeScope, abstractions); ! implementations = abstractions = null; // Resolve the super-interfaces first. --- 258,263 ---- abs = TypeIdent.resolveToItf(typeScope, abstractions); ! implementations = null; ! abstractions = null; // Resolve the super-interfaces first. *************** *** 516,520 **** /** Java interfaces implemented or extended by this class/interface. */ ! TypeConstructor javaInterfaces[]; mlsub.typing.Interface[] resolveInterfaces(List names) --- 516,520 ---- /** Java interfaces implemented or extended by this class/interface. */ ! TypeConstructor[] javaInterfaces; mlsub.typing.Interface[] resolveInterfaces(List names) *************** *** 542,545 **** --- 542,546 ---- if (javaInterfaces == null) javaInterfaces = new ArrayList(5); + javaInterfaces.add(s); } *************** *** 627,636 **** } ! final static Type javaClass(ClassDefinition c) { if (c == null) return gnu.bytecode.Type.pointer_type; ! else ! return c.getJavaType(); } --- 628,637 ---- } ! static final Type javaClass(ClassDefinition c) { if (c == null) return gnu.bytecode.Type.pointer_type; ! ! return c.getJavaType(); } *************** *** 667,671 **** } ! static abstract class ClassImplementation { abstract void resolveClass(); --- 668,672 ---- } ! abstract static class ClassImplementation { abstract void resolveClass(); Index: Constructor.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Constructor.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Constructor.java 30 Apr 2003 17:26:49 -0000 1.3 --- Constructor.java 28 May 2003 12:57:26 -0000 1.4 *************** *** 16,20 **** import bossa.util.*; import bossa.util.Location; - import nice.tools.code.Types; import nice.tools.code.Gen; --- 16,19 ---- Index: Definition.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Definition.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Definition.java 21 Aug 2002 18:20:32 -0000 1.17 --- Definition.java 28 May 2003 12:57:26 -0000 1.18 *************** *** 77,81 **** */ protected Module module; ! static public Module currentModule; bossa.modules.Compilation compilation() --- 77,81 ---- */ protected Module module; ! public static Module currentModule; bossa.modules.Compilation compilation() Index: Expression.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Expression.java,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** Expression.java 9 May 2003 11:57:38 -0000 1.48 --- Expression.java 28 May 2003 12:57:26 -0000 1.49 *************** *** 29,38 **** implements Located, Printable { ! final static Expression[] toArray(List expressions) { if (expressions == null || expressions.size() == 0) return noExpressions; ! else ! return (Expression[]) expressions.toArray(new Expression[expressions.size()]); } --- 29,38 ---- implements Located, Printable { ! static final Expression[] toArray(List expressions) { if (expressions == null || expressions.size() == 0) return noExpressions; ! ! return (Expression[]) expressions.toArray(new Expression[expressions.size()]); } *************** *** 212,216 **** * Call {@link #generateCode()} instead. */ ! abstract protected gnu.expr.Expression compile(); /** --- 212,216 ---- * Call {@link #generateCode()} instead. */ ! protected abstract gnu.expr.Expression compile(); /** Index: FunType.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/FunType.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** FunType.java 7 May 2003 08:26:12 -0000 1.28 --- FunType.java 28 May 2003 12:57:26 -0000 1.29 *************** *** 18,22 **** import mlsub.typing.*; import mlsub.typing.Monotype; - import mlsub.typing.FunTypeKind; /** --- 18,21 ---- Index: LiteralArrayExp.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/LiteralArrayExp.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** LiteralArrayExp.java 18 Nov 2002 15:54:43 -0000 1.14 --- LiteralArrayExp.java 28 May 2003 12:57:26 -0000 1.15 *************** *** 20,30 **** import mlsub.typing.Monotype; import mlsub.typing.MonotypeConstructor; - import mlsub.typing.MonotypeVar; import mlsub.typing.Polytype; - import mlsub.typing.Constraint; - import mlsub.typing.TypeConstructor; - import mlsub.typing.TypeSymbol; - import mlsub.typing.Typing; - import mlsub.typing.TypingEx; /** --- 20,24 ---- Index: MethodDeclaration.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/MethodDeclaration.java,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** MethodDeclaration.java 26 May 2003 20:52:27 -0000 1.41 --- MethodDeclaration.java 28 May 2003 12:57:26 -0000 1.42 *************** *** 14,19 **** import bossa.util.*; - import bossa.util.Location; - import bossa.util.Debug; import mlsub.typing.*; --- 14,17 ---- *************** *** 42,46 **** @author Daniel Bonniot (d.b...@ma...) */ ! abstract public class MethodDeclaration extends Definition { /** --- 40,44 ---- @author Daniel Bonniot (d.b...@ma...) */ ! public abstract class MethodDeclaration extends Definition { /** *************** *** 308,313 **** if(getDefinition() instanceof FieldAccess) return (FieldAccess) getDefinition(); ! else ! return null; } --- 306,311 ---- if(getDefinition() instanceof FieldAccess) return (FieldAccess) getDefinition(); ! ! return null; } Index: Monotype.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Monotype.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** Monotype.java 7 May 2003 08:26:12 -0000 1.32 --- Monotype.java 28 May 2003 12:57:26 -0000 1.33 *************** *** 24,37 **** @author Daniel Bonniot (d.b...@ma...) */ ! abstract public class Monotype implements Located { ! final static Monotype[] toArray(List monotypes) { if (monotypes == null) return array0; ! else ! return ! (Monotype[]) monotypes.toArray(new Monotype[monotypes.size()]); } --- 24,36 ---- @author Daniel Bonniot (d.b...@ma...) */ ! public abstract class Monotype implements Located { ! static final Monotype[] toArray(List monotypes) { if (monotypes == null) return array0; ! ! return (Monotype[]) monotypes.toArray(new Monotype[monotypes.size()]); } *************** *** 59,75 **** abstract boolean containsAlike(); ! final static boolean containsAlike(List monotypes) { for(Iterator i = monotypes.iterator(); i.hasNext();) if(((Monotype) i.next()).containsAlike()) return true; ! return false; } ! final static boolean containsAlike(Monotype[] monotypes) { for(int i = monotypes.length; --i >= 0;) if (monotypes[i].containsAlike()) return true; return false; } --- 58,76 ---- abstract boolean containsAlike(); ! static final boolean containsAlike(List monotypes) { for(Iterator i = monotypes.iterator(); i.hasNext();) if(((Monotype) i.next()).containsAlike()) return true; ! ! return false; } ! static final boolean containsAlike(Monotype[] monotypes) { for(int i = monotypes.length; --i >= 0;) if (monotypes[i].containsAlike()) return true; + return false; } *************** *** 118,123 **** else return sure(raw); } - throw Internal.error("Bad nullness tag"); } --- 119,125 ---- else return sure(raw); + default: + throw Internal.error("Bad nullness tag"); } } *************** *** 192,195 **** --- 194,198 ---- for(int i = m.length; --i >= 0;) res[i] = m[i].substitute(map); + return res; } *************** *** 269,274 **** if (res != null) return (mlsub.typing.Monotype) res; ! else ! return type; } } --- 272,277 ---- if (res != null) return (mlsub.typing.Monotype) res; ! ! return type; } } Index: NiceClass.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/NiceClass.java,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** NiceClass.java 19 May 2003 18:49:56 -0000 1.45 --- NiceClass.java 28 May 2003 12:57:26 -0000 1.46 *************** *** 19,26 **** import mlsub.typing.AtomicConstraint; - import gnu.bytecode.Access; import java.util.*; - import bossa.util.Debug; import nice.tools.code.Types; import nice.tools.code.Gen; --- 19,24 ---- Index: NiceFieldAccess.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/NiceFieldAccess.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** NiceFieldAccess.java 12 Feb 2003 13:05:42 -0000 1.13 --- NiceFieldAccess.java 28 May 2003 12:57:26 -0000 1.14 *************** *** 16,21 **** import nice.tools.code.*; - import mlsub.typing.TypeConstructor; - import gnu.bytecode.*; import gnu.expr.*; --- 16,19 ---- Index: NiceMethod.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/NiceMethod.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** NiceMethod.java 27 May 2003 11:19:03 -0000 1.21 --- NiceMethod.java 28 May 2003 12:57:26 -0000 1.22 *************** *** 21,27 **** import java.util.*; - import bossa.util.Location; - import bossa.util.Debug; - /** A method defined in Nice. --- 21,24 ---- Index: Node.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Node.java,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** Node.java 12 May 2003 18:00:39 -0000 1.55 --- Node.java 28 May 2003 12:57:26 -0000 1.56 *************** *** 270,274 **** // They won't be used anymore // Let's enable the memory to be reclamed ! varSymbols = typeMapsSymbols = typeMapsNames = null; // builds the scope of the children --- 270,276 ---- // They won't be used anymore // Let's enable the memory to be reclamed ! varSymbols = null; ! typeMapsSymbols = null; ! typeMapsNames = null; // builds the scope of the children Index: OverloadedSymbolExp.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/OverloadedSymbolExp.java,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** OverloadedSymbolExp.java 27 May 2003 12:40:08 -0000 1.53 --- OverloadedSymbolExp.java 28 May 2003 12:57:26 -0000 1.54 *************** *** 19,23 **** import mlsub.typing.*; - import mlsub.typing.lowlevel.Kind; import mlsub.typing.Polytype; import mlsub.typing.FunType; --- 19,22 ---- Index: Pattern.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Pattern.java,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** Pattern.java 28 Apr 2003 18:10:29 -0000 1.46 --- Pattern.java 28 May 2003 12:57:26 -0000 1.47 *************** *** 15,24 **** import java.util.*; import bossa.util.*; - import mlsub.typing.Domain; import mlsub.typing.TypeConstructor; - import mlsub.typing.Polytype; import mlsub.typing.Monotype; - import mlsub.typing.MonotypeVar; - import mlsub.typing.Constraint; import mlsub.typing.MonotypeConstructor; import mlsub.typing.Typing; --- 15,20 ---- *************** *** 341,344 **** --- 337,341 ---- if (atBool()) return atTrue(); + return tc == PrimitiveType.boolTC; } *************** *** 348,351 **** --- 345,349 ---- if (atBool()) return atFalse(); + return tc == PrimitiveType.boolTC; } *************** *** 537,540 **** --- 535,539 ---- if (atFalse()) return Gen.boolNotExp(parameter); + return parameter; } Index: Polytype.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Polytype.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Polytype.java 13 Sep 2001 10:24:58 -0000 1.23 --- Polytype.java 28 May 2003 12:57:26 -0000 1.24 *************** *** 16,21 **** import bossa.util.*; - import mlsub.typing.TypeConstructor; - /** A constrained monotype. --- 16,19 ---- Index: PrimitiveType.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/PrimitiveType.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PrimitiveType.java 13 Mar 2003 23:19:42 -0000 1.5 --- PrimitiveType.java 28 May 2003 12:57:26 -0000 1.6 *************** *** 19,23 **** import mlsub.typing.TypeConstructor; - import mlsub.typing.TypeSymbol; import mlsub.typing.MonotypeConstructor; --- 19,22 ---- Index: ReturnStmt.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/ReturnStmt.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** ReturnStmt.java 13 Mar 2003 23:19:42 -0000 1.28 --- ReturnStmt.java 28 May 2003 12:57:26 -0000 1.29 *************** *** 17,22 **** import mlsub.typing.*; import mlsub.typing.Polytype; - import mlsub.typing.Monotype; - import mlsub.typing.Constraint; /** --- 17,20 ---- *************** *** 43,46 **** --- 41,45 ---- if (value != null) this.setLocation(value.location()); + this.fake = fake; } *************** *** 50,55 **** if (value == null) return PrimitiveType.voidPolytype; ! else ! return value.getType(); } --- 49,54 ---- if (value == null) return PrimitiveType.voidPolytype; ! ! return value.getType(); } *************** *** 62,67 **** if (value == null) return nice.tools.code.Gen.returnVoid(); ! else ! return nice.tools.code.Gen.returnValue(value.generateCode()); } --- 61,66 ---- if (value == null) return nice.tools.code.Gen.returnVoid(); ! ! return nice.tools.code.Gen.returnValue(value.generateCode()); } Index: StringConstantExp.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/StringConstantExp.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** StringConstantExp.java 12 May 2001 22:16:28 -0000 1.6 --- StringConstantExp.java 28 May 2003 12:57:26 -0000 1.7 *************** *** 43,49 **** i++; char c2; ! if (! (i < n)) { ! //throw new IllegalEscapeSequenceException("\\"); } switch (c2 = s.charAt(i)) { case 'b': sb.append('\b'); break; --- 43,51 ---- i++; char c2; ! /* ! if (! (i < n)) { ! throw new IllegalEscapeSequenceException("\\"); } + */ switch (c2 = s.charAt(i)) { case 'b': sb.append('\b'); break; Index: SuperExp.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/SuperExp.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SuperExp.java 18 Apr 2003 14:50:20 -0000 1.6 --- SuperExp.java 28 May 2003 12:57:26 -0000 1.7 *************** *** 21,25 **** import mlsub.typing.Polytype; import mlsub.typing.Monotype; - import mlsub.typing.MonotypeConstructor; import mlsub.typing.FunType; import mlsub.typing.Constraint; --- 21,24 ---- *************** *** 167,176 **** { AtomicConstraint[] oldAtoms = c.atoms(); ! AtomicConstraint[] newAtoms = new AtomicConstraint ! [(oldAtoms == null ? 0 : oldAtoms.length) + p.length]; ! if (oldAtoms != null) System.arraycopy(oldAtoms, 0, newAtoms, 0, oldAtoms.length); for (int i = 0; i < p.length; i++) newAtoms[newAtoms.length - 1 - i] = new TypeConstructorLeqMonotypeCst(p[i].tc, m[i]); return new Constraint(c.binders(), newAtoms); } --- 166,180 ---- { AtomicConstraint[] oldAtoms = c.atoms(); ! AtomicConstraint[] newAtoms; ! if (oldAtoms != null) { ! newAtoms = new AtomicConstraint[oldAtoms.length + p.length]; System.arraycopy(oldAtoms, 0, newAtoms, 0, oldAtoms.length); + } + else + newAtoms = new AtomicConstraint[p.length]; + for (int i = 0; i < p.length; i++) newAtoms[newAtoms.length - 1 - i] = new TypeConstructorLeqMonotypeCst(p[i].tc, m[i]); + return new Constraint(c.binders(), newAtoms); } *************** *** 184,192 **** TypeConstructor superClass = ClassDefinition.get(tc).getSuperClass(); if (superClass != null) ! { ! TypeConstructor res = findTCforClass(superClass, t); ! if (res != null) ! return res; ! } return null; --- 188,192 ---- TypeConstructor superClass = ClassDefinition.get(tc).getSuperClass(); if (superClass != null) ! return findTCforClass(superClass, t); return null; Index: ToplevelFunction.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/ToplevelFunction.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ToplevelFunction.java 25 Oct 2002 13:06:07 -0000 1.16 --- ToplevelFunction.java 28 May 2003 12:57:26 -0000 1.17 *************** *** 15,19 **** import bossa.util.*; import mlsub.typing.*; - import nice.tools.code.Types; import nice.tools.code.Gen; --- 15,18 ---- *************** *** 23,27 **** import java.util.*; - import bossa.util.Location; import bossa.util.Debug; --- 22,25 ---- Index: TupleExp.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/TupleExp.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** TupleExp.java 30 Apr 2003 18:55:30 -0000 1.17 --- TupleExp.java 28 May 2003 12:57:26 -0000 1.18 *************** *** 23,27 **** import gnu.bytecode.Type; - import gnu.bytecode.ArrayType; import gnu.expr.*; import gnu.expr.Expression; --- 23,26 ---- Index: TupleType.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/TupleType.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TupleType.java 26 Jul 2002 16:11:15 -0000 1.6 --- TupleType.java 28 May 2003 12:57:26 -0000 1.7 *************** *** 18,22 **** import mlsub.typing.*; import mlsub.typing.Monotype; - import mlsub.typing.TupleKind; --- 18,21 ---- Index: TypeIdent.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/TypeIdent.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** TypeIdent.java 17 Feb 2003 14:09:54 -0000 1.22 --- TypeIdent.java 28 May 2003 12:57:26 -0000 1.23 *************** *** 19,23 **** import mlsub.typing.MonotypeVar; import mlsub.typing.TypeSymbol; - import nice.tools.code.Types; /** --- 19,22 ---- Index: TypeMap.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/TypeMap.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TypeMap.java 16 Sep 2002 13:43:48 -0000 1.3 --- TypeMap.java 28 May 2003 12:57:26 -0000 1.4 *************** *** 21,25 **** public interface TypeMap { ! abstract mlsub.typing.TypeSymbol lookup(LocatedString name); ! abstract mlsub.typing.TypeSymbol lookup(String name); } --- 21,25 ---- public interface TypeMap { ! mlsub.typing.TypeSymbol lookup(LocatedString name); ! mlsub.typing.TypeSymbol lookup(String name); } Index: TypeScope.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/TypeScope.java,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** TypeScope.java 22 Mar 2003 12:43:21 -0000 1.39 --- TypeScope.java 28 May 2003 12:57:26 -0000 1.40 *************** *** 16,21 **** import bossa.util.*; import mlsub.typing.TypeSymbol; - import mlsub.typing.TypeConstructor; - import mlsub.typing.Variance; /** --- 16,19 ---- |
From: <bo...@us...> - 2003-05-28 11:20:18
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang In directory sc8-pr-cvs1:/tmp/cvs-serv11211/stdlib/nice/lang Modified Files: ForInIters.nice Log Message: Added newline at the end of the file. Index: ForInIters.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/ForInIters.nice,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ForInIters.nice 11 Mar 2003 17:20:26 -0000 1.1 --- ForInIters.nice 28 May 2003 11:20:14 -0000 1.2 *************** *** 46,48 **** next() = ++pos<strb.length(); current() = strb.charAt(pos); ! } \ No newline at end of file --- 46,48 ---- next() = ++pos<strb.length(); current() = strb.charAt(pos); ! } |
From: <ar...@us...> - 2003-05-28 11:17:57
|
Update of /cvsroot/nice/Nice/testsuite/compiler/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv21379/F:/nice/testsuite/compiler/syntax Modified Files: tuples.testsuite Log Message: Test location of errors in tuple declarations. Index: tuples.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/syntax/tuples.testsuite,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tuples.testsuite 8 May 2003 11:01:29 -0000 1.2 --- tuples.testsuite 28 May 2003 10:48:42 -0000 1.3 *************** *** 25,26 **** --- 25,29 ---- (x,y) = ("1","2"); assert x.equals("1") && y.equals("2"); + + /// FAIL + /*/// FAIL HERE */(String s, int i) = (5, "abc"); |
From: <ar...@us...> - 2003-05-28 10:36:54
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv14562/F:/nice/src/bossa/syntax Modified Files: Block.java Log Message: removed unused field. Index: Block.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Block.java,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** Block.java 27 May 2003 20:43:20 -0000 1.57 --- Block.java 28 May 2003 10:36:50 -0000 1.58 *************** *** 179,188 **** boolean isAssignable() { return false; } - - /* - Index to make the initialization analysis or -1 if - this variable is always initialized. - */ - int index = -1; } --- 179,182 ---- |
From: <ar...@us...> - 2003-05-28 09:05:02
|
Update of /cvsroot/nice/Nice/testsuite/compiler/typing In directory sc8-pr-cvs1:/tmp/cvs-serv10646/F:/nice/testsuite/compiler/typing Modified Files: if.testsuite Log Message: Update of the syntax used in the testsuite testcases. Index: if.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/typing/if.testsuite,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** if.testsuite 24 Sep 2002 11:38:15 -0000 1.1 --- if.testsuite 28 May 2003 09:04:59 -0000 1.2 *************** *** 3,5 **** /// FAIL ! final f = true ? "string" : 0; --- 3,5 ---- /// FAIL ! let f = true ? "string" : 0; |
From: <ar...@us...> - 2003-05-28 09:05:02
|
Update of /cvsroot/nice/Nice/testsuite/compiler/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv10646/F:/nice/testsuite/compiler/syntax Modified Files: anonymousFunctions.testsuite expressions.testsuite Log Message: Update of the syntax used in the testsuite testcases. Index: anonymousFunctions.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/syntax/anonymousFunctions.testsuite,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** anonymousFunctions.testsuite 20 Feb 2003 00:02:19 -0000 1.5 --- anonymousFunctions.testsuite 28 May 2003 09:04:58 -0000 1.6 *************** *** 1,13 **** /// PASS ! final f = (int x)=> x+1; /// PASS ! final f = (int x, int y)=> x+y; /// PASS ! final f = int x => x+1; /// PASS ! final f = int x => int y => x+y; /// PASS --- 1,13 ---- /// PASS ! let f = int x => x+1; /// PASS ! let f = (int x, int y)=> x+y; /// PASS ! let f = int x => x+1; /// PASS ! let f = int x => int y => x+y; /// PASS Index: expressions.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/syntax/expressions.testsuite,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** expressions.testsuite 28 Apr 2003 23:28:46 -0000 1.3 --- expressions.testsuite 28 May 2003 09:04:58 -0000 1.4 *************** *** 1,4 **** /// PASS ! final x = fun(int x)=>x=1; /// PASS --- 1,4 ---- /// PASS ! let x = int x => x=1; /// PASS *************** *** 10,22 **** ("a".f2)("b"); /// TOPLEVEL ! String->void f2(String x) = fun(String y)=> {}; /// PASS "a".f3("b")("c"); /// TOPLEVEL ! String->void f3(String x, String y)= fun(String z)=> {}; /// PASS ("a".f4)("b")("c"); /// TOPLEVEL ! String->String->void f4(String x) = fun(String y)=> fun(String z)=> {}; --- 10,22 ---- ("a".f2)("b"); /// TOPLEVEL ! String->void f2(String x) = String y => {}; /// PASS "a".f3("b")("c"); /// TOPLEVEL ! String->void f3(String x, String y)= String z => {}; /// PASS ("a".f4)("b")("c"); /// TOPLEVEL ! String->String->void f4(String x) = String y => String z => {}; |
From: <ar...@us...> - 2003-05-28 09:05:02
|
Update of /cvsroot/nice/Nice/testsuite/compiler/statements/variables In directory sc8-pr-cvs1:/tmp/cvs-serv10646/F:/nice/testsuite/compiler/statements/variables Modified Files: typeInference.testsuite Log Message: Update of the syntax used in the testsuite testcases. Index: typeInference.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/statements/variables/typeInference.testsuite,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** typeInference.testsuite 28 Apr 2003 15:49:19 -0000 1.1 --- typeInference.testsuite 28 May 2003 09:04:59 -0000 1.2 *************** *** 1,9 **** /// PASS ! final x = 3; int y = x + 1; /// FAIL // An incorrect use of a polymorphic reference. ! final /* /// FAIL HERE */ l = new ArrayList(); l.add("Hello"); java.io.File f = l.get(0); --- 1,9 ---- /// PASS ! let x = 3; int y = x + 1; /// FAIL // An incorrect use of a polymorphic reference. ! let /* /// FAIL HERE */ l = new ArrayList(); l.add("Hello"); java.io.File f = l.get(0); |
From: <ar...@us...> - 2003-05-27 23:42:20
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv32592/F:/nice/src/bossa/syntax Modified Files: typecheck.nice Log Message: Removed method monoSymbol which was a duplicate of the method localVariable. Index: typecheck.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/typecheck.nice,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** typecheck.nice 27 May 2003 20:43:20 -0000 1.70 --- typecheck.nice 27 May 2003 23:42:15 -0000 1.71 *************** *** 46,50 **** } catch(TypingEx t){ ! ?MonoSymbol variable = monoSymbol(to); if (variable != null) if (hasConditionalType(variable) && isNullError(t)) { --- 46,50 ---- } catch(TypingEx t){ ! ?MonoSymbol variable = localVariable(to); if (variable != null) if (hasConditionalType(variable) && isNullError(t)) { *************** *** 77,90 **** to.getType().toString(), notNull(e.value)); } - } - - ?MonoSymbol monoSymbol(Expression); - monoSymbol(e) = null; - monoSymbol(e@SymbolExp) - { - if (e.getSymbol() instanceof bossa.syntax.MonoSymbol) - return cast(e.getSymbol()); - else - return null; } --- 77,80 ---- |
From: <ar...@us...> - 2003-05-27 22:42:53
|
Update of /cvsroot/nice/Nice/src/bossa/parser In directory sc8-pr-cvs1:/tmp/cvs-serv13403/F:/nice/src/bossa/parser Modified Files: Parser.jj Log Message: Set the location of a tuple declaration. Index: Parser.jj =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v retrieving revision 1.173 retrieving revision 1.174 diff -C2 -d -r1.173 -r1.174 *** Parser.jj 19 May 2003 18:49:56 -0000 1.173 --- Parser.jj 27 May 2003 22:42:49 -0000 1.174 *************** *** 2446,2457 **** { Expression e; } { ! "(" { List parts = new LinkedList(); Expression part; } part = LocalTuplePart(statements) { parts.add(part); } ( "," part = LocalTuplePart(statements) { parts.add(part); } )+ ! ")" "=" e=Expression() ";" ! { return new ExpressionStmt(AssignExp.create(new TupleExp(parts), e)); } } --- 2446,2460 ---- { Expression e; + Token first,last; } { ! first="(" { List parts = new LinkedList(); Expression part; } part = LocalTuplePart(statements) { parts.add(part); } ( "," part = LocalTuplePart(statements) { parts.add(part); } )+ ! last=")" "=" e=Expression() ";" ! { Expression exp = AssignExp.create(new TupleExp(parts), e); ! exp.setLocation(new Location(first,last)); ! return new ExpressionStmt(exp); } } |
From: <ar...@us...> - 2003-05-27 21:35:40
|
Update of /cvsroot/nice/Nice/debian In directory sc8-pr-cvs1:/tmp/cvs-serv19002/F:/nice/debian Modified Files: changelog Log Message: Update of the changelog. Index: changelog =================================================================== RCS file: /cvsroot/nice/Nice/debian/changelog,v retrieving revision 1.163 retrieving revision 1.164 diff -C2 -d -r1.163 -r1.164 *** changelog 22 May 2003 12:36:33 -0000 1.163 --- changelog 27 May 2003 21:35:36 -0000 1.164 *************** *** 6,10 **** tuples on the left side of an assignment, recursion for local functions, allow method parameter's default values to refer to 'this' when the method ! is declared inside a class, declaration of multiple local variables). -- Daniel Bonniot <bo...@us...> Wed, 14 May 2003 16:30:15 +0200 --- 6,14 ---- tuples on the left side of an assignment, recursion for local functions, allow method parameter's default values to refer to 'this' when the method ! is declared inside a class, declaration of multiple local variables, ! nested type parameters in method declarations, improved some error messages, ! resolving overloading between fields and global variables, implemented ! nullness inference for local constants, return type of error throwing ! anonymous functions). -- Daniel Bonniot <bo...@us...> Wed, 14 May 2003 16:30:15 +0200 |
From: <ar...@us...> - 2003-05-27 21:07:58
|
Update of /cvsroot/nice/Nice/testsuite/compiler/null In directory sc8-pr-cvs1:/tmp/cvs-serv6202/F:/nice/testsuite/compiler/null Modified Files: constants.testsuite Log Message: Don't allow nullness inference on global variables. Index: constants.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/null/constants.testsuite,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** constants.testsuite 27 May 2003 20:43:22 -0000 1.1 --- constants.testsuite 27 May 2003 21:07:55 -0000 1.2 *************** *** 33,36 **** --- 33,46 ---- s = "xyz"; + /// PASS + if (str != null) + str.trim(); + /// Toplevel + let ?String str = null; + /// FAIL + if (str != null) + str.trim(); + /// Toplevel + var ?String str = null; |
From: <ar...@us...> - 2003-05-27 21:07:58
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv6202/F:/nice/src/bossa/syntax Modified Files: tools.nice Log Message: Don't allow nullness inference on global variables. Index: tools.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/tools.nice,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** tools.nice 16 May 2003 12:05:15 -0000 1.21 --- tools.nice 27 May 2003 21:07:53 -0000 1.22 *************** *** 43,48 **** localVariable(e@SymbolExp) { ! if (e.getSymbol() instanceof bossa.syntax.MonoSymbol) return cast(e.getSymbol()); return null; } --- 43,55 ---- localVariable(e@SymbolExp) { ! let sym = e.getSymbol(); ! if (sym instanceof bossa.syntax.MonoSymbol) { ! //don't allow nullness inference on global variables. ! if (sym instanceof GlobalVarDeclaration.GlobalVarSymbol && ! sym.isAssignable()) ! return null; ! return cast(e.getSymbol()); + } return null; } |
From: <ar...@us...> - 2003-05-27 20:43:25
|
Update of /cvsroot/nice/Nice/testsuite/compiler/null In directory sc8-pr-cvs1:/tmp/cvs-serv27561/F:/nice/testsuite/compiler/null Added Files: constants.testsuite Log Message: Implemented nullness inference of local constants. fixes bug report #738476. --- NEW FILE: constants.testsuite --- /// PASS ?String str = "abc"; let s = str; if (s != null) s.trim(); /// FAIL ?String str = "abc"; let s = str; if (s == null) s.trim(); /// PASS ?String str = "abc"; let s = str; assert (s != null && s.startsWith("a")); /// PASS /// Toplevel class A { ?String cache; void get() { let c = cache; if (c != null) { String s = c; } } } /// FAIL ?String str = "abc"; let s = str; s = "xyz"; |
From: <ar...@us...> - 2003-05-27 20:43:24
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv27561/F:/nice/src/bossa/syntax Modified Files: Block.java typecheck.nice Log Message: Implemented nullness inference of local constants. fixes bug report #738476. Index: Block.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Block.java,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** Block.java 29 Apr 2003 10:17:07 -0000 1.56 --- Block.java 27 May 2003 20:43:20 -0000 1.57 *************** *** 171,178 **** public static class LocalConstant extends LocalValue { public LocalConstant(LocatedString name, Expression value) { this.value = value; ! this.left = new PolySymbol(name,null); this.last = this; } --- 171,194 ---- public static class LocalConstant extends LocalValue { + static class Symbol extends MonoSymbol + { + Symbol(LocatedString name, Monotype type) + { + super(name, type); + } + + boolean isAssignable() { return false; } + + /* + Index to make the initialization analysis or -1 if + this variable is always initialized. + */ + int index = -1; + } + public LocalConstant(LocatedString name, Expression value) { this.value = value; ! this.left = new LocalConstant.Symbol(name,null); this.last = this; } *************** *** 182,186 **** gnu.bytecode.Type getBytecodeType() { return Types.javaType(left.type); } ! PolySymbol left; public void addNext(LocatedString name, Expression value) --- 198,202 ---- gnu.bytecode.Type getBytecodeType() { return Types.javaType(left.type); } ! MonoSymbol left; public void addNext(LocatedString name, Expression value) Index: typecheck.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/typecheck.nice,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** typecheck.nice 21 May 2003 15:55:33 -0000 1.69 --- typecheck.nice 27 May 2003 20:43:20 -0000 1.70 *************** *** 594,600 **** decl.value = notNull(decl.value).noOverloading(); mlsub.typing.Polytype type = notNull(decl.value).getType(); - notNull(decl.left).type = type; ! checkMonomorphic(type, decl); } --- 594,599 ---- decl.value = notNull(decl.value).noOverloading(); mlsub.typing.Polytype type = notNull(decl.value).getType(); ! notNull(decl.left).type = checkMonomorphic(type, decl); } |
From: <bo...@us...> - 2003-05-27 12:40:12
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv1844/src/bossa/syntax Modified Files: OverloadedSymbolExp.java CallExp.java Arguments.java Log Message: Fields still get priority when resolving overloading, but if none is applicable, then the other symbols get a chance. Index: OverloadedSymbolExp.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/OverloadedSymbolExp.java,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** OverloadedSymbolExp.java 30 Apr 2003 18:55:30 -0000 1.52 --- OverloadedSymbolExp.java 27 May 2003 12:40:08 -0000 1.53 *************** *** 127,132 **** removed.clear(); ! int sym = 0; ! for(Iterator i = symbols.iterator(); i.hasNext(); sym++) { VarSymbol s = (VarSymbol) i.next(); --- 127,131 ---- removed.clear(); ! for (Iterator i = symbols.iterator(); i.hasNext(); ) { VarSymbol s = (VarSymbol) i.next(); *************** *** 225,237 **** } ! if (fieldAccesses.size() != 0) ! return accessToFieldInThis(fieldAccesses); ! ! if(symbols.size()==0) ! User.error(this, ! "No alternative has expected type "+expectedType); ! ! releaseAllClonedTypes(); ! throw new AmbiguityError(); } --- 224,235 ---- } ! try { ! return givePriorityToFields(fieldAccesses, ! "No symbol named " + ident + ! " has expected type " + expectedType); ! } ! finally { ! releaseAllClonedTypes(); ! } } *************** *** 253,260 **** return uniqueExpression(); ! // Field access has precedence over method call. ! List fieldAccesses = filterFieldAccesses(); if (fieldAccesses.size() != 0) ! return accessToFieldInThis(fieldAccesses); throw new AmbiguityError(); --- 251,279 ---- return uniqueExpression(); ! return givePriorityToFields ! (filterFieldAccesses(), ! "No variable or field in this class has name " + ident); ! } ! ! private Expression givePriorityToFields ! (List fieldAccesses, String errorMessage) ! { if (fieldAccesses.size() != 0) ! try { ! CallExp res = new CallExp ! (new OverloadedSymbolExp(fieldAccesses, ident), ! Arguments.noArguments()); ! res.resolveOverloading(); ! return res; ! } ! catch (UserError e) { ! symbols.removeAll(filterFieldAccesses()); ! ! if (symbols.size() == 0) ! User.error(this, errorMessage); ! ! if (symbols.size() == 1) ! return uniqueExpression(); ! } throw new AmbiguityError(); *************** *** 271,280 **** } return res; - } - - private Expression accessToFieldInThis(List fieldAccesses) - { - return new CallExp(new OverloadedSymbolExp(fieldAccesses, ident), - Arguments.noArguments()); } --- 290,293 ---- Index: CallExp.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/CallExp.java,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** CallExp.java 30 Apr 2003 18:55:32 -0000 1.76 --- CallExp.java 27 May 2003 12:40:08 -0000 1.77 *************** *** 234,238 **** private boolean overloadingResolved; ! private void resolveOverloading() { // do not resolve twice --- 234,238 ---- private boolean overloadingResolved; ! void resolveOverloading() { // do not resolve twice Index: Arguments.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Arguments.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Arguments.java 30 Apr 2003 17:26:48 -0000 1.17 --- Arguments.java 27 May 2003 12:40:09 -0000 1.18 *************** *** 136,140 **** PackageExp packageExp() { - noOverloading(); // case where the parameters is a package, or a package prefix if(arguments.length == 1) --- 136,139 ---- |
From: <bo...@us...> - 2003-05-27 12:40:11
|
Update of /cvsroot/nice/Nice/testsuite/compiler/overloading In directory sc8-pr-cvs1:/tmp/cvs-serv1844/testsuite/compiler/overloading Added Files: fields.testsuite ambiguity.testsuite Log Message: Fields still get priority when resolving overloading, but if none is applicable, then the other symbols get a chance. --- NEW FILE: fields.testsuite --- /// COMMENT Special handling of class fields during overloading resolution. /// PASS let i = x; assert(i==1); /// Toplevel let int x = 1; class A { int x = 0; } /// PASS new A().foo(); /// Toplevel let int x = 1; class A { int x = 0; void foo() { let i = x; assert(i==0); } } /// PASS let i = foo(); assert(i==1); /// Toplevel class X { int foo = 0; } int foo() = 1; /// PASS let i = foo; assert(i==1); /// Toplevel class X { int foo = 0; } var int foo = 1; /// PASS new A().foo(); ///Toplevel class A { int x = 1; void foo() { let i = x; assert(i==1); } } class B { int x = 0; } /// FAIL let i = x; /// Toplevel class A { int x; } /// PASS new A().foo(); /// Toplevel interface I {} class A implements I { int x = 0; void foo() { let z = x; assert(z==0); } } class B implements I { int x = 1; } /// PASS /// Toplevel class A { String[] overloaded; } class B { String[] overloaded; int next() = overloaded.length; } /// PASS let A->int i = x; assert i(new A()) == 1; /// Toplevel let A->int x = A a => 1; class A { int x = 0; } --- NEW FILE: ambiguity.testsuite --- /// FAIL let i = foo; /// Toplevel var int foo = 0; int foo() = 1; |
From: <ar...@us...> - 2003-05-27 11:19:07
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv4919/F:/nice/src/bossa/syntax Modified Files: NiceMethod.java Log Message: Reverse last change because of case sensetivity. Index: NiceMethod.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/NiceMethod.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** NiceMethod.java 27 May 2003 07:41:37 -0000 1.20 --- NiceMethod.java 27 May 2003 11:19:03 -0000 1.21 *************** *** 98,102 **** { TypeConstructor alikeTC = ! new TypeConstructor("alike", c.variance, false, false); constraint.addBinder(alikeTC); --- 98,102 ---- { TypeConstructor alikeTC = ! new TypeConstructor("Alike", c.variance, false, false); constraint.addBinder(alikeTC); |
From: <ar...@us...> - 2003-05-27 07:41:40
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv15552/F:/nice/src/bossa/syntax Modified Files: NiceMethod.java MonotypeConstructor.java Log Message: Improved error message in case of an 'alike' fixes #744014. Index: NiceMethod.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/NiceMethod.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** NiceMethod.java 25 Oct 2002 13:06:07 -0000 1.19 --- NiceMethod.java 27 May 2003 07:41:37 -0000 1.20 *************** *** 98,102 **** { TypeConstructor alikeTC = ! new TypeConstructor("Alike", c.variance, false, false); constraint.addBinder(alikeTC); --- 98,102 ---- { TypeConstructor alikeTC = ! new TypeConstructor("alike", c.variance, false, false); constraint.addBinder(alikeTC); Index: MonotypeConstructor.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/MonotypeConstructor.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** MonotypeConstructor.java 23 Jul 2002 11:58:49 -0000 1.32 --- MonotypeConstructor.java 27 May 2003 07:41:37 -0000 1.33 *************** *** 78,82 **** } catch(mlsub.typing.BadSizeEx e){ ! throw User.error(this, "Class " + tc + Util.has(e.expected, "type parameter", e.actual)); } --- 78,82 ---- } catch(mlsub.typing.BadSizeEx e){ ! throw User.error(this, (tc!=null ? "Class "+tc : lowlevelTC.toString()) + Util.has(e.expected, "type parameter", e.actual)); } |
From: <bo...@us...> - 2003-05-26 21:22:40
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv26596/src/bossa/syntax Modified Files: UserOperator.java Log Message: Typo. Index: UserOperator.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/UserOperator.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** UserOperator.java 13 Mar 2003 23:19:42 -0000 1.3 --- UserOperator.java 26 May 2003 21:22:36 -0000 1.4 *************** *** 91,95 **** XXX: Note that this is a waste if this is a method declaration ! and there is no contract. The performance loos should be mesured, to see if optimisation is necessary. */ --- 91,95 ---- XXX: Note that this is a waste if this is a method declaration ! and there is no contract. The performance loss should be mesured, to see if optimisation is necessary. */ |