nice-commit Mailing List for The Nice Programming Language (Page 5)
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-06-09 07:54:37
|
Update of /cvsroot/nice/Nice/src/nice/tools/testsuite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19333/src/nice/tools/testsuite Modified Files: NiceSourceFile.java Log Message: Avoid using 'args' for main to let it be used in testcases. Index: NiceSourceFile.java =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/testsuite/NiceSourceFile.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** NiceSourceFile.java 6 Mar 2005 13:07:58 -0000 1.20 --- NiceSourceFile.java 9 Jun 2005 07:54:28 -0000 1.21 *************** *** 346,350 **** writer.write("// main method");writer.newLine(); ! writer.write("void main(java.lang.String[] args) {\n"); writer.write(_mainMethodContent.toString()); writer.write("}\n"); --- 346,350 ---- writer.write("// main method");writer.newLine(); ! writer.write("void main(java.lang.String[] _args) {\n"); writer.write(_mainMethodContent.toString()); writer.write("}\n"); |
From: Daniel B. <bo...@us...> - 2005-06-07 10:10:49
|
Update of /cvsroot/nice/Nice/distrib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29557/distrib Modified Files: Makefile Log Message: Renamed source.tar.gz into source.tgz Index: Makefile =================================================================== RCS file: /cvsroot/nice/Nice/distrib/Makefile,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Makefile 6 Jun 2005 16:29:51 -0000 1.18 --- Makefile 7 Jun 2005 10:10:39 -0000 1.19 *************** *** 15,19 **** BUILTSOURCEFILE = nice_$(VERSION).orig.tar.gz TARFILE = Nice-${VERSION}-unix.tar.gz ! SOURCEFILE = Nice-${VERSION}-source.tar.gz ZIPFILE = Nice-${VERSION}-windows.zip --- 15,19 ---- BUILTSOURCEFILE = nice_$(VERSION).orig.tar.gz TARFILE = Nice-${VERSION}-unix.tar.gz ! SOURCEFILE = Nice-${VERSION}-source.tgz ZIPFILE = Nice-${VERSION}-windows.zip *************** *** 101,110 **** )\ | ftp -n upload.sourceforge.net ! echo -e "Redirect /Wiki http://nice.sourceforge.net/cgi-bin/twiki/view" \ ! "\nRedirect /Nice.tar $(DOWNLOADROOT)/${TARFILE}" \ ! "\nRedirect /Nice-source.tar.gz $(DOWNLOADROOT)/${SOURCEFILE}" \ ! "\nRedirect /Nice.zip $(DOWNLOADROOT)/${ZIPFILE}" \ ! "\nRedirect /nice.deb $(DOWNLOADROOT)/${DEB}" \ ! "\nRedirect /nice.rpm $(DOWNLOADROOT)/${RPMFILE}" \ ! > ../web/.htaccess --- 101,113 ---- )\ | ftp -n upload.sourceforge.net ! ! htaccess: ! echo -e "DirectoryIndex index.php index.html\n"\ ! "Redirect /Wiki http://nice.sourceforge.net/cgi-bin/twiki/view\n"\ ! "Redirect /Nice.tar $(DOWNLOADROOT)/${TARFILE}\n"\ ! "Redirect /Nice-source.tar.gz $(DOWNLOADROOT)/${SOURCEFILE}\n"\ ! "Redirect /Nice.zip $(DOWNLOADROOT)/${ZIPFILE}\n"\ ! "Redirect /nice.deb $(DOWNLOADROOT)/${DEB}\n"\ ! "Redirect /nice.rpm $(DOWNLOADROOT)/${RPMFILE}"\ ! > ../web/.htaccess |
From: Daniel B. <bo...@us...> - 2005-06-07 10:09:05
|
Update of /cvsroot/nice/Nice/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28455/web Modified Files: .htaccess Log Message: Released 0.9.11 Index: .htaccess =================================================================== RCS file: /cvsroot/nice/Nice/web/.htaccess,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** .htaccess 25 Feb 2005 17:49:38 -0000 1.21 --- .htaccess 7 Jun 2005 10:08:54 -0000 1.22 *************** *** 1,6 **** ! Redirect /Wiki http://nice.sourceforge.net/cgi-bin/twiki/view ! Redirect /Nice.tar http://prdownloads.sourceforge.net/nice/Nice-0.9.10-unix.tar.gz ! Redirect /Nice-source.tar.gz http://prdownloads.sourceforge.net/nice/Nice-0.9.10-source.tar.gz ! Redirect /Nice.zip http://prdownloads.sourceforge.net/nice/Nice-0.9.10-windows.zip ! Redirect /nice.deb http://prdownloads.sourceforge.net/nice/nice_0.9.10-1_all.deb ! Redirect /nice.rpm http://prdownloads.sourceforge.net/nice/Nice-0.9.10-1.noarch.rpm --- 1,7 ---- ! DirectoryIndex index.php index.html ! Redirect /Wiki http://nice.sourceforge.net/cgi-bin/twiki/view ! Redirect /Nice.tar http://prdownloads.sourceforge.net/nice/Nice-0.9.11-unix.tar.gz ! Redirect /Nice-source.tar.gz http://prdownloads.sourceforge.net/nice/Nice-0.9.11-source.tgz ! Redirect /Nice.zip http://prdownloads.sourceforge.net/nice/Nice-0.9.11-windows.zip ! Redirect /nice.deb http://prdownloads.sourceforge.net/nice/nice_0.9.11-1_all.deb ! Redirect /nice.rpm http://prdownloads.sourceforge.net/nice/Nice-0.9.11-1.noarch.rpm |
From: Daniel B. <bo...@us...> - 2005-06-07 08:34:41
|
Update of /cvsroot/nice/Nice/debian In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8715/debian Modified Files: changelog Log Message: Closed 0.9.11 Index: changelog =================================================================== RCS file: /cvsroot/nice/Nice/debian/changelog,v retrieving revision 1.245 retrieving revision 1.246 diff -C2 -d -r1.245 -r1.246 *** changelog 25 Feb 2005 16:15:39 -0000 1.245 --- changelog 7 Jun 2005 08:34:00 -0000 1.246 *************** *** 1,2 **** --- 1,8 ---- + nice (0.9.11-1) unstable; urgency=low + + * New upstream version. + + -- Daniel Bonniot <bo...@us...> Tue, 7 Jun 2005 10:31:33 +0200 + nice (0.9.10-1) unstable; urgency=low |
From: Daniel B. <bo...@us...> - 2005-06-07 08:34:22
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8715 Modified Files: NEWS Log Message: Closed 0.9.11 Index: NEWS =================================================================== RCS file: /cvsroot/nice/Nice/NEWS,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** NEWS 6 Jun 2005 13:43:44 -0000 1.79 --- NEWS 7 Jun 2005 08:34:02 -0000 1.80 *************** *** 78,82 **** * Bug fixes (negative int hex literals, ...) ! -- nice (0.9.10) --- 78,82 ---- * Bug fixes (negative int hex literals, ...) ! -- Tue, 7 Jun 2005 10:29:08 +0200 nice (0.9.10) |
From: Daniel B. <bo...@us...> - 2005-06-06 16:29:59
|
Update of /cvsroot/nice/Nice/distrib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6487/distrib Modified Files: Makefile Log Message: Check that upstream and debian versions are the same before building the debian package. Index: Makefile =================================================================== RCS file: /cvsroot/nice/Nice/distrib/Makefile,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Makefile 26 Jun 2004 10:41:20 -0000 1.17 --- Makefile 6 Jun 2005 16:29:51 -0000 1.18 *************** *** 1,5 **** # Get the version from the debian changelog. FULL_DEB_VERSION = ${shell expr "`head -1 ../debian/changelog`" : '.*(\(.*\))'} ! VERSION = ${shell expr "$(FULL_DEB_VERSION)" : '\(.*\)-[^-]*'} DEBIAN_REVISION = ${shell expr "$(FULL_DEB_VERSION)" : '.*-\([^-]*\)'} --- 1,7 ---- + VERSION = ${shell expr "`head -1 ../NEWS`" : '.*(\(.*\))'} + # Get the version from the debian changelog. FULL_DEB_VERSION = ${shell expr "`head -1 ../debian/changelog`" : '.*(\(.*\))'} ! DEB_VERSION = ${shell expr "$(FULL_DEB_VERSION)" : '\(.*\)-[^-]*'} DEBIAN_REVISION = ${shell expr "$(FULL_DEB_VERSION)" : '.*-\([^-]*\)'} *************** *** 30,33 **** --- 32,38 ---- deb $(DEB): + @[ $(VERSION) ] || ( echo "No version in NEWS file"; false ) + @[ $(VERSION) = "$(DEB_VERSION)" ] ||\ + (echo "Upstream and Debian versions not matching"; false ) @echo Creating Debian package version ${VERSION} rm -rf $(BUILDROOT) $(BUILDROOT).orig |
From: Daniel B. <bo...@us...> - 2005-06-06 13:43:55
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17146 Modified Files: NEWS Log Message: Reorganization and minor rewrite of recent news. Index: NEWS =================================================================== RCS file: /cvsroot/nice/Nice/NEWS,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** NEWS 6 Jun 2005 13:29:50 -0000 1.78 --- NEWS 6 Jun 2005 13:43:44 -0000 1.79 *************** *** 1,11 **** nice (0.9.11) ! * maybeNull, a counterpart to the notNull, might be used from now on ! to test variables returned from Java libraries without retyping: let prng = SecureRandom.getInstance("ARCFOUR"); ! // Test if a bad implementation has returned null instead of exception. if(maybeNull(prng) == null) workaround(); ! * Nullness analysis of assignments (RFE 681385) is implemented. It is now possible to write: Foo func( ?Foo foo ) { if( foo == null ) { --- 1,17 ---- nice (0.9.11) ! * maybeNull, a counterpart to notNull, can now be used to inform the compiler ! that a value returned from Java libraries without retyping might be null, ! in order to avoid a warning: ! let prng = SecureRandom.getInstance("ARCFOUR"); ! ! // Test if a bad implementation has returned null instead of an exception if(maybeNull(prng) == null) workaround(); ! ! * Nullness analysis of assignments (RFE 681385) is implemented, so that the ! compiler is more clever about when a value cannot be null. It is now possible to write: + Foo func( ?Foo foo ) { if( foo == null ) { *************** *** 15,18 **** --- 21,25 ---- return foo; } + since Nice will detect that foo can't be null after the "foo = new Foo()", and will propagate this information outside of "if( foo == null )" checks. *************** *** 39,53 **** ... } * Added instanceof on option types. For instance 'x instanceof ?String' is equivalent to 'x == null || x instanceof String'. * Added binary integer literals. Examples: '0B1011' '0b1010_0000_0101_1111'. * Removed octal integer literals. - * Some error messages locate more precisely the source of the error. - * Generated bytecode is slightly more compact and references less "system" - Nice classes, so that those do not need to be automatically added to - generated jars. - * Exit the JVM with exit code 1 when the main program finishes with an - uncaught exception. - * Bug fixes (negative int hex literals, ...) * Automatic message is generated for assertions, containing the failed expression and location of the failed assertion --- 46,60 ---- ... } + * Added instanceof on option types. For instance 'x instanceof ?String' is equivalent to 'x == null || x instanceof String'. + * Unbounded wildcard type parameters are supported (as in Java 5). This + allows to avoid using type parameters when their value is not important. + For instance: + + boolean isShort(List<?> l) = l.size() < 10; + * Added binary integer literals. Examples: '0B1011' '0b1010_0000_0101_1111'. * Removed octal integer literals. * Automatic message is generated for assertions, containing the failed expression and location of the failed assertion *************** *** 55,69 **** or printStackTraceWithSourceInfo wasn't used). * Forced (always checked) assertions now are available. ! !assert 0==1; // fails always ! ?assert 0==1; // fails if assertions enabled ! assert 0==1; // fails if assertions enabled ! * niceunit supports a --jar option to test jars. * It is now possible to use Nice "interface" method from Java (that is, method signatures are preserved in interface bytecode). ! * Unbounded wildcard type parameters are supported (as in Java 5). This ! allows to avoid using type parameters when their value is not important. ! For instance: ! ! boolean isShort(List<?> l) = l.size() < 10; -- --- 62,80 ---- or printStackTraceWithSourceInfo wasn't used). * Forced (always checked) assertions now are available. ! ! !assert 0==1; // fails always ! ?assert 0==1; // fails if assertions enabled ! assert 0==1; // fails if assertions enabled ! ! * Some error messages locate more precisely the source of the error. * It is now possible to use Nice "interface" method from Java (that is, method signatures are preserved in interface bytecode). ! * Generated bytecode is slightly more compact and references less "system" ! Nice classes, so that those do not need to be automatically added to ! generated jars. ! * Exit the JVM with exit code 1 when the main program finishes with an ! uncaught exception. ! * niceunit supports a --jar option to test jars. ! * Bug fixes (negative int hex literals, ...) -- *************** *** 73,77 **** * Better error messages for wrong constructor calls and method implementations with wrong parameter names. ! * Default value of fields can be overriden in subclasses. For instance: class A { int x = 1; --- 84,88 ---- * Better error messages for wrong constructor calls and method implementations with wrong parameter names. ! * Default value of fields can be overridden in subclasses. For instance: class A { int x = 1; *************** *** 121,125 **** The same construct can be used with '!= null' tests. ! * java.lang.Class is now parameterized by the type it represents. In particular, newInstance is now declared in nice.lang with --- 132,136 ---- The same construct can be used with '!= null' tests. ! * java.lang.Class is now parametrized by the type it represents. In particular, newInstance is now declared in nice.lang with |
From: Daniel B. <bo...@us...> - 2005-06-06 13:30:01
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10953 Modified Files: NEWS Log Message: Announce wildcard types. Index: NEWS =================================================================== RCS file: /cvsroot/nice/Nice/NEWS,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** NEWS 21 May 2005 16:24:58 -0000 1.77 --- NEWS 6 Jun 2005 13:29:50 -0000 1.78 *************** *** 61,64 **** --- 61,69 ---- * It is now possible to use Nice "interface" method from Java (that is, method signatures are preserved in interface bytecode). + * Unbounded wildcard type parameters are supported (as in Java 5). This + allows to avoid using type parameters when their value is not important. + For instance: + + boolean isShort(List<?> l) = l.size() < 10; -- |
From: Daniel B. <bo...@us...> - 2005-06-02 10:27:45
|
Update of /cvsroot/nice/tester In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1498 Modified Files: .cvsignore gcj.test Log Message: Keep track of changes in the number of gcj errors Index: .cvsignore =================================================================== RCS file: /cvsroot/nice/tester/.cvsignore,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** .cvsignore 7 May 2004 08:58:03 -0000 1.3 --- .cvsignore 2 Jun 2005 10:27:33 -0000 1.4 *************** *** 5,6 **** --- 5,8 ---- *.metrics benchs + gcj.num + gcj.out.* Index: gcj.test =================================================================== RCS file: /cvsroot/nice/tester/gcj.test,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** gcj.test 1 Apr 2005 15:09:16 -0000 1.4 --- gcj.test 2 Jun 2005 10:27:33 -0000 1.5 *************** *** 16,19 **** --- 16,28 ---- NUM=`expr "$NUM" : "$NUM_PREFIX"'\(.*\)'` + # Give a warning if we could not find the number of errors + [ ! $NUM ] && exit 3 + + if [ $NUM != "`cat ../../gcj.num`" ]; then + echo "GCJ errors changed from `cat ../../gcj.num` to $NUM" + echo $NUM > ../../gcj.num + cp -a OUT ../../gcj.out.`date '+%F'` + fi + # Number of errors is encoded as 10+number (since smaller numbers have # other meanings) |
From: Daniel B. <bo...@us...> - 2005-05-31 07:33:03
|
Update of /cvsroot/nice/Nice/src/mlsub/typing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26836/src/mlsub/typing Modified Files: NullnessKind.java Log Message: Allow the unknown type to be smaller as another type, as long as that one can be made unknown too. Index: NullnessKind.java =================================================================== RCS file: /cvsroot/nice/Nice/src/mlsub/typing/NullnessKind.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** NullnessKind.java 27 May 2005 13:59:47 -0000 1.6 --- NullnessKind.java 31 May 2005 07:32:50 -0000 1.7 *************** *** 96,100 **** Monotype m2 = (Monotype) e2; ! if (m1.isUnknown() || m2.isUnknown()) throw LowlevelUnsatisfiable.instance; --- 96,106 ---- Monotype m2 = (Monotype) e2; ! if (m1.isUnknown()) ! { ! m2.setUnknown(); ! return; ! } ! ! if (m2.isUnknown()) throw LowlevelUnsatisfiable.instance; |
From: Daniel B. <bo...@us...> - 2005-05-31 07:33:03
|
Update of /cvsroot/nice/Nice/testsuite/compiler/typing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26836/testsuite/compiler/typing Modified Files: wildcards.testsuite Log Message: Allow the unknown type to be smaller as another type, as long as that one can be made unknown too. Index: wildcards.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/typing/wildcards.testsuite,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wildcards.testsuite 25 May 2005 23:22:56 -0000 1.2 --- wildcards.testsuite 31 May 2005 07:32:49 -0000 1.3 *************** *** 68,69 **** --- 68,75 ---- int /*/// FAIL HERE */ x = a.x2; } + + /// PASS + /// Toplevel + class A<T> { T x; } + void foo(A<?> a) = bar(a.x); + <T> void bar(T x) {} |
From: Daniel B. <bo...@us...> - 2005-05-31 07:18:33
|
Update of /cvsroot/nice/tester In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18478 Modified Files: Project Testsuite.test run Log Message: Support for experimental JVMs (do not prevent the update of the dev version on failure) and for setting the JAVA and JAVAC commands explicitely Index: Testsuite.test =================================================================== RCS file: /cvsroot/nice/tester/Testsuite.test,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Testsuite.test 6 May 2005 07:24:10 -0000 1.4 --- Testsuite.test 31 May 2005 07:18:24 -0000 1.5 *************** *** 6,10 **** /usr/bin/time -o TIME ant check > OUT else ! /usr/bin/time -o TIME make check > OUT fi RES=$? --- 6,10 ---- /usr/bin/time -o TIME ant check > OUT else ! /usr/bin/time -o TIME make java="${JAVA:-java}" check > OUT fi RES=$? Index: Project =================================================================== RCS file: /cvsroot/nice/tester/Project,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Project 6 May 2005 07:24:10 -0000 1.14 --- Project 31 May 2005 07:18:24 -0000 1.15 *************** *** 21,24 **** cd Nice && make else ! cd Nice && make fixpoint && cp share/java/nice.jar external/nice-bootstrap.jar && make fixpoint && make nicedoc archive fi --- 21,24 ---- cd Nice && make else ! cd Nice && make fixpoint java="${JAVA:-java}" javac="${JAVAC:-javac}" && cp share/java/nice.jar external/nice-bootstrap.jar && make fixpoint java="${JAVA:-java}" javac="${JAVAC:-javac}" && make nicedoc archive java="${JAVA:-java}" fi Index: run =================================================================== RCS file: /cvsroot/nice/tester/run,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** run 1 Apr 2005 15:09:16 -0000 1.17 --- run 31 May 2005 07:18:24 -0000 1.18 *************** *** 57,60 **** --- 57,61 ---- # is not reset to a new value. JDK_VERSION= + experimental_jvm=false . $conffile *************** *** 104,110 **** case "$code" in 0) echo "OK" ;; ! 1) echo "FAILURE" ; failed=true ;; ! 2) echo "WARN" ;; 3) echo "IMPOSSIBLE" ;; 8) echo "SKIP" ;; *) echo "$((code-10))" ;; --- 105,112 ---- case "$code" in 0) echo "OK" ;; ! # make exits with 2 on errors ! 1|2) echo "FAILURE" ; [ "$experimental_jvm" != true ] && failed=true ;; 3) echo "IMPOSSIBLE" ;; + # 4) echo "WARN" ;; 8) echo "SKIP" ;; *) echo "$((code-10))" ;; |
From: Daniel B. <bo...@us...> - 2005-05-27 21:33:58
|
Update of /cvsroot/nice/Nice/testsuite/compiler/designByContract In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26072/testsuite/compiler/designByContract Modified Files: assert.testsuite Log Message: Comment out getCause, which is not present in JDK 1.3 Index: assert.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/designByContract/assert.testsuite,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** assert.testsuite 11 Apr 2005 13:56:12 -0000 1.7 --- assert.testsuite 27 May 2005 21:33:44 -0000 1.8 *************** *** 102,106 **** }catch(AssertionFailed ok){ !assert ok.getMessage().equals("bar"); ! !assert ok.getCause() == null; } /// Toplevel --- 102,106 ---- }catch(AssertionFailed ok){ !assert ok.getMessage().equals("bar"); ! //!assert ok.getCause() == null; } /// Toplevel |
From: Daniel B. <bo...@us...> - 2005-05-27 21:12:37
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22810/src/bossa/syntax Modified Files: monotype.nice constraint.nice Log Message: Mark all constraint monotype variables, since they can be used with markers before they are used without them, making it too late to mark them at that time. Index: constraint.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/constraint.nice,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** constraint.nice 9 Apr 2005 09:24:43 -0000 1.4 --- constraint.nice 27 May 2005 21:12:28 -0000 1.5 *************** *** 26,29 **** --- 26,35 ---- private List<AtomicConstraint> atomics; + { + for (b : binders) + if (b instanceof mlsub.typing.MonotypeVar) + nice.tools.typing.Types.makeMarkedType(b); + } + /** * Returns a new constraint. Index: monotype.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/monotype.nice,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** monotype.nice 10 Apr 2005 14:57:07 -0000 1.14 --- monotype.nice 27 May 2005 21:12:28 -0000 1.15 *************** *** 61,68 **** { if (raw instanceof mlsub.typing.MonotypeVar) ! { ! nice.tools.typing.Types.makeMarkedType(raw); ! return raw; ! } else return sureMonotype(raw); --- 61,65 ---- { if (raw instanceof mlsub.typing.MonotypeVar) ! return raw; else return sureMonotype(raw); |
From: Daniel B. <bo...@us...> - 2005-05-27 21:12:36
|
Update of /cvsroot/nice/Nice/testsuite/compiler/typing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22810/testsuite/compiler/typing Modified Files: null.testsuite Log Message: Mark all constraint monotype variables, since they can be used with markers before they are used without them, making it too late to mark them at that time. Index: null.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/typing/null.testsuite,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** null.testsuite 27 May 2005 13:59:47 -0000 1.11 --- null.testsuite 27 May 2005 21:12:28 -0000 1.12 *************** *** 72,73 **** --- 72,88 ---- /// package b import a String s = foo(""); + + /// PASS + /// Toplevel + <W> !W foo(W x, !W y) = y; + + /// PASS + /// Toplevel + <W> !W foo(!W x, W y) = x; + + /// PASS + /// package a + /// Toplevel + <T> !T foo(T x, !T y) = x != null ? x : y; + /// package b import a + String s = foo(null, ""); |
From: Daniel B. <bo...@us...> - 2005-05-27 14:07:00
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29003/stdlib/nice/lang Modified Files: java.nice Log Message: newInstance always returns a non-null value. Index: java.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/java.nice,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** java.nice 2 Apr 2005 09:09:25 -0000 1.62 --- java.nice 27 May 2005 14:06:51 -0000 1.63 *************** *** 45,49 **** Method[] getMethods(Class) = native Method[] Class.getMethods(); Class getType(Field) = native Class Field.getType(); ! <T> T newInstance(Class<T>) = native Object Class.newInstance(); <T, V> V get(Field, T) = native Object Field.get(Object); --- 45,49 ---- Method[] getMethods(Class) = native Method[] Class.getMethods(); Class getType(Field) = native Class Field.getType(); ! <T> !T newInstance(Class<T>) = native Object Class.newInstance(); <T, V> V get(Field, T) = native Object Field.get(Object); |
From: Daniel B. <bo...@us...> - 2005-05-27 14:06:59
|
Update of /cvsroot/nice/Nice/testsuite/lib/nice/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29003/testsuite/lib/nice/lang Added Files: class.testsuite Log Message: newInstance always returns a non-null value. --- NEW FILE: class.testsuite --- /// PASS Object obj = Class.forName("java.lang.String").newInstance(); |
From: Daniel B. <bo...@us...> - 2005-05-27 13:59:57
|
Update of /cvsroot/nice/Nice/testsuite/compiler/typing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27419/testsuite/compiler/typing Modified Files: null.testsuite Log Message: Give the raw variable associated to a type variable with persistent nullness kind the same name as the original variable. Index: null.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/typing/null.testsuite,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** null.testsuite 1 Mar 2005 18:56:23 -0000 1.10 --- null.testsuite 27 May 2005 13:59:47 -0000 1.11 *************** *** 61,62 **** --- 61,73 ---- } } + + /// PASS + /// package a + /// Toplevel + <T> !T foo(T x) + { + assert x != null; + return x; + } + /// package b import a + String s = foo(""); |
From: Daniel B. <bo...@us...> - 2005-05-27 13:59:57
|
Update of /cvsroot/nice/Nice/src/mlsub/typing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27419/src/mlsub/typing Modified Files: NullnessKind.java MonotypeVar.java Log Message: Give the raw variable associated to a type variable with persistent nullness kind the same name as the original variable. Index: MonotypeVar.java =================================================================== RCS file: /cvsroot/nice/Nice/src/mlsub/typing/MonotypeVar.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** MonotypeVar.java 25 May 2005 23:22:57 -0000 1.19 --- MonotypeVar.java 27 May 2005 13:59:47 -0000 1.20 *************** *** 164,168 **** { kind = k; ! equivalent = NullnessKind.instance.persistentFreshMonotype(); } } --- 164,168 ---- { kind = k; ! equivalent = NullnessKind.instance.persistentFreshMonotype(this); } } Index: NullnessKind.java =================================================================== RCS file: /cvsroot/nice/Nice/src/mlsub/typing/NullnessKind.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** NullnessKind.java 25 May 2005 23:22:57 -0000 1.5 --- NullnessKind.java 27 May 2005 13:59:47 -0000 1.6 *************** *** 50,58 **** return new MonotypeConstructor(tc, new Monotype[]{ raw }); } ! ! public Monotype persistentFreshMonotype() { TypeConstructor tc = new TypeConstructor(instance); ! Monotype raw = new MonotypeVar(); return new MonotypeConstructor(tc, new Monotype[]{ raw }); --- 50,66 ---- return new MonotypeConstructor(tc, new Monotype[]{ raw }); } ! ! /** ! @param base The type variable we create this fresh constructed ! monotype for. ! */ ! public Monotype persistentFreshMonotype(MonotypeVar base) { TypeConstructor tc = new TypeConstructor(instance); ! ! /* It's important to give the raw variable the same name as the base one, ! so that for the syntactic type <T> ... !T we don't end up printing !t9. ! */ ! Monotype raw = new MonotypeVar(base.getName()); return new MonotypeConstructor(tc, new Monotype[]{ raw }); |
From: Daniel B. <bo...@us...> - 2005-05-27 10:24:40
|
Update of /cvsroot/nice/Nice/testsuite/compiler/methods In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16245/testsuite/compiler/methods Modified Files: coverage.testsuite Log Message: Testcases for coverage with Object arguments (corresponding to the changes commited on 05/26/2005 05:22 PM). Index: coverage.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/methods/coverage.testsuite,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** coverage.testsuite 21 Mar 2005 21:46:08 -0000 1.8 --- coverage.testsuite 27 May 2005 10:24:31 -0000 1.9 *************** *** 52,53 **** --- 52,82 ---- foo(A x) {} foo(K x) {} + + /// FAIL + /// Toplevel + interface I { + void /*/// FAIL HERE */ foo(Object o1); + } + class A implements I {} + + /// PASS + /// Toplevel + interface I1 {} + interface I2 {} + + void foo(I1 i1, I2 i2, Object o1, Object o2, Object o3, Object o4, Object o5, Object o6); + + class A implements I1 {} + foo(A a, i2, o1, o2, o3, o4, o5, o6) {} + + /// FAIL + /// Toplevel + interface I1 {} + interface I2 {} + + void /*/// FAIL HERE */ foo(I1 i1, I2 i2, Object o1, Object o2, Object o3, Object o4, Object o5, Object o6); + + class A1 implements I1 {} + class A2 implements I2 {} + + // foo implementation missing |
From: Daniel B. <bo...@us...> - 2005-05-26 15:26:04
|
Update of /cvsroot/nice/Nice/src/mlsub/typing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11896/src/mlsub/typing Modified Files: Enumeration.java Log Message: Optimization: use a single SolutionFound instance Index: Enumeration.java =================================================================== RCS file: /cvsroot/nice/Nice/src/mlsub/typing/Enumeration.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Enumeration.java 26 May 2005 15:22:06 -0000 1.20 --- Enumeration.java 26 May 2005 15:25:53 -0000 1.21 *************** *** 199,203 **** of kinds for all-marked tags. */ ! throw new SolutionFound(); } } --- 199,203 ---- of kinds for all-marked tags. */ ! throw SolutionFound.instance; } } *************** *** 210,214 **** } ! private static class SolutionFound extends RuntimeException {} private static List enumerateTags(Element[] tags, boolean[] all) --- 210,217 ---- } ! private static class SolutionFound extends RuntimeException ! { ! static SolutionFound instance = new SolutionFound(); ! } private static List enumerateTags(Element[] tags, boolean[] all) |
From: Daniel B. <bo...@us...> - 2005-05-26 15:22:18
|
Update of /cvsroot/nice/Nice/src/mlsub/typing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10965/src/mlsub/typing Modified Files: Enumeration.java Log Message: Avoid looking setting kinds for Object when it's not used, as we already know there is some solution. Index: Enumeration.java =================================================================== RCS file: /cvsroot/nice/Nice/src/mlsub/typing/Enumeration.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Enumeration.java 26 May 2005 12:25:46 -0000 1.19 --- Enumeration.java 26 May 2005 15:22:06 -0000 1.20 *************** *** 138,143 **** if (tag.getKind() == TopMonotype.TopKind.instance) { ! // Tag is "Object". All TCs are solutions. ! tag = tags[minFloating] = new MonotypeVar("enumeration"); } else --- 138,152 ---- if (tag.getKind() == TopMonotype.TopKind.instance) { ! if (all[minFloating]) ! // Tag is "Object". All TCs are solutions. ! tag = tags[minFloating] = new MonotypeVar("enumeration"); ! else ! { ! // We only want one solution anyway, which surely exists ;-) ! // No need to set kinds ! // recursive call ! setFloatingKinds(tags, all, minFloating + 1, res, doAll); ! return; ! } } else *************** *** 156,160 **** { if(linkDbg && Typing.dbg) ! Debug.println("Choosing kind " + c + " for " + tag); if (tag instanceof MonotypeVar) --- 165,169 ---- { if(linkDbg && Typing.dbg) ! Debug.println("Choosing kind " + c + " for " + minFloating + ":" + tag); if (tag instanceof MonotypeVar) *************** *** 165,168 **** --- 174,178 ---- // recursive call setFloatingKinds(tags, all, minFloating + 1, res, doAll); + tag.setKind(null); } *************** *** 217,221 **** for(int i = 0;i<tags.length;i++) { ! Engine.Constraint k = Engine.getConstraint(tags[i].getKind()); BitVector obs; --- 227,237 ---- for(int i = 0;i<tags.length;i++) { ! Kind kind = tags[i].getKind(); ! ! if (kind == TopMonotype.TopKind.instance) ! continue; ! ! Engine.Constraint k = Engine.getConstraint(kind); ! BitVector obs; |
From: Daniel B. <bo...@us...> - 2005-05-26 15:19:48
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10319/src/bossa/syntax Modified Files: dispatchTest.nice Log Message: Added debug info about used parameters. Index: dispatchTest.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/dispatchTest.nice,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** dispatchTest.nice 25 Mar 2005 16:40:00 -0000 1.11 --- dispatchTest.nice 26 May 2005 15:19:28 -0000 1.12 *************** *** 188,191 **** --- 188,193 ---- boolean isJavaMethod) { + boolean[] used = findUsedPositions(method.getArity(), sortedAlternatives); + if (bossa.util.Debug.linkTests) { *************** *** 193,199 **** for (alt : sortedAlternatives) bossa.util.Debug.println("Alternative: "+alt.toString()); - } ! boolean[] used = findUsedPositions(method.getArity(), sortedAlternatives); let type = method.getType(); --- 195,204 ---- for (alt : sortedAlternatives) bossa.util.Debug.println("Alternative: "+alt.toString()); ! print("Argument used: "); ! for (u : used) ! print(u + " "); ! println(""); ! } let type = method.getType(); |
From: Daniel B. <bo...@us...> - 2005-05-26 12:25:56
|
Update of /cvsroot/nice/Nice/src/mlsub/typing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3014/src/mlsub/typing Modified Files: Enumeration.java Log Message: Whitespace cleanup. Index: Enumeration.java =================================================================== RCS file: /cvsroot/nice/Nice/src/mlsub/typing/Enumeration.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Enumeration.java 4 Jan 2005 21:20:21 -0000 1.18 --- Enumeration.java 26 May 2005 12:25:46 -0000 1.19 *************** *** 44,51 **** Monotype[] tags = null; ! if (domain.getMonotype().equivalent() instanceof TupleType) tags = ((TupleType) domain.getMonotype().equivalent()).types; ! if (tags == null) throw new InternalError("enumerate should be done on a tuple domain"); --- 44,51 ---- Monotype[] tags = null; ! if (domain.getMonotype().equivalent() instanceof TupleType) tags = ((TupleType) domain.getMonotype().equivalent()).types; ! if (tags == null) throw new InternalError("enumerate should be done on a tuple domain"); *************** *** 79,83 **** * Enumerate all the tuples of tags in a Domain * ! * If all[i] is false, we are not interested in getting all solutions * for position i, only one witness is enough. * --- 79,83 ---- * Enumerate all the tuples of tags in a Domain * ! * If all[i] is false, we are not interested in getting all solutions * for position i, only one witness is enough. * *************** *** 114,132 **** return res; } ! ! /** Try all combinations of Kinds for free type variables. There are two stages: If doAll is true, set the tags for which all solutions must be listed. Otherwise, set the other tags, and stop as soon as one solution is found. */ ! private static final void setFloatingKinds(Element[] tags, boolean[] all, ! int minFloating, List res, ! boolean doAll) throws Unsatisfiable { ! while(minFloating<tags.length ! && (all[minFloating] != doAll || isFixedKind(tags[minFloating].getKind()))) minFloating++; --- 114,132 ---- return res; } ! ! /** Try all combinations of Kinds for free type variables. There are two stages: If doAll is true, set the tags for which all solutions must be listed. Otherwise, set the other tags, and stop as soon as one solution is found. */ ! private static final void setFloatingKinds(Element[] tags, boolean[] all, ! int minFloating, List res, ! boolean doAll) throws Unsatisfiable { ! while(minFloating<tags.length ! && (all[minFloating] != doAll || isFixedKind(tags[minFloating].getKind()))) minFloating++; *************** *** 135,139 **** { Element tag = tags[minFloating]; ! if (tag.getKind() == TopMonotype.TopKind.instance) { --- 135,139 ---- { Element tag = tags[minFloating]; ! if (tag.getKind() == TopMonotype.TopKind.instance) { *************** *** 143,147 **** else { ! // There might be a garbagy Engine.variablesConstraint // in the monotype variable variable tag.setKind(null); --- 143,147 ---- else { ! // There might be a garbagy Engine.variablesConstraint // in the monotype variable variable tag.setKind(null); *************** *** 151,156 **** { Engine.Constraint c = (Engine.Constraint) cs.next(); ! ! if (c.hasConstants() && c != nice.tools.typing.PrimitiveType.nullTC.getKind()) { --- 151,156 ---- { Engine.Constraint c = (Engine.Constraint) cs.next(); ! ! if (c.hasConstants() && c != nice.tools.typing.PrimitiveType.nullTC.getKind()) { *************** *** 182,186 **** List solutions = enumerateTags(tags, all); res.addAll(solutions); ! if (solutions.size() > 0) /* We found solutions for the current choice of kinds for tags. --- 182,186 ---- List solutions = enumerateTags(tags, all); res.addAll(solutions); ! if (solutions.size() > 0) /* We found solutions for the current choice of kinds for tags. *************** *** 205,209 **** { TagsList tuples = new TagsList(tags.length); ! List kinds = new ArrayList(tags.length); /* euristic: at most one kind per tag */ List observers = new ArrayList(tags.length); // idem --- 205,209 ---- { TagsList tuples = new TagsList(tags.length); ! List kinds = new ArrayList(tags.length); /* euristic: at most one kind per tag */ List observers = new ArrayList(tags.length); // idem *************** *** 214,223 **** Engine.enter(false); try{ ! for(int i = 0;i<tags.length;i++) { Engine.Constraint k = Engine.getConstraint(tags[i].getKind()); BitVector obs; ! int idx = kinds.indexOf(k); if(idx<0) --- 214,223 ---- Engine.enter(false); try{ ! for(int i = 0;i<tags.length;i++) { Engine.Constraint k = Engine.getConstraint(tags[i].getKind()); BitVector obs; ! int idx = kinds.indexOf(k); if(idx<0) *************** *** 228,232 **** else obs = (BitVector) observers.get(idx); ! // ignore non matchable kinds // XXX move up ? --- 228,232 ---- else obs = (BitVector) observers.get(idx); ! // ignore non matchable kinds // XXX move up ? *************** *** 240,248 **** else constTC = ((Monotype) tags[i]).head(); ! if(constTC == null) throw new InternalError (tags[i].getKind() + " is not a valid kind in enumerate"); ! TypeConstructor varTC = new TypeConstructor(constTC.variance); vars[i] = varTC; --- 240,248 ---- else constTC = ((Monotype) tags[i]).head(); ! if(constTC == null) throw new InternalError (tags[i].getKind() + " is not a valid kind in enumerate"); ! TypeConstructor varTC = new TypeConstructor(constTC.variance); vars[i] = varTC; *************** *** 262,270 **** } } ! Engine.Constraint[] pKinds = (Engine.Constraint[]) kinds.toArray(new Engine.Constraint[kinds.size()]); ! ! BitVector[] pObs = (BitVector[]) observers.toArray(new BitVector[observers.size()]); --- 262,270 ---- } } ! Engine.Constraint[] pKinds = (Engine.Constraint[]) kinds.toArray(new Engine.Constraint[kinds.size()]); ! ! BitVector[] pObs = (BitVector[]) observers.toArray(new BitVector[observers.size()]); *************** *** 275,279 **** Engine.backtrack(false, false); } ! return tuples.tags; } --- 275,279 ---- Engine.backtrack(false, false); } ! return tuples.tags; } *************** *** 293,300 **** { tuples.startAddition(); ! final BitVector obs = observers[act]; final mlsub.typing.lowlevel.Engine.Constraint kind = kinds[act]; ! kind.enumerate (obs, --- 293,300 ---- { tuples.startAddition(); ! final BitVector obs = observers[act]; final mlsub.typing.lowlevel.Engine.Constraint kind = kinds[act]; ! kind.enumerate (obs, *************** *** 309,313 **** /* If this index does not need all solutions (i.e. all[index] is false), and the solution ! sol does not pass checkClassConstraint, it might have been that some other solution, which we don't generate, would pass. So in this case --- 309,313 ---- /* If this index does not need all solutions (i.e. all[index] is false), and the solution ! sol does not pass checkClassConstraint, it might have been that some other solution, which we don't generate, would pass. So in this case *************** *** 319,323 **** var = vars[index]; ! // We only deal with matchable tags, // and those that belong to this kind. if (var == null || var.getKind() != kind) --- 319,323 ---- var = vars[index]; ! // We only deal with matchable tags, // and those that belong to this kind. if (var == null || var.getKind() != kind) *************** *** 337,346 **** var = vars[index]; ! // We only deal with matchable tags, // and those that belong to this kind. if (var == null || var.getKind() != kind) continue; ! solution = (TypeConstructor) kind.getElement(getSolutionOf(var.getId())); tuples.set(index, solution); --- 337,346 ---- var = vars[index]; ! // We only deal with matchable tags, // and those that belong to this kind. if (var == null || var.getKind() != kind) continue; ! solution = (TypeConstructor) kind.getElement(getSolutionOf(var.getId())); tuples.set(index, solution); *************** *** 360,368 **** /** ! Return true if and only if sol can be the runtime tag of a subtype of var. This especially involves checking the eventual constraints on the type parameters of the class sol. */ ! private static boolean checkClassConstraint(Element var, TypeConstructor sol) { --- 360,368 ---- /** ! Return true if and only if sol can be the runtime tag of a subtype of var. This especially involves checking the eventual constraints on the type parameters of the class sol. */ ! private static boolean checkClassConstraint(Element var, TypeConstructor sol) { *************** *** 406,410 **** } ! /** A list of possible values for tags. --- 406,410 ---- } ! /** A list of possible values for tags. *************** *** 413,421 **** TagsList tags = new TagsList(width); ! for (...) { ... tags.startAddition(); ! for (each possibility for the tags in the group) { tags.startEntry(); --- 413,421 ---- TagsList tags = new TagsList(width); ! for (...) { ... tags.startAddition(); ! for (each possibility for the tags in the group) { tags.startEntry(); *************** *** 448,452 **** boolean endAddition() { ! return first; } --- 448,452 ---- boolean endAddition() { ! return first; } *************** *** 464,468 **** } else ! // copy the first elements at the end, // so that they can be overwritten with the new values for(int i = 0; i < size; i++) --- 464,468 ---- } else ! // copy the first elements at the end, // so that they can be overwritten with the new values for(int i = 0; i < size; i++) |
From: Daniel B. <bo...@us...> - 2005-05-25 23:23:07
|
Update of /cvsroot/nice/Nice/src/mlsub/typing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2569/src/mlsub/typing Modified Files: Variance.java NullnessKind.java MonotypeVar.java Log Message: Fix subtyping of wildcards. Should be safe, but overrestrictive, since a wildcard is now not a subtype of itself. Index: Variance.java =================================================================== RCS file: /cvsroot/nice/Nice/src/mlsub/typing/Variance.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Variance.java 30 Jul 2004 19:08:45 -0000 1.17 --- Variance.java 25 May 2005 23:22:57 -0000 1.18 *************** *** 252,261 **** case INVARIANT: if (tp2[i].isUnknown()) ! return; if (tp1[i].isUnknown()) { tp2[i].setUnknown(); ! return; } --- 252,261 ---- case INVARIANT: if (tp2[i].isUnknown()) ! continue; if (tp1[i].isUnknown()) { tp2[i].setUnknown(); ! continue; } Index: MonotypeVar.java =================================================================== RCS file: /cvsroot/nice/Nice/src/mlsub/typing/MonotypeVar.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** MonotypeVar.java 30 Jul 2004 19:08:45 -0000 1.18 --- MonotypeVar.java 25 May 2005 23:22:57 -0000 1.19 *************** *** 208,212 **** throws mlsub.typing.lowlevel.Unsatisfiable { ! super.setUnknown(); this.unknown = true; } --- 208,216 ---- throws mlsub.typing.lowlevel.Unsatisfiable { ! if (equivalent != null) ! equivalent.setUnknown(); ! ! equivalent = UnknownMonotype.instance; ! persistentKind = null; this.unknown = true; } *************** *** 278,281 **** --- 282,287 ---- if (equivalent != null) return equivalent.canonify(); + if (isUnknown()) + return UnknownMonotype.instance; // A type var with kind TopKind is equivalent to Top. else if (kind == TopMonotype.TopKind.instance) Index: NullnessKind.java =================================================================== RCS file: /cvsroot/nice/Nice/src/mlsub/typing/NullnessKind.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** NullnessKind.java 16 Jun 2004 10:00:36 -0000 1.4 --- NullnessKind.java 25 May 2005 23:22:57 -0000 1.5 *************** *** 85,105 **** throws Unsatisfiable { ! MonotypeConstructor m1 = mc(e1), m2 = mc(e2); ! Engine.leq(m1.getTC(), m2.getTC()); ! Engine.leq(m1.getTP()[0], m2.getTP()[0]); } ! private MonotypeConstructor mc(Element e) { try { ! return (MonotypeConstructor) ((Monotype) e).equivalent(); } catch(ClassCastException ex) { throw new InternalError ! (e + " was expected to be a monotype constructor, " + ! " it's a " + e.getClass()); } } --- 85,111 ---- throws Unsatisfiable { ! Monotype m1 = (Monotype) e1; ! Monotype m2 = (Monotype) e2; ! ! if (m1.isUnknown() || m2.isUnknown()) ! throw LowlevelUnsatisfiable.instance; ! ! MonotypeConstructor mc1 = mc(m1), mc2 = mc(m2); ! Engine.leq(mc1.getTC(), mc2.getTC()); ! Engine.leq(mc1.getTP()[0], mc2.getTP()[0]); } ! private MonotypeConstructor mc(Monotype m) { try { ! return (MonotypeConstructor) m.equivalent(); } catch(ClassCastException ex) { throw new InternalError ! (m + " was expected to be a monotype constructor, " + ! " it's a " + m.getClass()); } } |