nice-commit Mailing List for The Nice Programming Language (Page 49)
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...> - 2004-04-15 10:03:30
|
Update of /cvsroot/nice/Nice/src/gnu/bytecode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9018/src/gnu/bytecode Modified Files: CodeAttr.java Log Message: Handle catch blocks that have an anonymous function capturing the exception. Index: CodeAttr.java =================================================================== RCS file: /cvsroot/nice/Nice/src/gnu/bytecode/CodeAttr.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** CodeAttr.java 19 Feb 2004 12:30:40 -0000 1.23 --- CodeAttr.java 15 Apr 2004 10:03:21 -0000 1.24 *************** *** 1834,1837 **** --- 1834,1850 ---- } + public void emitCatchStart(ClassType type) + { + emitTryEnd(); + SP = 0; + if (try_stack.try_type != null) + emitCatchEnd(); + try_stack.try_type = type; + readPC = PC; + addHandler(try_stack.start_pc, try_stack.end_pc, + PC, type, getConstants()); + pushType(type); + } + public void emitCatchEnd() { *************** *** 1859,1863 **** Type except_type = Type.pointer_type; Variable except = addLocal(except_type); ! emitCatchStart(null); emitStore(except); emitGoto(try_stack.finally_subr, 168); // jsr --- 1872,1876 ---- Type except_type = Type.pointer_type; Variable except = addLocal(except_type); ! emitCatchStart((Variable) null); emitStore(except); emitGoto(try_stack.finally_subr, 168); // jsr |
From: Daniel B. <bo...@us...> - 2004-04-15 10:03:29
|
Update of /cvsroot/nice/Nice/src/gnu/expr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9018/src/gnu/expr Modified Files: CatchClause.java Log Message: Handle catch blocks that have an anonymous function capturing the exception. Index: CatchClause.java =================================================================== RCS file: /cvsroot/nice/Nice/src/gnu/expr/CatchClause.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CatchClause.java 26 Jan 2002 10:50:31 -0000 1.3 --- CatchClause.java 15 Apr 2004 10:03:20 -0000 1.4 *************** *** 31,35 **** Variable catchVar = catchDecl.allocateVariable(code); code.enterScope (scope); ! code.emitCatchStart(catchVar); body.compileWithPosition(comp, target); code.emitCatchEnd(); --- 31,36 ---- Variable catchVar = catchDecl.allocateVariable(code); code.enterScope (scope); ! code.emitCatchStart((ClassType) catchDecl.getType()); ! catchDecl.compileStore(comp); body.compileWithPosition(comp, target); code.emitCatchEnd(); |
From: Daniel B. <bo...@us...> - 2004-04-15 10:03:28
|
Update of /cvsroot/nice/Nice/testsuite/compiler/statements In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9018/testsuite/compiler/statements Modified Files: exceptions.testsuite Log Message: Handle catch blocks that have an anonymous function capturing the exception. Index: exceptions.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/statements/exceptions.testsuite,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** exceptions.testsuite 2 Apr 2004 17:26:23 -0000 1.3 --- exceptions.testsuite 15 Apr 2004 10:03:19 -0000 1.4 *************** *** 2,7 **** /*/// FAIL HERE */ throw java.lang.Exception; ! /// PASS bug ! if ( 3 < 4) { try {} --- 2,7 ---- /*/// FAIL HERE */ throw java.lang.Exception; ! /// PASS ! if (3 < 4) { try {} |
From: Daniel B. <bo...@us...> - 2004-04-14 16:35:49
|
Update of /cvsroot/nice/Nice/testsuite/compiler/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8598/testsuite/compiler/functions Modified Files: clotures.testsuite Log Message: Properly walk over initial values of class fields. Index: clotures.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/functions/clotures.testsuite,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** clotures.testsuite 3 Apr 2004 12:23:35 -0000 1.6 --- clotures.testsuite 14 Apr 2004 16:35:35 -0000 1.7 *************** *** 27,31 **** }); ! /// PASS bug /// Toplevel let String->String->String foo = String s => String t => s+t; --- 27,31 ---- }); ! /// PASS /// Toplevel let String->String->String foo = String s => String t => s+t; |
From: Daniel B. <bo...@us...> - 2004-04-14 16:35:49
|
Update of /cvsroot/nice/Nice/src/gnu/expr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8598/src/gnu/expr Modified Files: ClassExp.java Log Message: Properly walk over initial values of class fields. Index: ClassExp.java =================================================================== RCS file: /cvsroot/nice/Nice/src/gnu/expr/ClassExp.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ClassExp.java 15 Dec 2003 02:40:16 -0000 1.17 --- ClassExp.java 14 Apr 2004 16:35:35 -0000 1.18 *************** *** 599,603 **** decl = decl.nextDecl()) if (decl.isStatic() && decl.value != null) ! walker.walkExpression(decl.value); } finally --- 599,603 ---- decl = decl.nextDecl()) if (decl.isStatic() && decl.value != null) ! decl.value.walk(walker); } finally |
From: Daniel B. <bo...@us...> - 2004-04-14 16:35:49
|
Update of /cvsroot/nice/Nice/testsuite/compiler/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8598/testsuite/compiler/syntax Modified Files: tupleArguments.testsuite Log Message: Properly walk over initial values of class fields. Index: tupleArguments.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/syntax/tupleArguments.testsuite,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tupleArguments.testsuite 23 Nov 2003 19:15:15 -0000 1.3 --- tupleArguments.testsuite 14 Apr 2004 16:35:34 -0000 1.4 *************** *** 15,19 **** assert tuple==foo(tuple); ! /// PASS bug /// Toplevel let ((String, String))->() foo = ((String s, String t))=> { --- 15,19 ---- assert tuple==foo(tuple); ! /// PASS /// Toplevel let ((String, String))->() foo = ((String s, String t))=> { |
From: Daniel B. <bo...@us...> - 2004-04-14 15:12:16
|
Update of /cvsroot/nice/Nice/src/gnu/expr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22818/src/gnu/expr Modified Files: LambdaExp.java Log Message: Typo. Index: LambdaExp.java =================================================================== RCS file: /cvsroot/nice/Nice/src/gnu/expr/LambdaExp.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** LambdaExp.java 15 Feb 2004 16:56:53 -0000 1.24 --- LambdaExp.java 14 Apr 2004 15:12:07 -0000 1.25 *************** *** 1129,1133 **** Label previous = null; ! /* Dumping initializers can make new initielizers to be added, so we loop until none is added. The order of execution is reversed, the last ones being required --- 1129,1133 ---- Label previous = null; ! /* Dumping initializers can add new initializers, so we loop until none is added. The order of execution is reversed, the last ones being required |
From: Arjan B. <ar...@us...> - 2004-04-14 12:52:06
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26607/F:/nice/stdlib/nice/lang Modified Files: collections.nice Log Message: similarEmptyCollection for HashSet (from Arthur Smyles). Index: collections.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/collections.nice,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** collections.nice 20 Mar 2004 12:20:28 -0000 1.63 --- collections.nice 14 Apr 2004 12:51:57 -0000 1.64 *************** *** 154,157 **** --- 154,158 ---- similarEmptyCollection(c#Stack) = new Stack(); + similarEmptyCollection(c#HashSet) = new HashSet(c.size()); /**************************************************************** * Sort |
From: Francis B. <fb...@us...> - 2004-04-03 15:04:00
|
Update of /cvsroot/nice/Nice/src/nice/tools/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14106/src/nice/tools/doc Modified Files: htmlwriter.nice Log Message: htmlwriter now dumps the docString to the page for classes, methods, and global vars. However, docString doesn't seem to be working properly. Index: htmlwriter.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/doc/htmlwriter.nice,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** htmlwriter.nice 1 Apr 2004 10:58:50 -0000 1.9 --- htmlwriter.nice 3 Apr 2004 14:51:41 -0000 1.10 *************** *** 24,27 **** --- 24,32 ---- //mainPackage = mainPackage.deleteAtEnd("/").replace('/', "."); + /** + * Default implementation - does nothing + * @param d a definition to document + * @param packageName the name of the package this definition is in. + */ void write(Definition d, String packageName) { } *************** *** 47,51 **** writer.write(getHeader(c.getName().toString())); ! writer.write("<h1>Class " + c.getName() + "</h1>"); //Print hierarchy --- 52,56 ---- writer.write(getHeader(c.getName().toString())); ! writer.write("<h1>Class " + c.getName() + "</h1>\n"); //Print hierarchy *************** *** 70,86 **** hierarchy = list.get(i).getName() + "\n" + spaces + "|\n" + spaces + "+--" + hierarchy; } ! writer.write("<pre>"); writer.write(hierarchy); ! writer.write("</pre>"); //Implemented interfaces ClassDefinition.Interface[?] interfaces = c.getImplementedInterfaces(); ! if(interfaces != null) { ! writer.write("<b>Implemented interfaces:</b>"); ! writer.write("<ul>"); interfaces.foreach(ClassDefinition.Interface i => ! writer.write("<li>" + i.getName() + "</li>")); ! writer.write("</ul>"); } writer.write(getFooter()); --- 75,100 ---- hierarchy = list.get(i).getName() + "\n" + spaces + "|\n" + spaces + "+--" + hierarchy; } ! writer.write("<pre>\n"); writer.write(hierarchy); ! writer.write("</pre>\n"); //Implemented interfaces ClassDefinition.Interface[?] interfaces = c.getImplementedInterfaces(); ! if(interfaces != null && interfaces.length > 0) { ! writer.write("<b>Implemented interfaces:</b>\n"); ! writer.write("<ul>\n"); interfaces.foreach(ClassDefinition.Interface i => ! writer.write("<li>" + i.getName() + "</li>\n")); ! writer.write("</ul>\n"); } + + writer.write("<p>\n"); + String comments; + if(c.docString() != null) + comments = notNull(c.docString()); + else + comments = "null"; + writer.write(comments + "\n"); + writer.write("</p>\n"); writer.write(getFooter()); *************** *** 102,112 **** writer.write(getHeader(gv.getName().toString())); ! writer.write("<h1>Global Variable " + gv.getName() + "</h1>"); writer.write(htmlSafe(gv.toString())); ! writer.write("<p>"); ! writer.write(""); ! writer.write("</p>"); writer.write(getFooter()); --- 116,131 ---- writer.write(getHeader(gv.getName().toString())); ! writer.write("<h1>Global Variable " + gv.getName() + "</h1>\n"); writer.write(htmlSafe(gv.toString())); ! writer.write("<p>\n"); ! String comments; ! if(gv.docString() != null) ! comments = notNull(gv.docString()); ! else ! comments = "null"; ! writer.write(comments + "\n"); ! writer.write("</p>\n"); writer.write(getFooter()); *************** *** 118,122 **** //Initialise a FileWriter ! File dir = new File(outdir, packageName.replace('.',java.io.File.separator)); if(!dir.exists() && !dir.mkdirs()) { System.err.println("Error creating directory structure"); --- 137,141 ---- //Initialise a FileWriter ! File dir = new File(outdir, packageName.replace('.', java.io.File.separator)); if(!dir.exists() && !dir.mkdirs()) { System.err.println("Error creating directory structure"); *************** *** 128,137 **** writer.write(getHeader(m.getName().toString())); ! writer.write("<h1>Method " + m.getName() + "</h1>"); writer.write(htmlSafe(m.toString())); writer.write("<p>"); ! writer.write("nicedoc comments would go here..."); writer.write("</p>"); --- 147,162 ---- writer.write(getHeader(m.getName().toString())); ! writer.write("<h1>Method " + m.getName() + "</h1>\n"); writer.write(htmlSafe(m.toString())); + writer.write("<p>\n"); writer.write("<p>"); ! String comments; ! if(m.docString() != null) ! comments = notNull(m.docString()); ! else ! comments = "null"; ! writer.write(comments + "\n"); writer.write("</p>"); |
From: Arjan B. <ar...@us...> - 2004-04-03 12:35:53
|
Update of /cvsroot/nice/Nice/testsuite/compiler/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23231/F:/nice/testsuite/compiler/functions Modified Files: clotures.testsuite Log Message: Don't forget the bug marker. Index: clotures.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/functions/clotures.testsuite,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** clotures.testsuite 3 Apr 2004 12:17:40 -0000 1.5 --- clotures.testsuite 3 Apr 2004 12:23:35 -0000 1.6 *************** *** 27,31 **** }); ! /// PASS /// Toplevel let String->String->String foo = String s => String t => s+t; --- 27,31 ---- }); ! /// PASS bug /// Toplevel let String->String->String foo = String s => String t => s+t; |
From: Arjan B. <ar...@us...> - 2004-04-03 12:29:58
|
Update of /cvsroot/nice/Nice/testsuite/compiler/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22194/F:/nice/testsuite/compiler/functions Modified Files: clotures.testsuite Log Message: Testcase for a code generation bug (NPE when compiling a global constant with nested anon functions aa value). Index: clotures.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/functions/clotures.testsuite,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** clotures.testsuite 25 Mar 2004 01:39:52 -0000 1.4 --- clotures.testsuite 3 Apr 2004 12:17:40 -0000 1.5 *************** *** 26,27 **** --- 26,31 ---- }); }); + + /// PASS + /// Toplevel + let String->String->String foo = String s => String t => s+t; |
From: Arjan B. <ar...@us...> - 2004-04-02 17:38:33
|
Update of /cvsroot/nice/Nice/testsuite/compiler/statements In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1379/F:/nice/testsuite/compiler/statements Modified Files: exceptions.testsuite Log Message: Testcase for a code generation bug. Index: exceptions.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/statements/exceptions.testsuite,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** exceptions.testsuite 9 Dec 2003 17:24:03 -0000 1.2 --- exceptions.testsuite 2 Apr 2004 17:26:23 -0000 1.3 *************** *** 1,2 **** --- 1,12 ---- /// FAIL /*/// FAIL HERE */ throw java.lang.Exception; + + /// PASS bug + if ( 3 < 4) + { + try {} + catch (Exception e) + { + [1,2,3].foreach(int i => println(e)); + } + } |
From: Arjan B. <ar...@us...> - 2004-04-01 11:10:47
|
Update of /cvsroot/nice/Nice/src/nice/tools/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15923/F:/nice/src/nice/tools/doc Modified Files: htmlwriter.nice Log Message: make nicedoc compile again. Index: htmlwriter.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/doc/htmlwriter.nice,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** htmlwriter.nice 30 Mar 2004 14:16:47 -0000 1.8 --- htmlwriter.nice 1 Apr 2004 10:58:50 -0000 1.9 *************** *** 107,111 **** writer.write("<p>"); ! writer.write(); writer.write("</p>"); --- 107,111 ---- writer.write("<p>"); ! writer.write(""); writer.write("</p>"); |
From: Francis B. <fb...@us...> - 2004-03-30 14:28:29
|
Update of /cvsroot/nice/Nice/src/nice/tools/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2935/Nice/src/nice/tools/doc Modified Files: htmlwriter.nice Log Message: No longer writes empty headings. For example, if no global vars exist then the global vars heading is not written. Index: htmlwriter.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/doc/htmlwriter.nice,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** htmlwriter.nice 22 Mar 2004 15:17:22 -0000 1.7 --- htmlwriter.nice 30 Mar 2004 14:16:47 -0000 1.8 *************** *** 7,18 **** */ - /*TODO - * 1)Make it file system independent by using java.io.File.separator instead of '/' - * Nice seems to reject this - - * Ambiguity for symbol File. Possibilities are : - * java.io.File File(?String, String) - * java.io.File File(?File, String) - */ - /*Below is various info that could be used in the *construction of the method entry --- 7,10 ---- *************** *** 115,119 **** writer.write("<p>"); ! writer.write("nicedoc comments would go here..."); writer.write("</p>"); --- 107,111 ---- writer.write("<p>"); ! writer.write(); writer.write("</p>"); *************** *** 185,215 **** //Write classes ! writer.write("<b>Classes:</b>\n"); ! writer.write("<ul>\n"); ! for(ClassDefinition.Class c : classes) { ! String s = c.getName().toString(); ! int index = s.lastIndexOf('.'); ! if(index != s.length()-1) ! s = s.substring(index+1); ! writer.write("<li><a href='" + s + ".html'>" + s + "</a></li>\n"); } - writer.write("</ul>\n"); //Write methods ! writer.write("<b>Methods:</b>\n"); ! writer.write("<ul>\n"); ! for(MethodDeclaration m : methods) { ! writer.write("<li><a href='" calculateMethodFilename(m) "'>" m.getName() "</a>" + ! ": " m.getType() "</li>\n"); } - writer.write("</ul>\n"); //Write global vars ! writer.write("<b>Global Variables:</b>\n"); ! writer.write("<ul>\n"); ! for(GlobalVarDeclaration gv : globalVars) { ! writer.write("<li><a href='gv_" gv.getName() ".html'>" gv.getName() "</a></li>\n"); } - writer.write("</ul>\n"); writer.write(getFooter()); --- 177,213 ---- //Write classes ! if(classes.size() > 0) { ! writer.write("<b>Classes:</b>\n"); ! writer.write("<ul>\n"); ! for(ClassDefinition.Class c : classes) { ! String s = c.getName().toString(); ! int index = s.lastIndexOf('.'); ! if(index != s.length()-1) ! s = s.substring(index+1); ! writer.write("<li><a href='" + s + ".html'>" + s + "</a></li>\n"); ! } ! writer.write("</ul>\n"); } //Write methods ! if(methods.size() > 0) { ! writer.write("<b>Methods:</b>\n"); ! writer.write("<ul>\n"); ! for(MethodDeclaration m : methods) { ! writer.write("<li><a href='" calculateMethodFilename(m) "'>" m.getName() "</a>" + ! ": " m.getType() "</li>\n"); ! } ! writer.write("</ul>\n"); } //Write global vars ! if(globalVars.size() > 0) { ! writer.write("<b>Global Variables:</b>\n"); ! writer.write("<ul>\n"); ! for(GlobalVarDeclaration gv : globalVars) { ! writer.write("<li><a href='gv_" gv.getName() ".html'>" gv.getName() "</a></li>\n"); ! } ! writer.write("</ul>\n"); } writer.write(getFooter()); |
From: Daniel B. <bo...@us...> - 2004-03-29 19:43:08
|
Update of /cvsroot/nice/Nice/regtest/java In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30361/regtest/java Modified Files: Makefile Log Message: Use the current nice compiler, not the system one. Index: Makefile =================================================================== RCS file: /cvsroot/nice/Nice/regtest/java/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile 28 Nov 2003 14:01:31 -0000 1.2 --- Makefile 29 Mar 2004 19:31:38 -0000 1.3 *************** *** 1,6 **** all: B/BIj.class B/BAj.class J/J.class J/Other.class A/An.class A/In.class: A/A.nice ! nicec --sourcepath "${NICE_TOP}" regtest.java.A B/BAj.class: A/An.class B/BAj.java --- 1,8 ---- + nicec = $(NICE_TOP)/bin/nicec -e --sourcepath "${NICE_TOP}" + all: B/BIj.class B/BAj.class J/J.class J/Other.class A/An.class A/In.class: A/A.nice ! $(nicec) regtest.java.A B/BAj.class: A/An.class B/BAj.java |
From: Daniel B. <bo...@us...> - 2004-03-26 16:26:38
|
Update of /cvsroot/nice/Nice/src/mlsub/typing/lowlevel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30198/src/mlsub/typing/lowlevel Modified Files: K0.java Log Message: Save the constraint when there are any soft variables (which happens when in existential mode). Index: K0.java =================================================================== RCS file: /cvsroot/nice/Nice/src/mlsub/typing/lowlevel/K0.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** K0.java 23 Mar 2004 20:28:43 -0000 1.21 --- K0.java 26 Mar 2004 16:15:39 -0000 1.22 *************** *** 1336,1340 **** Backup previous; int savedM; ! int savedN; BitVector savedGarbage; DomainVector savedDomains; --- 1336,1340 ---- Backup previous; int savedM; ! BitMatrix savedC; BitVector savedGarbage; DomainVector savedDomains; *************** *** 1348,1353 **** } this.savedM = K0.this.m; ! this.savedN = K0.this.n; ! this.savedGarbage = (BitVector)K0.this.garbage.clone(); this.savedDomains = (DomainVector)K0.this.domains.clone(); --- 1348,1357 ---- } this.savedM = K0.this.m; ! ! // We only need to save C if there are soft variables, since ! // others can't be modified anyway. ! if (K0.this.m != K0.this.n) ! this.savedC = (BitMatrix) K0.this.C.clone(); ! this.savedGarbage = (BitVector)K0.this.garbage.clone(); this.savedDomains = (DomainVector)K0.this.domains.clone(); *************** *** 1389,1395 **** this.Rt.setSize(m); ! this.n = backup.savedN; ! this.C.setSize(n); ! this.Ct.setSize(n); this.garbage = backup.savedGarbage; --- 1393,1408 ---- this.Rt.setSize(m); ! if (backup.savedC != null) ! { ! this.C = backup.savedC; ! this.Ct = backup.savedC.transpose(); ! this.n = backup.savedC.size(); ! } ! else ! { ! this.n = backup.savedM; ! this.C.setSize(n); ! this.Ct.setSize(n); ! } this.garbage = backup.savedGarbage; |
From: Daniel B. <bo...@us...> - 2004-03-26 16:26:38
|
Update of /cvsroot/nice/Nice/testsuite/compiler/typing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30198/testsuite/compiler/typing Modified Files: inference.testsuite Log Message: Save the constraint when there are any soft variables (which happens when in existential mode). Index: inference.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/typing/inference.testsuite,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** inference.testsuite 24 Mar 2004 23:44:24 -0000 1.6 --- inference.testsuite 26 Mar 2004 16:15:38 -0000 1.7 *************** *** 167,168 **** --- 167,200 ---- /// Toplevel <T,U | U <: T> (List<T>,List<U>) foo(List<U> x) = (new ArrayList(x), x); + + /// PASS + // bug #923443 + byte n = 10; + let L1 = new LinkedList(); + L1.add(n); + + foo(L1[0]); + + /// Toplevel + void foo(byte) {} + void foo(boolean) {} + + /// PASS + // self-contained test inspired by #923443 + let a = new A(); + + int i = 0; + poly(a, i); + + foo(a); + + /// Toplevel + void foo(A<int>) {} + void foo(A<boolean>) { assert false; } + + /// PASS + let testmap = new HashMap(); + for(i : 1..10) + testmap[i] = i.toString(); + for(i : testmap.keySet()) + println(i + " => " + testmap[i]); |
From: Daniel B. <bo...@us...> - 2004-03-26 16:14:17
|
Update of /cvsroot/nice/Nice/src/mlsub/typing/lowlevel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27800/src/mlsub/typing/lowlevel Modified Files: BitVector.java Log Message: Revert to 1.4 for now, since later optimizations have changed behaviour (having a vector longer than the size, it seems), which are problematic now that we need BitMatrix.transpose again. Need to investigate why. Index: BitVector.java =================================================================== RCS file: /cvsroot/nice/Nice/src/mlsub/typing/lowlevel/BitVector.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** BitVector.java 6 Sep 2003 11:31:10 -0000 1.8 --- BitVector.java 26 Mar 2004 16:03:19 -0000 1.9 *************** *** 359,379 **** n = bits2length; } ! ! if (n<=1) ! { ! andW(0, ~(S1.getW(0) & S2.getW(0)) | S3.getW(0)); ! } ! else ! { ! int bits3length = S3.length(); ! if (bits3length > n) { ! bits3length = n; ! } ! ! for (int i = 0; i < bits3length; i++) ! bits1[i] &= ~(S1.bits1[i] & S2.bits1[i]) | S3.getW(i); ! ! for (int i = bits3length; i < n; i++) ! bits1[i] &= ~(S1.bits1[i] & S2.bits1[i]); } } --- 359,365 ---- n = bits2length; } ! int bits3length = S3.length(); ! for (int i = 0; i < n; i++) { ! andW(i, ~(S1.getW(i) & S2.getW(i)) | (i < bits3length ? S3.getW(i) : 0L)); } } *************** *** 387,399 **** } int setLength = set.nonZeroLength(); ! if (setLength > 1) { ! ensureCapacity(bitIndex(setLength-1)); ! for (int i = setLength; i-- > 0 ;) { ! bits1[i] |= set.bits1[i]; ! } } ! else ! { ! orW(0, set.getW(0)); } } --- 373,381 ---- } int setLength = set.nonZeroLength(); ! if (setLength > 0) { ! ensureCapacity(bitIndex(setLength-1));// this might cause some problem... } ! for (int i = setLength; i-- > 0 ;) { ! orW(i, set.getW(i)); } } *************** *** 441,445 **** /* * If there are some trailing zeros, don't count them - * result is greater or equal to 1 */ private int nonZeroLength() { --- 423,426 ---- *************** *** 448,452 **** int n = bits1.length; ! while (n > 1 && bits1[n-1] == 0L) { n--; } return n; } --- 429,433 ---- int n = bits1.length; ! while (n > 0 && bits1[n-1] == 0L) { n--; } return n; } *************** *** 539,552 **** else { ! int n = nonZeroLength(); ! if (n <= 1) ! { ! result.bits0 = bits1[0]; ! } ! else ! { ! result.bits1 = new long[n]; ! System.arraycopy(bits1, 0, result.bits1, 0, n); ! } } return result; --- 520,527 ---- else { ! // optim: shrink to nonZeroLength()? ! int n = length(); ! result.bits1 = new long[n]; ! System.arraycopy(bits1, 0, result.bits1, 0, n); } return result; *************** *** 616,628 **** static /* XXX: work around Symantec JIT bug: comment static */ int chunkLowestSetBit(long chunk) { ! int bit = 0; ! chunk &= -chunk; //fix sign bit ! if ((chunk & 0xffffffff00000000L) != 0 ) bit += 32; ! if ((chunk & 0xffff0000ffff0000L) != 0 ) bit += 16; ! if ((chunk & 0xff00ff00ff00ff00L) != 0 ) bit += 8; ! if ((chunk & 0xf0f0f0f0f0f0f0f0L) != 0 ) bit += 4; ! if ((chunk & 0xccccccccccccccccL) != 0 ) bit += 2; ! if ((chunk & 0xaaaaaaaaaaaaaaaaL) != 0 ) bit += 1; ! return bit; } --- 591,606 ---- static /* XXX: work around Symantec JIT bug: comment static */ int chunkLowestSetBit(long chunk) { ! if (chunk == 0L) { ! return 64; ! } else { ! int bit = 0; ! if ((chunk & 0xffffffffL) == 0) { bit += 32; chunk >>>= 32; } ! if ((chunk & 0xffffL) == 0) { bit += 16; chunk >>>= 16; } ! if ((chunk & 0xffL) == 0) { bit += 8; chunk >>>= 8; } ! if ((chunk & 0xfL) == 0) { bit += 4; chunk >>>= 4; } ! if ((chunk & 0x3L) == 0) { bit += 2; chunk >>>= 2; } ! if ((chunk & 0x1L) == 0) { bit++; } ! return bit; ! } } *************** *** 634,649 **** **/ final public int getLowestSetBit() { ! if (bits1 == null) ! { ! if (bits0 != 0L) ! return chunkLowestSetBit(bits0); ! } ! else ! { ! int n = bits1.length; ! for (int i = 0; i < n; i++) { ! long chunk = bits1[i]; ! if (chunk != 0L) ! return (i << BITS_PER_UNIT) + chunkLowestSetBit(chunk); } } --- 612,620 ---- **/ final public int getLowestSetBit() { ! int n = length(); ! for (int i = 0; i < n; i++) { ! long chunk = getW(i); ! if (chunk != 0L) { ! return (i << BITS_PER_UNIT) + chunkLowestSetBit(chunk); } } *************** *** 687,691 **** return UNDEFINED_INDEX; } ! chunk = bits1[i]; } } --- 658,662 ---- return UNDEFINED_INDEX; } ! chunk = getW(i); } } *************** *** 697,701 **** **/ public int getNextBit(int i) { ! return getLowestSetBit(i + 1); } --- 668,677 ---- **/ public int getNextBit(int i) { ! int result = getLowestSetBit(i + 1); ! if (result < 0) { ! return UNDEFINED_INDEX; ! } else { ! return result; ! } } *************** *** 839,860 **** final public void truncate(int newSize) { int i = subscript(newSize); ! if (bits1 == null) ! { ! if (i == 0) ! bits0 &= (1L << (newSize & MASK)) - 1; ! return; ! } ! int bitsLength = nonZeroLength(); ! if (i < bitsLength) andW(i, (1L << (newSize & MASK)) - 1); ! ! int newlength = Math.min(bitsLength, i+1); ! ! if (newlength < bits1.length) ! { ! long[] newBits = new long[newlength]; ! System.arraycopy(bits1, 0, newBits, 0, newlength); ! bits1 = newBits; } } --- 815,826 ---- final public void truncate(int newSize) { int i = subscript(newSize); ! int bitsLength = length(); ! if (i < bitsLength) { andW(i, (1L << (newSize & MASK)) - 1); ! for (i++; i < bitsLength; i++) { ! bits1[i] = 0L; ! } } + // XXX: should shrink the vector to lower memory usage ? } |
From: Daniel B. <bo...@us...> - 2004-03-26 10:59:41
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27505/src/bossa/syntax Modified Files: NiceMethod.java Log Message: No need to reset the existentialLevel upon exit, it is now guaranteed that an enter/leave occurs around existential mode. Index: NiceMethod.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/NiceMethod.java,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** NiceMethod.java 17 Mar 2004 16:55:34 -0000 1.37 --- NiceMethod.java 26 Mar 2004 10:48:41 -0000 1.38 *************** *** 349,357 **** { super.innerTypecheck(); ! try { ! implementation.innerTypecheck(); ! } finally { ! mlsub.typing.lowlevel.Engine.existentialLevel = 0; ! } } --- 349,353 ---- { super.innerTypecheck(); ! implementation.innerTypecheck(); } |
From: Daniel B. <bo...@us...> - 2004-03-26 10:59:41
|
Update of /cvsroot/nice/Nice/src/mlsub/typing/lowlevel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27505/src/mlsub/typing/lowlevel Modified Files: Engine.java Log Message: No need to reset the existentialLevel upon exit, it is now guaranteed that an enter/leave occurs around existential mode. Index: Engine.java =================================================================== RCS file: /cvsroot/nice/Nice/src/mlsub/typing/lowlevel/Engine.java,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** Engine.java 23 Mar 2004 20:28:43 -0000 1.31 --- Engine.java 26 Mar 2004 10:48:38 -0000 1.32 *************** *** 185,189 **** we know when to exit from it. */ ! public static int existentialLevel = 0; public static void startSimplify() --- 185,189 ---- we know when to exit from it. */ ! private static int existentialLevel = 0; public static void startSimplify() |
From: Daniel B. <bo...@us...> - 2004-03-26 00:47:30
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16395/src/bossa/syntax Modified Files: tools.nice MethodDeclaration.java Log Message: Make sure that existential type variables are confined to the typechecking of the current method (even if that one has not type variables itself). Index: tools.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/tools.nice,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** tools.nice 24 Mar 2004 18:19:50 -0000 1.34 --- tools.nice 26 Mar 2004 00:36:38 -0000 1.35 *************** *** 75,78 **** --- 75,83 ---- // If the type is polymorphic, we treat the type variables as soft: // we enter them in the context, so they are not generalized. + + // Make sure we are in a local typing context, so the new type variables + // are discarded when the typechecking of the current method is over. + MethodDeclaration.enterLocalContext(); + type.getConstraint.enter(true); } Index: MethodDeclaration.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/MethodDeclaration.java,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** MethodDeclaration.java 17 Mar 2004 16:55:34 -0000 1.57 --- MethodDeclaration.java 26 Mar 2004 00:36:38 -0000 1.58 *************** *** 186,190 **** { } ! void typecheck() { --- 186,205 ---- { } ! ! /** Whether typechecking is currently happening in the global context */ ! static boolean inGlobalContext = false; ! ! /** Make sure that we are in a local context, which will be discarded ! when typechecking this method is over. ! */ ! static void enterLocalContext() ! { ! if (! inGlobalContext) ! return; ! ! Typing.enter(); ! inGlobalContext = false; ! } ! void typecheck() { *************** *** 199,220 **** Polytype type = getType(); ! ! if (!Constraint.hasBinders(type.getConstraint())) ! { ! try{ ! innerTypecheck(); ! } ! catch(TypingEx e){ ! User.error(this, "Type error in method " + symbol.name); ! } ! return; ! } ! UserError error = null; try{ ! Typing.enter(); try{ ! type.getConstraint().enter(); try { --- 214,227 ---- Polytype type = getType(); ! UserError error = null; try{ ! if (Constraint.hasBinders(type.getConstraint())) ! Typing.enter(); ! else ! inGlobalContext = true; try{ ! Constraint.enter(type.getConstraint()); try { *************** *** 225,229 **** } finally{ ! Typing.leave(); } } --- 232,239 ---- } finally{ ! if (! inGlobalContext) ! Typing.leave(); ! else ! inGlobalContext = false; } } *************** *** 231,237 **** // If we got an earlier error, it's preferable to report that one. if (error == null) ! User.error(this, ! "The type of method " + symbol.name + ! " is not well formed: " + type + "\n" + e); } if (error != null) --- 241,250 ---- // If we got an earlier error, it's preferable to report that one. if (error == null) ! if (Constraint.hasBinders(type.getConstraint())) ! User.error(this, ! "The type of method " + symbol.name + ! " is not well formed: " + type + "\n" + e); ! else ! User.error(this, "Type error in method " + symbol.name); } if (error != null) |
From: Daniel B. <bo...@us...> - 2004-03-25 16:40:40
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5205 Modified Files: LICENSE Log Message: Highlight the linking exception. Index: LICENSE =================================================================== RCS file: /cvsroot/nice/Nice/LICENSE,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LICENSE 28 Nov 2003 00:58:06 -0000 1.2 --- LICENSE 25 Mar 2004 16:29:47 -0000 1.3 *************** *** 7,14 **** of the License, or (at your option) any later version. ! The elements of the compiler that are needed to run generated programs ! additionally include a linking exception to allow Nice programs to be ! distributed under any license terms. This exception is specified at the ! top of each applicable source file. GNU GENERAL PUBLIC LICENSE --- 7,16 ---- of the License, or (at your option) any later version. ! *************************************************************************** ! * The elements of the compiler that are needed to run generated programs * ! * additionally include a linking exception to allow Nice programs to be * ! * distributed under any license terms. This exception is specified at the * ! * top of each applicable source file. * ! *************************************************************************** GNU GENERAL PUBLIC LICENSE |
From: Daniel B. <bo...@us...> - 2004-03-25 15:50:37
|
Update of /cvsroot/nice/Nice/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27796/web Modified Files: index.xml Log Message: Clarification about the license of the Nice runtime. Index: index.xml =================================================================== RCS file: /cvsroot/nice/Nice/web/index.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** index.xml 9 Mar 2004 12:25:48 -0000 1.9 --- index.xml 25 Mar 2004 15:39:49 -0000 1.10 *************** *** 152,156 **** <para> ! Nice is freely available under the GPL. </para> </section> --- 152,158 ---- <para> ! Nice is freely available under the GPL. The runtime classes are licensed ! under the "GPL + linking exception" license, which means that libraries and ! programs written in Nice can be licensed under any terms. </para> </section> |
From: Daniel B. <bo...@us...> - 2004-03-25 01:50:35
|
Update of /cvsroot/nice/Nice/src/gnu/expr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29249/src/gnu/expr Modified Files: Compilation.java Log Message: Fix compilation of apply method for nested closures. Index: Compilation.java =================================================================== RCS file: /cvsroot/nice/Nice/src/gnu/expr/Compilation.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Compilation.java 20 Mar 2004 15:49:24 -0000 1.22 --- Compilation.java 25 Mar 2004 01:39:52 -0000 1.23 *************** *** 1079,1083 **** int argumentStart = 2; ! if (source.getImportsLexVars()) code.emitPushThis(); --- 1079,1083 ---- int argumentStart = 2; ! if (source.getNeedsClosureEnv()) code.emitPushThis(); |
From: Daniel B. <bo...@us...> - 2004-03-25 01:50:34
|
Update of /cvsroot/nice/Nice/testsuite/compiler/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29249/testsuite/compiler/functions Modified Files: clotures.testsuite Log Message: Fix compilation of apply method for nested closures. Index: clotures.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/functions/clotures.testsuite,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** clotures.testsuite 24 Mar 2004 20:20:07 -0000 1.3 --- clotures.testsuite 25 Mar 2004 01:39:52 -0000 1.4 *************** *** 18,22 **** ! /// PASS bug boolean b = false; [].foreach(int x => { --- 18,22 ---- ! /// PASS boolean b = false; [].foreach(int x => { |