nice-commit Mailing List for The Nice Programming Language (Page 8)
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: Daniel B. <bo...@us...> - 2005-04-08 16:59:18
|
Update of /cvsroot/nice/Nice/testsuite/compiler/native In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27902/testsuite/compiler/native Added Files: visibility.testsuite Removed Files: visibility.nice Log Message: Renamed visibility.nice (a mistake) into visibility.testsuite --- NEW FILE: visibility.testsuite --- /// FAIL java.net.Inet4Address /*/// FAIL HERE*/ ip = new java.net.Inet4Address(); --- visibility.nice DELETED --- |
From: Daniel B. <bo...@us...> - 2005-04-08 13:31:18
|
Update of /cvsroot/nice/Nice/src/gnu/bytecode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9950/src/gnu/bytecode Modified Files: Field.java Log Message: Don't write ConstantValue attributes for the default value, since that's redundant. Index: Field.java =================================================================== RCS file: /cvsroot/nice/Nice/src/gnu/bytecode/Field.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Field.java 31 Jul 2003 19:32:05 -0000 1.6 --- Field.java 8 Apr 2005 13:31:09 -0000 1.7 *************** *** 135,145 **** { case 'Z': ! entry = cpool.addInt(((Boolean) value).booleanValue() ? 1 : 0); break; case 'C': ! entry = cpool.addInt(((Character) value).charValue()); break; case 'B': case 'S': case 'I': ! entry = cpool.addInt(((Number) value).intValue()); break; case 'J': entry = cpool.addLong(((Number) value).longValue()); break; --- 135,145 ---- { case 'Z': ! entry = addIfNotDefault(cpool, ((Boolean) value).booleanValue() ? 1 : 0); break; case 'C': ! entry = addIfNotDefault(cpool, ((Character) value).charValue()); break; case 'B': case 'S': case 'I': ! entry = addIfNotDefault(cpool, ((Number) value).intValue()); break; case 'J': entry = cpool.addLong(((Number) value).longValue()); break; *************** *** 151,156 **** entry = cpool.addString(value.toString()); break; } ! ConstantValueAttr attr = new ConstantValueAttr(entry.getIndex()); ! attr.addToFrontOf(this); } --- 151,168 ---- entry = cpool.addString(value.toString()); break; } ! if (entry != null) ! { ! ConstantValueAttr attr = new ConstantValueAttr(entry.getIndex()); ! attr.addToFrontOf(this); ! } ! } ! ! private CpoolEntry addIfNotDefault(ConstantPool cpool, int value) ! { ! if (value == 0) ! // 0 is the default value, no need to specify it. ! return null; ! else ! return cpool.addInt(value); } |
From: Daniel B. <bo...@us...> - 2005-04-08 08:27:06
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6093 Modified Files: NEWS Log Message: Added niceunit --jar Index: NEWS =================================================================== RCS file: /cvsroot/nice/Nice/NEWS,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** NEWS 2 Apr 2005 09:32:29 -0000 1.75 --- NEWS 8 Apr 2005 08:26:57 -0000 1.76 *************** *** 58,61 **** --- 58,62 ---- ?assert 0==1; // fails if assertions enabled assert 0==1; // fails if assertions enabled + * niceunit supports a --jar option to test jars. -- |
From: Daniel B. <bo...@us...> - 2005-04-08 08:27:05
|
Update of /cvsroot/nice/Nice/src/nice/tools/unit/console In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6093/src/nice/tools/unit/console Modified Files: main.nice Log Message: Added niceunit --jar Index: main.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/unit/console/main.nice,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** main.nice 11 Mar 2005 17:35:48 -0000 1.5 --- main.nice 8 Apr 2005 08:26:57 -0000 1.6 *************** *** 16,19 **** --- 16,21 ---- ?String classpath = null; + ?String jar = null; + prg.options = [ *************** *** 23,26 **** --- 25,33 ---- String path => { classpath = path; }), + option("jar", + "An archive containing the program to test\nIts main package will be tested by default", + "path", + String opt => { jar = opt; }), + option("man", "Print man page to stdout", visible: false, () => man(prg)) *************** *** 29,35 **** List<String> rest = parse(prg, args); ! if (rest.size() == 0) prg.usage(); rest.foreach(String pkg => { if (! runTests(pkg, listener, classpath)) --- 36,53 ---- List<String> rest = parse(prg, args); ! if (rest.size() == 0 && jar == null) prg.usage(); + if (jar != null) + { + if (classpath == null) + classpath = jar; + else + classpath = notNull(jar) + java.io.File.pathSeparator + classpath; + + if (rest.size() == 0) + rest = [ mainPackage(notNull(jar)) ]; + } + rest.foreach(String pkg => { if (! runTests(pkg, listener, classpath)) *************** *** 38,41 **** --- 56,65 ---- } + String mainPackage(String jar) + { + String mainClass = new java.util.jar.JarFile(new java.io.File(jar)).getManifest().getMainAttributes().getValue("Main-Class"); + return mainClass.substring(0, mainClass.lastIndexOf('.')); + } + let Listener listener = new Listener(); |
From: Daniel B. <bo...@us...> - 2005-04-07 22:28:21
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18928/src/bossa/syntax Modified Files: niceMethod.nice Log Message: Don't compile methods into classes imported from a different package. Index: niceMethod.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/niceMethod.nice,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** niceMethod.nice 29 Mar 2005 16:18:39 -0000 1.27 --- niceMethod.nice 7 Apr 2005 22:28:12 -0000 1.28 *************** *** 360,370 **** receiver = getNiceClass(def.getArgTypes()[0]); ! // JVM interfaces cannot contain code. ! if (receiver != null && receiver.isInterface()) ! receiver = null; ! ! // Special treatment for serialization at the moment. ! if (def.getArity() == 2 && ! (name.equals("writeObject")||name.equals("readObject"))) receiver = null; } --- 360,375 ---- receiver = getNiceClass(def.getArgTypes()[0]); ! if (receiver != null && ! ( ! // JVM interfaces cannot contain code. ! receiver.isInterface() ! || ! // For the moment, don't compile inside classes from another package ! receiver.definition.module.pkg != def.module.pkg ! || ! // Special treatment for serialization at the moment. ! (def.getArity() == 2 && ! (name.equals("writeObject")||name.equals("readObject"))) ! )) receiver = null; } |
From: Arjan B. <ar...@us...> - 2005-04-07 17:03:55
|
Update of /cvsroot/nice/Nice/testsuite/compiler/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18169/F:/nice/testsuite/compiler/classes Added Files: field-override-packages.testsuite Log Message: Testcases for field override across packages (including one bug testcase). --- NEW FILE: field-override-packages.testsuite --- /// PASS /// package a /// Toplevel class A { final A x; } /// package b import a /// Toplevel class B extends A { override B x; } /// PASS /// package a /// Toplevel class A { final A x; } /// package b import a /// Toplevel class B extends A { override B x; } /// package c import b /// Toplevel class C extends B { override C x; } /// FAIL /// package a /// Toplevel class A { final A x; } /// package b import a /// Toplevel class B extends A { override String /* /// FAIL HERE */ x; } /// PASS /// package a /// Toplevel class A { final ?String s; } /// package b import a /// Toplevel class B extends A { override String s = "abc"; } /// FAIL /// package a /// Toplevel class A<T> { final List<T> x; } /// package b import a /// Toplevel class B<T> extends A<T> { override List<String> /* /// FAIL HERE */ x; } /// PASS /// package a /// Toplevel class A { final String x = "abc"; } /// package b import a assert new A().x.equals("abc"); assert new B().x.equals("xyz"); /// Toplevel class B extends A { override x = "xyz"; } /// FAIL /// package a /// Toplevel class A { int x; } /// package b import a /// Toplevel class B extends A { override /* /// FAIL HERE */ x = "abc"; } /// PASS bug /// package a /// Toplevel class A { final int x; } /// package b import a /// Toplevel class B extends A { override byte x = 0; } /// package c import b assert new C().x == 5; /// Toplevel class C extends B { override x = 5; } /// FAIL /// package a /// Toplevel class A { final int x; } /// package b import a /// Toplevel class B extends A { override byte x = 0; } /// package c import b /// Toplevel class C extends B { override /* /// FAIL HERE */ x = 1000; } |
From: Daniel B. <bo...@us...> - 2005-04-06 21:52:39
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17904/src/bossa/syntax Modified Files: niceclass.nice Log Message: Fix introduction of constrained class type parameters. Index: niceclass.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/niceclass.nice,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** niceclass.nice 28 Mar 2005 11:35:15 -0000 1.29 --- niceclass.nice 6 Apr 2005 21:52:20 -0000 1.30 *************** *** 348,353 **** mlsub.typing.Typing.enter(); entered = true; ! mlsub.typing.lowlevel.Element[] typeParameters = cast(notNull(definition.classConstraint).typeParameters); ! mlsub.typing.Typing.introduce(typeParameters); try { mlsub.typing.Typing.implies(); --- 348,352 ---- mlsub.typing.Typing.enter(); entered = true; ! mlsub.typing.Typing.introduceTypeSymbols(notNull(definition.classConstraint).binders.toArray()); try { mlsub.typing.Typing.implies(); |
From: Daniel B. <bo...@us...> - 2005-04-06 21:52:35
|
Update of /cvsroot/nice/Nice/testsuite/compiler/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17904/testsuite/compiler/classes Modified Files: typeParameters.testsuite Log Message: Fix introduction of constrained class type parameters. Index: typeParameters.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/classes/typeParameters.testsuite,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** typeParameters.testsuite 4 Apr 2005 22:17:10 -0000 1.23 --- typeParameters.testsuite 6 Apr 2005 21:52:20 -0000 1.24 *************** *** 403,404 **** --- 403,415 ---- <T extends I> class Foo<T> {} + + /// PASS + /// Toplevel + abstract interface I {} + + class IntTreeNode <U> {} + + <I T> + class IntTree <T> { + ?IntTreeNode<T> content = null; + } |
From: Daniel B. <bo...@us...> - 2005-04-06 20:38:48
|
Update of /cvsroot/nice/Nice/src/mlsub/typing/lowlevel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28883/src/mlsub/typing/lowlevel Modified Files: Engine.java Log Message: Whitespace cleanup. Index: Engine.java =================================================================== RCS file: /cvsroot/nice/Nice/src/mlsub/typing/lowlevel/Engine.java,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** Engine.java 16 Feb 2005 22:34:49 -0000 1.35 --- Engine.java 6 Apr 2005 20:38:39 -0000 1.36 *************** *** 21,25 **** /** * Public interface to the lowlevel constraint implication checker. ! * * All accesses are done through this Engine. * --- 21,25 ---- /** * Public interface to the lowlevel constraint implication checker. ! * * All accesses are done through this Engine. [...963 lines suppressed...] public void initialAbstracts(int x, int iid) { k0.initialAbstracts(x,iid); } ! public void indexImplements(int x, int iid) throws Unsatisfiable { *************** *** 1092,1096 **** } } ! public static boolean dbg = bossa.util.Debug.engine; } --- 1092,1096 ---- } } ! public static boolean dbg = bossa.util.Debug.engine; } |
From: Daniel B. <bo...@us...> - 2005-04-05 18:17:44
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19172/src/bossa/syntax Modified Files: typedef.nice Log Message: Rename getVariance to findVariance to avoid conflict with parent (MethodContainer) variance getter. Index: typedef.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/typedef.nice,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** typedef.nice 25 Mar 2005 16:40:00 -0000 1.23 --- typedef.nice 5 Apr 2005 18:17:33 -0000 1.24 *************** *** 46,50 **** void computeVariance() { ! int arity = getVariance(this); let tpv = notNull( typeParametersVariances ); --- 46,50 ---- void computeVariance() { ! int arity = findVariance(this); let tpv = notNull( typeParametersVariances ); *************** *** 833,859 **** // Variance lookup ! int getVariance(TypeDefinition t) { ! int arity = getVariance(t.implementations); if (arity != -1) return arity; ! arity = getVariance(t.abstractions); return arity; } ! getVariance(ClassDefinition c) { ! int arity = getVariance(c.superClassIdent); return arity >= 0 ? arity : super; } ! getVariance(InterfaceDefinition i) { ! int arity = getVariance(i.extensions); return arity >= 0 ? arity : super; } ! int getVariance(?List<MonotypeConstructor> parents) { if (parents == null) --- 833,859 ---- // Variance lookup ! int findVariance(TypeDefinition t) { ! int arity = findVariance(t.implementations); if (arity != -1) return arity; ! arity = findVariance(t.abstractions); return arity; } ! findVariance(ClassDefinition c) { ! int arity = findVariance(c.superClassIdent); return arity >= 0 ? arity : super; } ! findVariance(InterfaceDefinition i) { ! int arity = findVariance(i.extensions); return arity >= 0 ? arity : super; } ! int findVariance(?List<MonotypeConstructor> parents) { if (parents == null) *************** *** 863,867 **** for (MonotypeConstructor m : parents) { ! res = getVariance(m); if (res != -1) return res; --- 863,867 ---- for (MonotypeConstructor m : parents) { ! res = findVariance(m); if (res != -1) return res; *************** *** 871,875 **** } ! int getVariance(?MonotypeConstructor parent) { if (parent == null) --- 871,875 ---- } ! int findVariance(?MonotypeConstructor parent) { if (parent == null) |
From: Daniel B. <bo...@us...> - 2005-04-05 12:50:12
|
Update of /cvsroot/nice/Nice/src/bossa/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12728/src/bossa/modules Modified Files: Compilation.nice Log Message: Properly import bossa.modules from bossa.syntax instead of silently loading it as a java library. Fixed type of javaTypeConstructors. Index: Compilation.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/modules/Compilation.nice,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** Compilation.nice 11 Mar 2005 17:35:54 -0000 1.32 --- Compilation.nice 5 Apr 2005 12:50:03 -0000 1.33 *************** *** 55,59 **** Map<String,Package> packages = new HashMap(); ! Map<String,mlsub.typing.TypeConstructor> javaTypeConstructors = new HashMap(); nice.tools.visibility.Scope</*VarSymbol*/bossa.syntax.Symbol> javaScope = new nice.tools.visibility.Scope(name: "java", parent: null); --- 55,59 ---- Map<String,Package> packages = new HashMap(); ! Map<gnu.bytecode.Type, mlsub.typing.TypeConstructor> javaTypeConstructors = new HashMap(); nice.tools.visibility.Scope</*VarSymbol*/bossa.syntax.Symbol> javaScope = new nice.tools.visibility.Scope(name: "java", parent: null); |
From: Daniel B. <bo...@us...> - 2005-04-05 12:50:12
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12728/src/bossa/syntax Modified Files: tools.nice ast.nice Log Message: Properly import bossa.modules from bossa.syntax instead of silently loading it as a java library. Fixed type of javaTypeConstructors. Index: tools.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/tools.nice,v retrieving revision 1.112 retrieving revision 1.113 diff -C2 -d -r1.112 -r1.113 *** tools.nice 2 Apr 2005 11:43:00 -0000 1.112 --- tools.nice 5 Apr 2005 12:50:02 -0000 1.113 *************** *** 206,211 **** ?mlsub.typing.TypeSymbol lookup(TypeScope, String) = native mlsub.typing.TypeSymbol TypeScope.lookup(String); ?mlsub.typing.TypeSymbol lookup(TypeScope, LocatedString) = native mlsub.typing.TypeSymbol TypeScope.lookup(LocatedString); - Map<gnu.bytecode.Type,mlsub.typing.TypeConstructor> javaTypeConstructors(bossa.modules.Compilation ) = native bossa.modules.Compilation.javaTypeConstructors; - Scope<VarSymbol> javaScope(bossa.modules.Compilation) = native bossa.modules.Compilation.javaScope; ?LocatedString name(Symbol) = native Symbol.name; ?mlsub.typing.TypeConstructor associatedTC(mlsub.typing.Interface) = native mlsub.typing.TypeConstructor mlsub.typing.Interface.associatedTC(); --- 206,209 ---- Index: ast.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/ast.nice,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ast.nice 6 Mar 2005 01:34:26 -0000 1.2 --- ast.nice 5 Apr 2005 12:50:03 -0000 1.3 *************** *** 13,16 **** --- 13,18 ---- package bossa.syntax; + import bossa.modules; + import bossa.util.*; |
From: Daniel B. <bo...@us...> - 2005-04-04 22:17:50
|
Update of /cvsroot/nice/Nice/testsuite/compiler/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20870/testsuite/compiler/classes Modified Files: typeParameters.testsuite Log Message: Fix bounded type variables used as class type parameters (reported by raboof). Index: typeParameters.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/classes/typeParameters.testsuite,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** typeParameters.testsuite 13 Mar 2005 15:27:40 -0000 1.22 --- typeParameters.testsuite 4 Apr 2005 22:17:10 -0000 1.23 *************** *** 373,374 **** --- 373,404 ---- class A<T> {} class B<T> extends A< /*/// FAIL HERE */ U> {} + + + /// PASS + Foo<A> a = new Foo(); + /// Toplevel + abstract interface I {} + + class A implements I {} + + <T extends I> class Foo<T> {} + + + /// PASS + Foo<A> a = new Foo(); + /// Toplevel + interface I {} + + class A implements I {} + + <T extends I> class Foo<T> {} + + + /// PASS + Foo<A> a = new Foo(); + /// Toplevel + class I {} + + class A extends I {} + + <T extends I> class Foo<T> {} |
From: Daniel B. <bo...@us...> - 2005-04-04 22:17:21
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20870/src/bossa/syntax Modified Files: methodContainer.nice Log Message: Fix bounded type variables used as class type parameters (reported by raboof). Index: methodContainer.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/methodContainer.nice,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** methodContainer.nice 4 Apr 2005 22:08:02 -0000 1.6 --- methodContainer.nice 4 Apr 2005 22:17:11 -0000 1.7 *************** *** 190,194 **** // The type parameter must be in fact a type constructor // of variance zero. ! return new mlsub.typing.MonotypeConstructor(cast(s), null); } --- 190,194 ---- // The type parameter must be in fact a type constructor // of variance zero. ! return sureMonotype(new mlsub.typing.MonotypeConstructor(cast(s), null)); } |
From: Daniel B. <bo...@us...> - 2005-04-04 22:08:14
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18461/src/bossa/syntax Modified Files: methodContainer.nice Log Message: Whitespace cleanup. Index: methodContainer.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/methodContainer.nice,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** methodContainer.nice 6 Mar 2005 01:34:26 -0000 1.5 --- methodContainer.nice 4 Apr 2005 22:08:02 -0000 1.6 *************** *** 18,22 **** An entity in which methods can be declared. ! It can have type parameters, that are implicitely added to the englobed methods. --- 18,22 ---- An entity in which methods can be declared. ! It can have type parameters, that are implicitely added to the englobed methods. *************** *** 49,53 **** { TypeScope scope = new TypeScope(this.typeScope); ! try { scope.addSymbols(notNull(classConstraint).getBinders()); } --- 49,53 ---- { TypeScope scope = new TypeScope(this.typeScope); ! try { scope.addSymbols(notNull(classConstraint).getBinders()); } *************** *** 87,91 **** /** Children should call this implementation (super) then print ! their specific information. */ printInterface(s) --- 87,91 ---- /** Children should call this implementation (super) then print ! their specific information. */ printInterface(s) *************** *** 109,113 **** { let vari = notNull(variance).getVariance(n); ! if (vari == mlsub.typing.Variance.CONTRAVARIANT) res.append("-"); else if (vari == mlsub.typing.Variance.COVARIANT) --- 109,113 ---- { let vari = notNull(variance).getVariance(n); ! if (vari == mlsub.typing.Variance.CONTRAVARIANT) res.append("-"); else if (vari == mlsub.typing.Variance.COVARIANT) *************** *** 145,151 **** @param cst an additional constraint for the type parameters of this class. */ ! public ClassConstraint createClassConstraint(?Constraint cst, ! mlsub.typing.MonotypeVar[] typeParameters, List<AtomicConstraint> atoms, ! Location loc) { mlsub.typing.TypeSymbol[] binders; --- 145,152 ---- @param cst an additional constraint for the type parameters of this class. */ ! public ClassConstraint createClassConstraint ! (?Constraint cst, ! mlsub.typing.MonotypeVar[] typeParameters, List<AtomicConstraint> atoms, ! Location loc) { mlsub.typing.TypeSymbol[] binders; *************** *** 153,157 **** boolean resolve; ! if (cst == trueConstraint || cst == null) { binders = cast(typeParameters); --- 154,158 ---- boolean resolve; ! if (cst == trueConstraint || cst == null) { binders = cast(typeParameters); |
From: Daniel B. <bo...@us...> - 2005-04-04 15:56:40
|
Update of /cvsroot/nice/Nice/testsuite/compiler/overloading In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13892/testsuite/compiler/overloading Modified Files: fields.testsuite Log Message: Fix overloading resolution for instance fields when all field accesses are also be valid candidates. Index: fields.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/overloading/fields.testsuite,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fields.testsuite 1 Apr 2005 15:07:54 -0000 1.4 --- fields.testsuite 4 Apr 2005 15:56:30 -0000 1.5 *************** *** 1,14 **** /// COMMENT Special handling of class fields during overloading resolution. - /// PASS bug - /// Toplevel - class Bar { - Map<String,String> db; - } - class Foo { - Map<String,String> db; - Object dbLock() = db; - } - /// PASS let i = x; --- 1,4 ---- *************** *** 119,120 **** --- 109,137 ---- int foo() = 42; + + /// PASS + let f = new Foo(db: "aaa"); + assert f.dbLock().equals("aaa"); + /// Toplevel + class Bar { + String db; + } + class Foo { + String db; + Object dbLock() = db; + } + + /// PASS + let f = new Foo(db: "aaa"); + assert f.dbLock().equals("aaa"); + /// Toplevel + class Bar { + String db; + } + class Foo { + String db; + Object dbLock() { + let res = db; + return res; + } + } |
From: Daniel B. <bo...@us...> - 2005-04-04 15:56:40
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13892/src/bossa/syntax Modified Files: overloadedsymbol.nice Log Message: Fix overloading resolution for instance fields when all field accesses are also be valid candidates. Index: overloadedsymbol.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/overloadedsymbol.nice,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** overloadedsymbol.nice 4 Apr 2005 12:21:48 -0000 1.17 --- overloadedsymbol.nice 4 Apr 2005 15:56:31 -0000 1.18 *************** *** 321,324 **** --- 321,329 ---- if (Node.thisExp != null) try { + // Some fields might have been valid candidates until now, + // so we need to release their cloned type before starting a + // different overloading resolution. + fieldAccesses.foreach(VarSymbol s => s.releaseClonedType()); + let res = new CallExp(function: createOverloadedSymbolExp(fieldAccesses, ident, true), arguments: new Arguments(arguments: [new Argument(value: notNull(Node.thisExp))])); |
From: Daniel B. <bo...@us...> - 2005-04-04 12:38:35
|
Update of /cvsroot/nice/Nice/src/nice/tools/testsuite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25542/src/nice/tools/testsuite Modified Files: TestNice.java Log Message: Don't force an exit from the VM when the test is a success. Index: TestNice.java =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/testsuite/TestNice.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** TestNice.java 23 Mar 2005 17:56:29 -0000 1.32 --- TestNice.java 4 Apr 2005 12:38:25 -0000 1.33 *************** *** 240,245 **** if (getTestCasesWarning() > 0) System.exit(2); - - System.exit(0); } --- 240,243 ---- |
From: Daniel B. <bo...@us...> - 2005-04-04 12:21:58
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21253/src/bossa/syntax Modified Files: overloadedsymbol.nice Log Message: Whitespace cleanup. Index: overloadedsymbol.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/overloadedsymbol.nice,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** overloadedsymbol.nice 11 Mar 2005 17:35:52 -0000 1.16 --- overloadedsymbol.nice 4 Apr 2005 12:21:48 -0000 1.17 *************** *** 37,41 **** return createSymbolExp(symbols.get(0), this.location()); } ! private Expression uniqueExpression(VarSymbol sym, mlsub.typing.Polytype t) { --- 37,41 ---- return createSymbolExp(symbols.get(0), this.location()); } ! private Expression uniqueExpression(VarSymbol sym, mlsub.typing.Polytype t) { *************** *** 44,48 **** return res; } ! resolveOverloading(CallExp callExp) { --- 44,48 ---- return res; } ! resolveOverloading(CallExp callExp) { *************** *** 51,61 **** arguments.computeTypes(); ! if (bossa.util.Debug.overloading) bossa.util.Debug.println("Overloading resolution for " + this + "\nwith parameters " + arguments); // FIRST PASS: only checks the number of parameters ! ! // remembers removed symbols, // to list possibilities if none matches LinkedList<VarSymbol> removed = new LinkedList(); --- 51,61 ---- arguments.computeTypes(); ! if (bossa.util.Debug.overloading) bossa.util.Debug.println("Overloading resolution for " + this + "\nwith parameters " + arguments); // FIRST PASS: only checks the number of parameters ! ! // remembers removed symbols, // to list possibilities if none matches LinkedList<VarSymbol> removed = new LinkedList(); *************** *** 67,71 **** { let s = i.next(); ! if (s.isIgnored()) { --- 67,71 ---- { let s = i.next(); ! if (s.isIgnored()) { *************** *** 76,80 **** let case = s.match(arguments); ! if (case == 0) // Doesn't match { removed.add(s); --- 76,80 ---- let case = s.match(arguments); ! if (case == 0) // Doesn't match { removed.add(s); *************** *** 89,94 **** else // Should not happen { ! Internal.warning("Unknown O.R. case: " + s.getClass()); ! i.remove(); } } --- 89,94 ---- else // Should not happen { ! Internal.warning("Unknown O.R. case: " + s.getClass()); ! i.remove(); } } *************** *** 113,118 **** { let s = i.next(); ! ! if(bossa.util.Debug.overloading) bossa.util.Debug.println("Overloading: Trying with "+s); --- 113,118 ---- { let s = i.next(); ! ! if(bossa.util.Debug.overloading) bossa.util.Debug.println("Overloading: Trying with "+s); *************** *** 124,128 **** s.makeClonedType(); ! mlsub.typing.Polytype[] argsType = this.computeArgsType(notNull(arguments.getExpressions(s)), s.getClonedType(), arguments.getUsedArguments(s)); --- 124,128 ---- s.makeClonedType(); ! mlsub.typing.Polytype[] argsType = this.computeArgsType(notNull(arguments.getExpressions(s)), s.getClonedType(), arguments.getUsedArguments(s)); *************** *** 154,158 **** removeNonMinimal(symbols, arguments); removeOverlappingJavaMethods(symbols); ! if (symbols.size() == 1) { --- 154,158 ---- removeNonMinimal(symbols, arguments); removeOverlappingJavaMethods(symbols); ! if (symbols.size() == 1) { *************** *** 210,218 **** resolveOverloading(mlsub.typing.Polytype expectedType) { ! if(bossa.util.Debug.overloading) bossa.util.Debug.println("Overloading resolution (expected type " + expectedType + ") for " + this); ! // remembers removed symbols, // to list possibilities if none matches LinkedList<VarSymbol> removed = new LinkedList(); --- 210,218 ---- resolveOverloading(mlsub.typing.Polytype expectedType) { ! if(bossa.util.Debug.overloading) bossa.util.Debug.println("Overloading resolution (expected type " + expectedType + ") for " + this); ! // remembers removed symbols, // to list possibilities if none matches LinkedList<VarSymbol> removed = new LinkedList(); *************** *** 235,240 **** i.remove(); s.releaseClonedType(); ! if(bossa.util.Debug.overloading) ! bossa.util.Debug.println("Not "+s+" of type\n" + s.getClonedType() + "\nbecause "+e); } --- 235,240 ---- i.remove(); s.releaseClonedType(); ! if(bossa.util.Debug.overloading) ! bossa.util.Debug.println("Not "+s+" of type\n" + s.getClonedType() + "\nbecause "+e); } *************** *** 244,248 **** { let s = symbols[0]; ! let symType = s.getClonedType(); s.releaseClonedType(); return this.uniqueExpression(s, symType); --- 244,248 ---- { let s = symbols[0]; ! let symType = s.getClonedType(); s.releaseClonedType(); return this.uniqueExpression(s, symType); *************** *** 259,264 **** if (symbols.size() == 1) { ! let s = symbols[0]; ! let symType = s.getClonedType(); s.releaseClonedType(); symbols = nonMin; --- 259,264 ---- if (symbols.size() == 1) { ! let s = symbols[0]; ! let symType = s.getClonedType(); s.releaseClonedType(); symbols = nonMin; *************** *** 287,291 **** noOverloading() { ! if(bossa.util.Debug.overloading) bossa.util.Debug.println("(no)Overloading resolution for "+this); --- 287,291 ---- noOverloading() { ! if(bossa.util.Debug.overloading) bossa.util.Debug.println("(no)Overloading resolution for "+this); *************** *** 308,312 **** throw new AmbiguityError(this); ! throw User.error(this, "No variable or field in this class has name " + ident); } --- 308,312 ---- throw new AmbiguityError(this); ! throw User.error(this, "No variable or field in this class has name " + ident); } *************** *** 379,383 **** let sym = removed[0]; if (sym.isIgnored()) ! return sym.getName() + " cannot be used because it has been ignored.\n" + "See above for the reason why it has been ignored"; --- 379,383 ---- let sym = removed[0]; if (sym.isIgnored()) ! return sym.getName() + " cannot be used because it has been ignored.\n" + "See above for the reason why it has been ignored"; *************** *** 414,418 **** return ident + " has type " + removed[0].getType(); ! return "No symbol with name " + ident + " has type " + expectedType + ":\n" + Util.map("", "\n", "", removed); } --- 414,418 ---- return ident + " has type " + removed[0].getType(); ! return "No symbol with name " + ident + " has type " + expectedType + ":\n" + Util.map("", "\n", "", removed); } *************** *** 431,435 **** } ! private Expression createOverloadedSymbolExp(List<VarSymbol> symbols, LocatedString ident, boolean noImplicitThis) { --- 431,435 ---- } ! private Expression createOverloadedSymbolExp(List<VarSymbol> symbols, LocatedString ident, boolean noImplicitThis) { *************** *** 450,456 **** new AmbiguityError(OverloadedSymbolExp sym) { ! this(sym, ! "Ambiguity for symbol " + sym.ident + ! ". Possibilities are :\n" + Util.map("", "\n", "", sym.symbols)); } --- 450,456 ---- new AmbiguityError(OverloadedSymbolExp sym) { ! this(sym, ! "Ambiguity for symbol " + sym.ident + ! ". Possibilities are :\n" + Util.map("", "\n", "", sym.symbols)); } *************** *** 462,474 **** if(symbols.size()<2) return removed; ! int len = symbols.size(); List<VarSymbol> syms = new ArrayList(symbols); boolean[] remove = new boolean[len]; ! for(int s1 = 0; s1<len; s1++) { mlsub.typing.Domain d1 = nice.tools.typing.Types.domain(syms[s1].getType()); ! for(int s2 = 0; s2<len; s2++) /* --- 462,474 ---- if(symbols.size()<2) return removed; ! int len = symbols.size(); List<VarSymbol> syms = new ArrayList(symbols); boolean[] remove = new boolean[len]; ! for(int s1 = 0; s1<len; s1++) { mlsub.typing.Domain d1 = nice.tools.typing.Types.domain(syms[s1].getType()); ! for(int s2 = 0; s2<len; s2++) /* *************** *** 506,510 **** if (bossa.util.Debug.overloading) bossa.util.Debug.println("Removing " + syms[i] + " since it is not minimal"); ! removed.add(syms[i]); symbols.remove(syms[i]); --- 506,510 ---- if (bossa.util.Debug.overloading) bossa.util.Debug.println("Removing " + syms[i] + " since it is not minimal"); ! removed.add(syms[i]); symbols.remove(syms[i]); *************** *** 521,525 **** * removoNonMinimal will remove s1. * ! * This allows for java-style overloading, * where the most precise method is choosen at compile-time. */ --- 521,525 ---- * removoNonMinimal will remove s1. * ! * This allows for java-style overloading, * where the most precise method is choosen at compile-time. */ *************** *** 529,542 **** if(symbols.size()<2) return; ! int len = symbols.size(); List<VarSymbol> syms = new ArrayList(symbols); boolean[] remove = new boolean[len]; ! for(int s1 = 0; s1<len; s1++) { ! mlsub.typing.Domain d1 = domain(syms[s1].getClonedType(), ! arguments.getUsedArguments(syms[s1])); ! for(int s2 = 0; s2<len; s2++) /* --- 529,542 ---- if(symbols.size()<2) return; ! int len = symbols.size(); List<VarSymbol> syms = new ArrayList(symbols); boolean[] remove = new boolean[len]; ! for(int s1 = 0; s1<len; s1++) { ! mlsub.typing.Domain d1 = domain(syms[s1].getClonedType(), ! arguments.getUsedArguments(syms[s1])); ! for(int s2 = 0; s2<len; s2++) /* *************** *** 551,555 **** if (s1 != s2 && !remove[s2]) { ! mlsub.typing.Domain d2 = domain(syms[s2].getClonedType(), arguments.getUsedArguments(syms[s2])); --- 551,555 ---- if (s1 != s2 && !remove[s2]) { ! mlsub.typing.Domain d2 = domain(syms[s2].getClonedType(), arguments.getUsedArguments(syms[s2])); *************** *** 574,578 **** if (bossa.util.Debug.overloading) bossa.util.Debug.println("Removing " + syms[i] + " since it is not minimal"); ! syms[i].releaseClonedType(); symbols.remove(syms[i]); --- 574,578 ---- if (bossa.util.Debug.overloading) bossa.util.Debug.println("Removing " + syms[i] + " since it is not minimal"); ! syms[i].releaseClonedType(); symbols.remove(syms[i]); *************** *** 607,611 **** there is no ambiguity between methods of the same signature defined in both interfaces, since they are implemented by the same ! method in the class. So this method removes all but one of the overlapping methods. */ --- 607,611 ---- there is no ambiguity between methods of the same signature defined in both interfaces, since they are implemented by the same ! method in the class. So this method removes all but one of the overlapping methods. */ *************** *** 615,619 **** if(symbols.size()<2) return; ! int len = symbols.size(); List<VarSymbol> syms = new ArrayList(symbols); --- 615,619 ---- if(symbols.size()<2) return; ! int len = symbols.size(); List<VarSymbol> syms = new ArrayList(symbols); |
From: Daniel B. <bo...@us...> - 2005-04-04 11:52:07
|
Update of /cvsroot/nice/Nice/testsuite/compiler/typing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11044/testsuite/compiler/typing Modified Files: polymorphism.testsuite Log Message: Known bug: polymorphic anonymous function on arrays. Index: polymorphism.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/typing/polymorphism.testsuite,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** polymorphism.testsuite 12 Mar 2005 15:06:17 -0000 1.7 --- polymorphism.testsuite 4 Apr 2005 11:51:47 -0000 1.8 *************** *** 43,44 **** --- 43,48 ---- return (true) ? null : poly(new A[0]); } + + /// PASS bug + int[][] l = [[0,1],[1,2]]; + int[] bar = l.map(<T> (T[] x) => x[1]); |
From: Daniel B. <bo...@us...> - 2005-04-04 11:49:22
|
Update of /cvsroot/nice/Nice/testsuite/compiler/expressions/arrays In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10389/testsuite/compiler/expressions/arrays Modified Files: asCollections.testsuite Log Message: Known bugs: wrong conversions from array to List. Index: asCollections.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/expressions/arrays/asCollections.testsuite,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** asCollections.testsuite 9 Dec 2002 19:56:01 -0000 1.1 --- asCollections.testsuite 4 Apr 2005 11:49:11 -0000 1.2 *************** *** 20,21 **** --- 20,36 ---- int size() = this.elements.size(); } + + + /// COMMENT the next two bugs should be fixable by using the + /// COMMENT instanciatedDomain in bossa.syntax call.nice even when the + /// COMMENT result type is not polymorhic, but the function call is. + + /// PASS bug + int[][] l = [[0,1],[1,2]]; + let bar = l.map(List<int> x => x[1]); + + /// PASS bug + int[][] l = [[0,1],[1,2]]; + use(l, List<int> list => {}); + /// Toplevel + <T> void use(T[] l, T->void f) = f(l[0]); |
From: Artem Gr K. <ar...@us...> - 2005-04-03 10:40:24
|
Update of /cvsroot/nice/Nice/regtest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10855/regtest Modified Files: regtest Log Message: Use /usr/bin/printf for escape sequences. Index: regtest =================================================================== RCS file: /cvsroot/nice/Nice/regtest/regtest,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** regtest 2 Apr 2005 12:09:51 -0000 1.29 --- regtest 3 Apr 2005 10:40:15 -0000 1.30 *************** *** 16,19 **** --- 16,24 ---- JAVA=${JAVA-java} + printf() + { + /usr/bin/printf "$@" + } + echo() { *************** *** 42,51 **** pkg_compile_error=`expr $pkg_compile_error + 1` ! echo "\n\n\n$1 produced a compilation error" echo "Compiler output is:" echo echo "###############" cat $1/compile.out ! echo "###############\n" } --- 47,56 ---- pkg_compile_error=`expr $pkg_compile_error + 1` ! printf "\n\n\n%s produced a compilation error\n" $1 echo "Compiler output is:" echo echo "###############" cat $1/compile.out ! printf "###############\n\n" } *************** *** 54,63 **** pkg_new=`expr $pkg_new + 1` ! echo "\n\n\n$1 is a NEW package" echo "Program output is:" echo echo "###############" cat $1/current.out ! echo "###############\n" echo -n "Is that correct? (y/n) " read correct --- 59,68 ---- pkg_new=`expr $pkg_new + 1` ! printf "\n\n\n%s is a NEW package\n" $1 echo "Program output is:" echo echo "###############" cat $1/current.out ! printf "###############\n\n" echo -n "Is that correct? (y/n) " read correct *************** *** 71,79 **** { pkg_broken=`expr $pkg_broken + 1` ! echo "$1 produced messages on stderr. It must be BROKEN." echo echo "###############" cat $1/current.err ! echo "###############\n" } --- 76,84 ---- { pkg_broken=`expr $pkg_broken + 1` ! printf "%s produced messages on stderr. It must be BROKEN.\n" $1 echo echo "###############" cat $1/current.err ! printf "###############\n\n" } *************** *** 153,155 **** # There was some error found ! exit 1 --- 158,160 ---- # There was some error found ! exit 1 \ No newline at end of file |
From: Daniel B. <bo...@us...> - 2005-04-03 09:45:01
|
Update of /cvsroot/nice/Nice/src/nice/tools/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30118/src/nice/tools/doc Modified Files: api.nice Log Message: Added explicit message when nicedoc generation failed because of errors in the source code. Index: api.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/doc/api.nice,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** api.nice 2 Sep 2004 12:48:45 -0000 1.4 --- api.nice 3 Apr 2005 09:44:52 -0000 1.5 *************** *** 54,57 **** catch (bossa.modules.Exit e) { // There was an error. Stop working. } ! } \ No newline at end of file --- 54,58 ---- catch (bossa.modules.Exit e) { // There was an error. Stop working. + println("\nnicedoc generation stopped because of errors in the source code."); } ! } |
From: Daniel B. <bo...@us...> - 2005-04-03 09:40:44
|
Update of /cvsroot/nice/Nice/src/nice/tools/compiler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29320/src/nice/tools/compiler Modified Files: load.nice Log Message: Do not report a compiler bug in load mode (nicedoc, ...) when the compilation normally fails. Index: load.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/compiler/load.nice,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** load.nice 14 Jan 2005 18:53:51 -0000 1.2 --- load.nice 3 Apr 2005 09:40:29 -0000 1.3 *************** *** 34,37 **** --- 34,40 ---- return cast(flatten(load(compilation))); } + catch(bossa.modules.Exit e){ + // Compilation stopped because of errors in the source + } catch(bossa.util.UserError e){ bossa.util.Internal.warning("user error only caught in main"); |
From: Artem Gr K. <ar...@us...> - 2005-04-03 03:30:18
|
Update of /cvsroot/nice/tester In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19299 Modified Files: Project Log Message: Fixed issue with "exit 0" after the Ant build. Index: Project =================================================================== RCS file: /cvsroot/nice/tester/Project,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Project 1 Apr 2005 15:09:15 -0000 1.12 --- Project 3 Apr 2005 03:30:05 -0000 1.13 *************** *** 13,17 **** cp Nice/external/nice-bootstrap.jar Nice/share/java/nice.jar cd Nice && ant jar ! exit 0 fi --- 13,17 ---- cp Nice/external/nice-bootstrap.jar Nice/share/java/nice.jar cd Nice && ant jar ! exit $? fi |