nice-commit Mailing List for The Nice Programming Language (Page 3)
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...> - 2006-01-13 17:47:57
|
Update of /cvsroot/nice/Nice/regtest/java In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25456/regtest/java Modified Files: Makefile Log Message: Use inherited $(javac) if it exists, to prevent version mismatch problems with the default javac command. Index: Makefile =================================================================== RCS file: /cvsroot/nice/Nice/regtest/java/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile 29 Mar 2004 19:31:38 -0000 1.3 --- Makefile 13 Jan 2006 17:47:49 -0000 1.4 *************** *** 1,2 **** --- 1,4 ---- + javac = javac + nicec = $(NICE_TOP)/bin/nicec -e --sourcepath "${NICE_TOP}" *************** *** 7,18 **** B/BAj.class: A/An.class B/BAj.java ! javac -classpath "${NICE_TOP}" B/BAj.java B/BIj.class: A/In.class B/BIj.java ! javac -classpath "${NICE_TOP}" B/BIj.java J/J.class: J/J.java ! javac -classpath "${NICE_TOP}" J/J.java J/Other.class: J/Other.java ! javac -classpath "${NICE_TOP}" J/Other.java --- 9,20 ---- B/BAj.class: A/An.class B/BAj.java ! $(javac) -classpath "${NICE_TOP}" B/BAj.java B/BIj.class: A/In.class B/BIj.java ! $(javac) -classpath "${NICE_TOP}" B/BIj.java J/J.class: J/J.java ! $(javac) -classpath "${NICE_TOP}" J/J.java J/Other.class: J/Other.java ! $(javac) -classpath "${NICE_TOP}" J/Other.java |
From: Artem Gr K. <ar...@us...> - 2005-08-29 14:29:13
|
Update of /cvsroot/nice/Nice/testsuite/compiler/overloading In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12450/testsuite/compiler/overloading Added Files: dynamic.nice Log Message: Demonstrate dynamic loading problems. --- NEW FILE: dynamic.nice --- /// COMMENT Dynamic dispatch and handling of a wrong classloading order. import testsuite; void invokeMain( String packageName, java.net.URL[] jars ){ let cl = new java.net.URLClassLoader( jars, fun.class.getClassLoader() ); let clazz = cl.loadClass( packageName + ".fun" ); let main = clazz.getMethod( "main", [ String[].class ] ); try{ main.invoke( null, [ [""] ] ); }catch( java.lang.reflect.InvocationTargetException error ){ let source = TMP.getPath() + '/' + packageName.replace( '.', "/" ) + "/main.nice"; printSourceWithLNums( new java.io.File( source ) ); let cause = error.getTargetException(); ?assert cause != null; cause.printStackTraceWithSourceInfo( System.err, cl ); !assert false; } } void _testExtendsDispatch(){ let jarA = compile( "_testExtendsDispatch.a", toplevel: "enum Result { FOO, BAR } class Foo { Result foo() = FOO; }" ); let jarB = compile( "_testExtendsDispatch.b", toplevel: "class Bar extends Foo { foo() = BAR; }", imp: "_testExtendsDispatch.a", main: "Foo foo = new Bar(); !assert foo.foo() == BAR;" ); let urlNice = new java.io.File( NICE_JAR ).toURL(); // This should be okay: invokeMain( "_testExtendsDispatch.b", [ jarB.toURL(), jarA.toURL(), urlNice ] ); // Wrong classloading order, extending class is loaded after the extended one: invokeMain( "_testExtendsDispatch.b", [ urlNice, jarA.toURL(), jarB.toURL() ] ); } void _testImplementsDispatch(){ let jarA = compile( "_testImplementsDispatch.a", toplevel: "enum Result { FOO, BAR }\n" + "interface IF { Result foo(); }\n" + "class Foo implements IF { foo() = FOO; }" ); let jarB = compile( "_testImplementsDispatch.b", toplevel: "class Bar implements IF { foo() = BAR; }", imp: "_testImplementsDispatch.a", main: "IF bar = new Bar(); !assert bar.foo() == BAR;" ); let urlNice = new java.io.File( NICE_JAR ).toURL(); // This should be okay: invokeMain( "_testImplementsDispatch.b", [ jarB.toURL(), jarA.toURL(), urlNice ] ); // Wrong classloading order, extending class is loaded after the extended one: invokeMain( "_testImplementsDispatch.b", [ urlNice, jarA.toURL(), jarB.toURL() ] ); } |
From: Artem Gr K. <ar...@us...> - 2005-08-29 14:27:51
|
Update of /cvsroot/nice/Nice/testsuite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11987/testsuite Modified Files: helpers.nice Log Message: Export the printSourceWithLNums function. Index: helpers.nice =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/helpers.nice,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** helpers.nice 29 Aug 2005 13:41:10 -0000 1.6 --- helpers.nice 29 Aug 2005 14:27:42 -0000 1.7 *************** *** 38,44 **** File source; error(location, message){ ! println("----1--------10--------20--------30--------40--------50--------60--------70--"); ! int lnum = 0; foreach(readLines(source), ! (String line) => println((++lnum > 9 ? ""lnum : "0"lnum) + "| " + line)); super; } --- 38,42 ---- File source; error(location, message){ ! printSourceWithLNums(source); super; } *************** *** 46,49 **** --- 44,53 ---- } + public void printSourceWithLNums(File source){ + println("----1--------10--------20--------30--------40--------50--------60--------70--"); + int lnum = 0; foreach(readLines(source), + (String line) => println((++lnum > 9 ? ""lnum : "0"lnum) + "| " + line)); + } + public File compile (String pkg, |
From: Artem Gr K. <ar...@us...> - 2005-08-29 13:41:21
|
Update of /cvsroot/nice/Nice/testsuite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31651/testsuite Modified Files: helpers.nice Log Message: TMP uppercased; NICE_JAR variable exported; NICE_JAR added into the "run" classloader (requred to trace exceptions). Index: helpers.nice =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/helpers.nice,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** helpers.nice 29 Aug 2005 12:56:44 -0000 1.5 --- helpers.nice 29 Aug 2005 13:41:10 -0000 1.6 *************** *** 32,36 **** import java.util.jar.*; ! let File tmp = new File("temp-testcase"); class HelpersOutput extends nice.tools.compiler.console.ConsoleOutput { --- 32,37 ---- import java.util.jar.*; ! public let File TMP = new File("temp-testcase"); ! public let String NICE_JAR = "share/java/nice.jar"; class HelpersOutput extends nice.tools.compiler.console.ConsoleOutput { *************** *** 53,57 **** { let dirname = pkg.replace('.', File.separatorChar); ! let dir = new File(tmp, dirname); dir.mkdirs(); let source = new File(dir, "main.nice"); --- 54,58 ---- { let dirname = pkg.replace('.', File.separatorChar); ! let dir = new File(TMP, dirname); dir.mkdirs(); let source = new File(dir, "main.nice"); *************** *** 62,70 **** let compilation = new bossa.modules.Compilation (listener: output, parser: new bossa.parser.JavaccParser()); ! compilation.sourcePath = tmp.getPath(); if (imp != null) ! compilation.packagePath = new File(tmp, imp + ".jar").toString(); compilation.runtimeFile = "classes"; ! let outputJar = new File(tmp, pkg + ".jar"); compilation.output = outputJar.getPath(); --- 63,71 ---- let compilation = new bossa.modules.Compilation (listener: output, parser: new bossa.parser.JavaccParser()); ! compilation.sourcePath = TMP.getPath(); if (imp != null) ! compilation.packagePath = new File(TMP, imp + ".jar").toString(); compilation.runtimeFile = "classes"; ! let outputJar = new File(TMP, pkg + ".jar"); compilation.output = outputJar.getPath(); *************** *** 103,107 **** public void run(String jar) { ! run(new java.io.File(tmp, jar + ".jar")); } --- 104,108 ---- public void run(String jar) { ! run(new java.io.File(TMP, jar + ".jar")); } *************** *** 111,115 **** let mainClassName = jarFile.getManifest().getMainAttributes().getValue("Main-Class"); ! let loader = new nice.tools.util.SelfContainedClassLoader([jar.toURL()]); nice.tools.util.JDK.setDefaultAssertionStatus(loader, true); let mainClass = loader.loadClass(mainClassName); --- 112,116 ---- let mainClassName = jarFile.getManifest().getMainAttributes().getValue("Main-Class"); ! let loader = new nice.tools.util.SelfContainedClassLoader([jar.toURL(),new File(NICE_JAR).toURL()]); nice.tools.util.JDK.setDefaultAssertionStatus(loader, true); let mainClass = loader.loadClass(mainClassName); |
From: Artem Gr K. <ar...@us...> - 2005-08-29 12:57:46
|
Update of /cvsroot/nice/Nice/src/nice/tools/testsuite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21591/src/nice/tools/testsuite Modified Files: runner.nice Log Message: Suppres compilation progress. Report errors via System.exit(). Index: runner.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/testsuite/runner.nice,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** runner.nice 12 Apr 2005 15:52:54 -0000 1.2 --- runner.nice 29 Aug 2005 12:57:38 -0000 1.3 *************** *** 33,36 **** --- 33,42 ---- let File tmp = new File("temp-testcase"); + class EmbeddedDSLOutput extends nice.tools.compiler.console.ConsoleOutput { + progress(packageName, phase){} + } + + var int ERRORS = 0; + public void main(String[] args) { *************** *** 39,42 **** --- 45,52 ---- if (f.isDirectory() && f.hasNiceFile()) test(f)); + if(ERRORS != 0) println( "ERRORS: "ERRORS ); + // 127 and negative values are used by "system", so 126 is a maximum value to be returned by "waitpid" + // (see "man 3 system", "man 2 waitpid"). + if(ERRORS != 0) System.exit(min(ERRORS, 126)); } *************** *** 50,54 **** println("\nCompiling "pkg); ! let output = consoleOutput(); let compilation = new bossa.modules.Compilation (listener: output, parser: new bossa.parser.JavaccParser(), destinationDir: tmp.getPath()); --- 60,64 ---- println("\nCompiling "pkg); ! let output = new EmbeddedDSLOutput(); let compilation = new bossa.modules.Compilation (listener: output, parser: new bossa.parser.JavaccParser(), destinationDir: tmp.getPath()); *************** *** 58,66 **** compile(compilation, pkg); ! if (output.errorCount > 0) ! return; println("\nTesting "pkg); let testListener = new nice.tools.unit.console.Listener(); ! runTests(pkg, testListener, new File(tmp, "test.jar") + File.pathSeparator + "classes"); } --- 68,77 ---- compile(compilation, pkg); ! if (output.errorCount > 0){ ++ERRORS; return; } println("\nTesting "pkg); let testListener = new nice.tools.unit.console.Listener(); ! let ok = runTests(pkg, testListener, new File(tmp, "test.jar") + File.pathSeparator + "classes"); ! if (! ok) ++ERRORS; ! ERRORS += testListener.nFailures; } |
From: Artem Gr K. <ar...@us...> - 2005-08-29 12:56:52
|
Update of /cvsroot/nice/Nice/testsuite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21402/testsuite Modified Files: helpers.nice Log Message: Suppres compilation progress. Index: helpers.nice =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/helpers.nice,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** helpers.nice 29 Aug 2005 12:12:46 -0000 1.4 --- helpers.nice 29 Aug 2005 12:56:44 -0000 1.5 *************** *** 38,44 **** error(location, message){ println("----1--------10--------20--------30--------40--------50--------60--------70--"); ! int lnum = 0; foreach(readLines(source), (String line)=>println((++lnum>9?""lnum:"0"lnum)+"| "+line)); super; } } --- 38,46 ---- error(location, message){ println("----1--------10--------20--------30--------40--------50--------60--------70--"); ! int lnum = 0; foreach(readLines(source), ! (String line) => println((++lnum > 9 ? ""lnum : "0"lnum) + "| " + line)); super; } + progress(packageName, phase){} } |
From: Artem Gr K. <ar...@us...> - 2005-08-29 12:12:59
|
Update of /cvsroot/nice/Nice/testsuite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13291/testsuite Modified Files: helpers.nice Log Message: Print source line numbers; avoid excess line breaks in writeProgram. Index: helpers.nice =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/helpers.nice,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** helpers.nice 29 Aug 2005 11:05:19 -0000 1.3 --- helpers.nice 29 Aug 2005 12:12:46 -0000 1.4 *************** *** 24,27 **** --- 24,28 ---- import nice.io; + import nice.functional; import nice.tools.compiler.console; import nice.tools.compiler; *************** *** 36,41 **** File source; error(location, message){ ! println( "8<-------------------------------------------------------------------------->8" ); ! println( read( source ) ); super; } --- 37,42 ---- File source; error(location, message){ ! println("----1--------10--------20--------30--------40--------50--------60--------70--"); ! int lnum = 0; foreach(readLines(source), (String line)=>println((++lnum>9?""lnum:"0"lnum)+"| "+line)); super; } *************** *** 75,96 **** (File to, ?String imp, ?String toplevel, ?String main, ?String check) { ! using(let w = new BufferedWriter(new FileWriter(to))) { if (imp != null) ! w.write("import "imp";"); if (toplevel != null) ! w.write(toplevel); if (main != null || check != null) { ! w.write("public void main(String[] args) {\n"); if (main != null) ! w.write(main); if (check != null) ! w.write("\nassert "check";"); ! w.write("\n}\n"); } } } --- 76,99 ---- (File to, ?String imp, ?String toplevel, ?String main, ?String check) { ! let lines = new LinkedList(); if (imp != null) ! lines.add("import "imp";"); if (toplevel != null) ! lines.add(toplevel); if (main != null || check != null) { ! lines.add("public void main(String[] args) {"); if (main != null) ! lines.add(main); if (check != null) ! lines.add("assert "check";"); ! lines.add("}"); } + using(let w = new BufferedWriter(new FileWriter(to))) { + w.write(lines.join("\n")); } } |
From: Artem Gr K. <ar...@us...> - 2005-08-29 11:09:06
|
Update of /cvsroot/nice/Nice/testsuite/compiler/abstractInterfaces In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv446/testsuite/compiler/abstractInterfaces Modified Files: reflection.testsuite Log Message: Implemented methods are to be absent from Java-compatible interfaces. Index: reflection.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/abstractInterfaces/reflection.testsuite,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** reflection.testsuite 21 May 2005 16:24:58 -0000 1.1 --- reflection.testsuite 29 Aug 2005 11:08:53 -0000 1.2 *************** *** 66,67 **** --- 66,78 ---- foo( Impl impl, B arg ) = "b"; foo( Impl impl, C arg ) = "c"; + + /// PASS + // Checks that methods with default implementation are absent from the Java-compatible interface. + Foo.class.getMethod( "abstractMethod", [] ); + try{ + Foo.class.getMethod( "aMethodWithCode", [] ); + !assert false; + }catch( java.lang.NoSuchMethodException ok ){} + /// Toplevel + interface Foo { void abstractMethod(); } + String aMethodWithCode( Foo ) = "bar"; |
From: Artem Gr K. <ar...@us...> - 2005-08-29 11:07:11
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32437 Modified Files: build.xml Log Message: Compile advanced (Embedded-DSL?) engine only once. Index: build.xml =================================================================== RCS file: /cvsroot/nice/Nice/build.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** build.xml 6 May 2005 08:37:01 -0000 1.12 --- build.xml 29 Aug 2005 11:07:00 -0000 1.13 *************** *** 265,268 **** --- 265,272 ---- <target name="testengine"> <mac-javac-single includes="nice/tools/testsuite/*.java" /> + <available file="${build}/nice/tools/testsuite/package.nicei" property="haveAdvancedTestengine" /> + </target> + <target name="testengine_advanced" depends="testengine" unless="haveAdvancedTestengine"> + <mac-nicec-new package="nice.tools.testsuite" /> </target> <target name="check_compiler" depends="archive,testengine"> *************** *** 284,291 **** </java> </target> ! <target name="check_advanced" depends="archive,testengine"> ! <mac-nicec-new package="nice.tools.testsuite" /> <java classpathref="freshNice" ! classname="nice.tools.testsuite.dispatch" fork="yes" failonerror="${checkFail}"> --- 288,294 ---- </java> </target> ! <target name="check_advanced" depends="archive,testengine,testengine_advanced"> <java classpathref="freshNice" ! classname="nice.tools.testsuite.fun" fork="yes" failonerror="${checkFail}"> |
From: Artem Gr K. <ar...@us...> - 2005-08-29 11:05:28
|
Update of /cvsroot/nice/Nice/testsuite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31894/testsuite Modified Files: helpers.nice Log Message: Print the generated source on errors. Index: helpers.nice =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/helpers.nice,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** helpers.nice 12 Apr 2005 13:57:32 -0000 1.2 --- helpers.nice 29 Aug 2005 11:05:19 -0000 1.3 *************** *** 23,26 **** --- 23,27 ---- */ + import nice.io; import nice.tools.compiler.console; import nice.tools.compiler; *************** *** 32,36 **** let File tmp = new File("temp-testcase"); ! void compile (String pkg, ?String toplevel = null, --- 33,46 ---- let File tmp = new File("temp-testcase"); ! class HelpersOutput extends nice.tools.compiler.console.ConsoleOutput { ! File source; ! error(location, message){ ! println( "8<-------------------------------------------------------------------------->8" ); ! println( read( source ) ); ! super; ! } ! } ! ! public File compile (String pkg, ?String toplevel = null, *************** *** 42,48 **** let dir = new File(tmp, dirname); dir.mkdirs(); ! writeProgram(new File(dir, "main.nice"), imp, toplevel, main, check); ! let output = consoleOutput(); let compilation = new bossa.modules.Compilation --- 52,59 ---- let dir = new File(tmp, dirname); dir.mkdirs(); ! let source = new File(dir, "main.nice"); ! writeProgram(source, imp, toplevel, main, check); ! let output = new HelpersOutput( source: source ); let compilation = new bossa.modules.Compilation *************** *** 52,60 **** compilation.packagePath = new File(tmp, imp + ".jar").toString(); compilation.runtimeFile = "classes"; ! compilation.output = new File(tmp, pkg + ".jar").toString(); compile(compilation, pkg); ! assert output.errorCount == 0; } --- 63,73 ---- compilation.packagePath = new File(tmp, imp + ".jar").toString(); compilation.runtimeFile = "classes"; ! let outputJar = new File(tmp, pkg + ".jar"); ! compilation.output = outputJar.getPath(); compile(compilation, pkg); ! !assert output.errorCount == 0; ! return outputJar; } *************** *** 83,92 **** } ! void run(String jar) { run(new java.io.File(tmp, jar + ".jar")); } ! void run(java.io.File jar) { let jarFile = new JarFile(jar); --- 96,105 ---- } ! public void run(String jar) { run(new java.io.File(tmp, jar + ".jar")); } ! public void run(java.io.File jar) { let jarFile = new JarFile(jar); |
From: Artem Gr K. <ar...@us...> - 2005-08-29 11:04:16
|
Update of /cvsroot/nice/Nice/src/nice/tools/compiler/console In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31432/src/nice/tools/compiler/console Modified Files: listener.nice Log Message: ConsoleOutput is often convenient to extend. Index: listener.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/compiler/console/listener.nice,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** listener.nice 13 Jan 2005 19:27:09 -0000 1.5 --- listener.nice 29 Aug 2005 11:04:07 -0000 1.6 *************** *** 21,25 **** public ConsoleOutput consoleOutput() = new ConsoleOutput(); ! public final class ConsoleOutput extends StatusCodeListener { int errorCount = 0; --- 21,25 ---- public ConsoleOutput consoleOutput() = new ConsoleOutput(); ! public class ConsoleOutput extends StatusCodeListener { int errorCount = 0; |
From: Artem Gr K. <ar...@us...> - 2005-08-27 14:04:50
|
Update of /cvsroot/nice/Nice/src/nice/tools/compiler/console In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7184/src/nice/tools/compiler/console Modified Files: main.nice Log Message: RFE 1076945: source charset encoding made configurable. Index: main.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/compiler/console/main.nice,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** main.nice 13 Jan 2005 19:27:09 -0000 1.10 --- main.nice 27 Aug 2005 14:04:41 -0000 1.11 *************** *** 68,71 **** --- 68,76 ---- String path => { compilation.sourcePath = path; }), + option("encoding", + purpose: "Character set encoding to be used for .nice source files", + optionHint: "charset", + String charset => { compilation.sourceEncoding = charset; }), + option(letter: 'd', "destination", "Destination directory for compiled packages", |
From: Artem Gr K. <ar...@us...> - 2005-08-27 14:04:50
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7184 Modified Files: NEWS Log Message: RFE 1076945: source charset encoding made configurable. Index: NEWS =================================================================== RCS file: /cvsroot/nice/Nice/NEWS,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** NEWS 5 Jul 2005 16:04:47 -0000 1.82 --- NEWS 27 Aug 2005 14:04:41 -0000 1.83 *************** *** 6,9 **** --- 6,10 ---- * Improved compilation speed. + * Source files encoding can be specified in nicec command-line arguments. -- |
From: Artem Gr K. <ar...@us...> - 2005-08-27 14:04:50
|
Update of /cvsroot/nice/Nice/src/bossa/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7184/src/bossa/modules Modified Files: DirectorySourceContent.java Compilation.nice Compilation.java Log Message: RFE 1076945: source charset encoding made configurable. Index: DirectorySourceContent.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/modules/DirectorySourceContent.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DirectorySourceContent.java 2 Jul 2004 19:31:03 -0000 1.3 --- DirectorySourceContent.java 27 Aug 2005 14:04:40 -0000 1.4 *************** *** 120,123 **** --- 120,134 ---- { try{ + String encoding = pkg.compilation.sourceEncoding; + if(encoding != null) try{ + FileInputStream fis = new FileInputStream(f); + // No need to wrap the FileInputStream with BufferedInputStream here: + // InputStreamReader already contains an input buffer, both in Sun and GNU implementations. + InputStreamReader isr = new InputStreamReader(fis, encoding); + return new BufferedReader(isr); + }catch(UnsupportedEncodingException badEncoding){ + User.warning("Encoding '" + encoding + "' was rejected while reading " + + nice.tools.util.System.prettyPrint(f)); + } return new BufferedReader(new FileReader(f)); } Index: Compilation.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/modules/Compilation.nice,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** Compilation.nice 5 Apr 2005 12:50:03 -0000 1.33 --- Compilation.nice 27 Aug 2005 14:04:40 -0000 1.34 *************** *** 34,37 **** --- 34,38 ---- String sourcePath = "."; + public ?String sourceEncoding = null; ?String packagePath = null; ?String destinationDir = null; Index: Compilation.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/modules/Compilation.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Compilation.java 11 Mar 2005 17:35:54 -0000 1.12 --- Compilation.java 27 Aug 2005 14:04:40 -0000 1.13 *************** *** 25,28 **** --- 25,29 ---- public String sourcePath; + public String sourceEncoding; public String packagePath; public String destinationDir; |
From: Daniel B. <bo...@us...> - 2005-08-19 16:04:39
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27857/src/bossa/syntax Modified Files: overloadedsymbol.nice niceMethod.nice methodDeclaration.nice arguments.nice alternative.nice Added Files: reset.nice Log Message: Dramatically speedup the "remove non-minimal methods" from the overloading resolution phase. Use overriding information for nice methods instead of recomputing the specialization relationship each time. For others (inlined, retyped methods), cache the results. This phase goes down from about 30% of overloading resolution to something negligible. For large enough packages, this translates to about 15% global compilation speedup. Index: arguments.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/arguments.nice,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** arguments.nice 16 Jan 2005 21:51:15 -0000 1.3 --- arguments.nice 19 Aug 2005 16:04:28 -0000 1.4 *************** *** 102,105 **** --- 102,119 ---- int[?] getUsedArguments(VarSymbol s) = usedArguments.get(s); + boolean usedReordering(VarSymbol s) + { + let map = this.getUsedArguments(s); + + if (map == null) + return false; + + for (int i = 0; i < map.length; i++) + if (map[i] != i+1) + return true; + + return false; + } + /** return true if there are arity non-tagged arguments. Index: overloadedsymbol.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/overloadedsymbol.nice,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** overloadedsymbol.nice 4 Apr 2005 15:56:31 -0000 1.18 --- overloadedsymbol.nice 19 Aug 2005 16:04:28 -0000 1.19 *************** *** 107,110 **** --- 107,113 ---- // SECOND PASS: check argument types + // This pass takes about half the time of the whole overloading resolution + // (which dominates typechecking, which dominates global compile time + // for large packages) removed.clear(); *************** *** 159,169 **** let res = symbols[0]; // store the formal argument types for later use together with the type callExp.setComputedType(notNull(arguments.types.get(res)), nice.tools.typing.Types.parameters(res.getClonedType())); res.releaseClonedType(); // store the expression (including default arguments) callExp.arguments.computedExpressions = arguments.getExpressions(res); ! //callExp.arguments = null; // free memory return this.uniqueExpression(); } --- 162,174 ---- let res = symbols[0]; // store the formal argument types for later use together with the type + // this takes about the other half of overloading resolution time callExp.setComputedType(notNull(arguments.types.get(res)), nice.tools.typing.Types.parameters(res.getClonedType())); + res.releaseClonedType(); // store the expression (including default arguments) callExp.arguments.computedExpressions = arguments.getExpressions(res); ! //callExp.arguments.arguments = cast(null); // free memory return this.uniqueExpression(); } *************** *** 535,542 **** return; ! int len = symbols.size(); List<VarSymbol> syms = new ArrayList(symbols); boolean[] remove = new boolean[len]; for(int s1 = 0; s1<len; s1++) { --- 540,550 ---- return; ! let len = symbols.size(); ! var remaining = len; ! List<VarSymbol> syms = new ArrayList(symbols); boolean[] remove = new boolean[len]; + trim: for(int s1 = 0; s1<len; s1++) { *************** *** 559,574 **** arguments.getUsedArguments(syms[s2])); ! try { ! mlsub.typing.Typing.leq(d2, d1); ! try { ! mlsub.typing.Typing.leq(d1, d2); ! } ! catch (mlsub.typing.TypingEx e) { remove[s1] = true; ! break; } - } - catch(mlsub.typing.TypingEx e){ - } } } --- 567,579 ---- arguments.getUsedArguments(syms[s2])); ! if (isLeq(syms[s2], syms[s1], s2, s1, d2, d1, arguments) && ! ! isLeq(syms[s1], syms[s2], s1, s2, d1, d2, arguments)) ! { remove[s1] = true; ! if (--remaining == 1) ! break trim; ! else ! break; } } } *************** *** 585,588 **** --- 590,679 ---- } + boolean isLeq(VarSymbol sym1, VarSymbol sym2, + int s1, int s2, mlsub.typing.Domain d1, mlsub.typing.Domain d2, + Arguments arguments) + { + let res = leqFromOverride(sym1, sym2, arguments); + if (res != 0) + { + let result = res == 1; + storeLeq(result, sym1, sym2); + return result; + } + + boolean result = computeIsLeq(s1, s2, d1, d2); + // Cache method specificity results. + // This is especially important as many frequently used methods + // (inline, retyped) are not covered by the leqFromOverride optimization. + storeLeq(result, sym1, sym2, arguments); + return result; + } + + boolean computeIsLeq(int s1, int s2, + mlsub.typing.Domain d1, mlsub.typing.Domain d2) + { + try { + mlsub.typing.Typing.leq(d1, d2); + return true; + } + catch (mlsub.typing.TypingEx e) { + return false; + } + } + + private int leqFromOverride(VarSymbol s1, VarSymbol s2, Arguments arguments) + { + let reordering = + arguments.usedReordering(s1) || + arguments.usedReordering(s2); + if (reordering) + return 0; + + // Lookup the cache. + // This is especially important as many frequently used methods + // (inline, retyped) do not have override information. + let m = methodLeqs[s1]; + if (m != null) + { + let res = m[s2]; + if (res != null) + return res ? 1 : -1; + } + + let d1 = s1.getMethodDeclaration(); + let d2 = s2.getMethodDeclaration(); + if (d1 == null || d2 == null) + return 0; + + if (! (d1 instanceof NiceMethod && d2 instanceof NiceMethod)) + return 0; + + if (d1.specializes(d2)) + return 1; + else + return -1; + } + + let Map<VarSymbol, Map<VarSymbol, boolean>> methodLeqs = new HashMap(); + + private void storeLeq(boolean result, + VarSymbol s1, VarSymbol s2, Arguments arguments) + { + let reordering = + arguments.usedReordering(s1) || + arguments.usedReordering(s2); + + if (! reordering) + storeLeq(result, s1, s2); + } + + private void storeLeq(boolean result, VarSymbol s1, VarSymbol s2) + { + var m = methodLeqs[s1]; + if (m == null) + methodLeqs[s1] = m = new HashMap(); + m[s2] = result; + } + private mlsub.typing.Domain domain(mlsub.typing.Polytype t, int[?] usedArguments) { Index: methodDeclaration.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/methodDeclaration.nice,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** methodDeclaration.nice 1 Apr 2005 00:09:23 -0000 1.9 --- methodDeclaration.nice 19 Aug 2005 16:04:28 -0000 1.10 *************** *** 251,254 **** --- 251,259 ---- } + public boolean specializes(MethodDeclaration d) + { + return false; + } + public ?Iterator<MethodDeclaration> listSpecializedMethods() { Index: niceMethod.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/niceMethod.nice,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** niceMethod.nice 7 Apr 2005 22:28:12 -0000 1.28 --- niceMethod.nice 19 Aug 2005 16:04:28 -0000 1.29 *************** *** 26,29 **** --- 26,30 ---- private ?List<VarSymbol> homonyms = null; private ?List<MethodDeclaration> specializedMethods = null; + private ?List<MethodDeclaration> specializedMethodsCompileTime = null; { *************** *** 58,77 **** this.findSpecializedMethods(); ! if (isOverride && specializedMethods == null) ! User.error(this, "This method does not override any other method"); ! ! if (! this.inInterfaceFile() && ! isOverride && specializedMethods != null) { ! let parent = notNull(specializedMethods)[0]; ! boolean sameResult = ! this.getReturnType().toString().equals(parent.getReturnType().toString()); ! if (sameResult) ! User.warning(this, "This method overrides " + parent + "\nYou should make this explicit, either by omitting the return type" + ! "\nor by using the 'override' keyword"); ! else ! User.warning(this, "This method overrides " + parent + "\nYou should make this explicit by using the 'override' keyword"); } --- 59,82 ---- this.findSpecializedMethods(); ! // Perform checks if we are compiling from source ! if (! this.inInterfaceFile()) { ! if (isOverride && specializedMethods == null) ! User.error(this, "This method does not override any other method"); ! if (! isOverride && specializedMethods != null) ! { ! let parent = notNull(specializedMethods)[0]; ! boolean sameResult = ! this.getReturnType().toString().equals(parent.getReturnType().toString()); ! ! if (sameResult) ! User.warning(this, "This method overrides " + parent + "\nYou should make this explicit, either by omitting the return type" + ! "\nor by using the 'override' keyword"); ! else ! User.warning(this, "This method overrides " + parent + "\nYou should make this explicit by using the 'override' keyword"); + } } *************** *** 86,89 **** --- 91,100 ---- specializesMethods() = specializedMethods != null; + specializes(MethodDeclaration d) + { + return specializedMethods != null && notNull(specializedMethods).contains(d) || + specializedMethodsCompileTime != null && notNull(specializedMethodsCompileTime).contains(d); + } + private void findSpecializedMethods() { *************** *** 107,112 **** let itsDomain = nice.tools.typing.Types.domain(s.getType()); ! if (this.specializes(s, ourDomain, itsDomain)) { // In a compiled package, we don't need checking. if (! module.compiled()) --- 118,131 ---- let itsDomain = nice.tools.typing.Types.domain(s.getType()); ! if (mlsub.typing.Typing.smaller(ourDomain, itsDomain)) { + // Check if we cannot discover this specialization at runtime + if (! mlsub.typing.Typing.smaller(ourDomain, itsDomain, true) || + nice.tools.typing.Types.typeParameterDispatch(this.getType(), s.getType())) + { + this.addSpecializedMethod(d, compileTimeOnly: true); + continue; + } + // In a compiled package, we don't need checking. if (! module.compiled()) *************** *** 119,124 **** else if (this.isSpecializedBy(d, s, ourDomain, itsDomain)) { ! if (! nice.tools.typing.Types.covariantSpecialization(s.getType(), this.getType())) ! this.reportReturnTypeError(shouldBeLessPrecise: true, than: d); // d is a specialized version of this. --- 138,145 ---- else if (this.isSpecializedBy(d, s, ourDomain, itsDomain)) { ! // In a compiled package, we don't need checking. ! if (! module.compiled()) ! if (! nice.tools.typing.Types.covariantSpecialization(s.getType(), this.getType())) ! this.reportReturnTypeError(shouldBeLessPrecise: true, than: d); // d is a specialized version of this. *************** *** 134,144 **** } - private boolean specializes - (VarSymbol s, - mlsub.typing.Domain ourDomain, mlsub.typing.Domain itsDomain) - = - mlsub.typing.Typing.smaller(ourDomain, itsDomain, true) - && ! nice.tools.typing.Types.typeParameterDispatch(this.getType(), s.getType()); - private boolean isSpecializedBy (MethodDeclaration d, VarSymbol s, --- 155,158 ---- *************** *** 200,205 **** } ! private void addSpecializedMethod(MethodDeclaration method) { if (specializedMethods == null) specializedMethods = new ArrayList(5); --- 214,229 ---- } ! private void addSpecializedMethod(MethodDeclaration method, boolean compileTimeOnly = false) { + if (compileTimeOnly) + { + if (specializedMethodsCompileTime == null) + specializedMethodsCompileTime = new ArrayList(5); + + notNull(specializedMethodsCompileTime).add(method); + + return; + } + if (specializedMethods == null) specializedMethods = new ArrayList(5); *************** *** 220,224 **** { s.print(keyword(0, visibility)); ! if (specializedMethods != null) s.print("override "); s.print(this.toString() + ";\n"); --- 244,253 ---- { s.print(keyword(0, visibility)); ! // In the compiled package's interface, we write 'override' even when ! // there are only compile time specializations (which would be invalid ! // in user source code). This is needed so that we know the method has ! // some type of override that we recompute at package load time, without ! // having to do it for all methods. ! if (specializedMethods != null || specializedMethodsCompileTime != null) s.print("override "); s.print(this.toString() + ";\n"); --- NEW FILE: reset.nice --- /**************************************************************************/ /* N I C E */ /* A high-level object-oriented research language */ /* (c) Daniel Bonniot 2005 */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either version 2 of the License, or */ /* (at your option) any later version. */ /* */ /**************************************************************************/ package bossa.syntax; public void reset() { methodLeqs.clear(); } Index: alternative.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/alternative.nice,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** alternative.nice 1 Apr 2005 00:09:23 -0000 1.13 --- alternative.nice 19 Aug 2005 16:04:28 -0000 1.14 *************** *** 179,182 **** --- 179,184 ---- public void resetAlternatives() { + // Temporary, reset should be called directly + reset(); alternativesMap = new HashMap(); } |
From: Daniel B. <bo...@us...> - 2005-08-19 16:04:39
|
Update of /cvsroot/nice/Nice/testsuite/compiler/methods In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27857/testsuite/compiler/methods Modified Files: overriding.testsuite Log Message: Dramatically speedup the "remove non-minimal methods" from the overloading resolution phase. Use overriding information for nice methods instead of recomputing the specialization relationship each time. For others (inlined, retyped methods), cache the results. This phase goes down from about 30% of overloading resolution to something negligible. For large enough packages, this translates to about 15% global compilation speedup. Index: overriding.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/methods/overriding.testsuite,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** overriding.testsuite 13 Mar 2005 15:27:42 -0000 1.13 --- overriding.testsuite 19 Aug 2005 16:04:27 -0000 1.14 *************** *** 251,254 **** --- 251,259 ---- override void /*/// FAIL HERE */ foo(A<String> x) {} + /// FAIL + /// Toplevel + void foo(int i) {} + override void /*/// FAIL HERE*/ foo(byte b) {} + /// PASS /// package a |
From: Daniel B. <bo...@us...> - 2005-08-19 16:04:37
|
Update of /cvsroot/nice/Nice/testsuite/compiler/overloading In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27857/testsuite/compiler/overloading Modified Files: specificity.testsuite Log Message: Dramatically speedup the "remove non-minimal methods" from the overloading resolution phase. Use overriding information for nice methods instead of recomputing the specialization relationship each time. For others (inlined, retyped methods), cache the results. This phase goes down from about 30% of overloading resolution to something negligible. For large enough packages, this translates to about 15% global compilation speedup. Index: specificity.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/overloading/specificity.testsuite,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** specificity.testsuite 12 Mar 2005 17:00:27 -0000 1.10 --- specificity.testsuite 19 Aug 2005 16:04:26 -0000 1.11 *************** *** 143,144 **** --- 143,153 ---- foo(B(I) b) {} + + /// PASS + /// package a + m(int x => false); + /// Toplevel + public <T> void m(T->boolean) {} + public <T, U> void m(T->?U converter) {} + /// package b import a + m(int x => false); |
From: Daniel B. <bo...@us...> - 2005-08-19 14:52:39
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11568/stdlib/nice/lang Modified Files: java.nice Log Message: Fixed wrong method name in retyping Index: java.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/java.nice,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** java.nice 27 May 2005 14:06:51 -0000 1.63 --- java.nice 19 Aug 2005 14:52:31 -0000 1.64 *************** *** 321,325 **** native Object Collections.max(Collection, Comparator); <T> T min(Collection<T>, Comparator<T>) = ! native Object Collections.max(Collection, Comparator); <T> void sort(List<T>, Comparator<T>) = native void Collections.sort(List, Comparator); --- 321,325 ---- native Object Collections.max(Collection, Comparator); <T> T min(Collection<T>, Comparator<T>) = ! native Object Collections.min(Collection, Comparator); <T> void sort(List<T>, Comparator<T>) = native void Collections.sort(List, Comparator); |
From: Daniel B. <bo...@us...> - 2005-08-15 12:01:56
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7649/src/bossa/syntax Modified Files: tools.nice Log Message: Removed duplicate retyping. Index: tools.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/tools.nice,v retrieving revision 1.113 retrieving revision 1.114 diff -C2 -d -r1.113 -r1.114 *** tools.nice 5 Apr 2005 12:50:02 -0000 1.113 --- tools.nice 15 Aug 2005 12:01:47 -0000 1.114 *************** *** 225,229 **** mlsub.typing.Monotype intType() = native nice.tools.typing.PrimitiveType.intType; mlsub.typing.Monotype longType() = native nice.tools.typing.PrimitiveType.longType; - gnu.bytecode.ClassType Type_pointer_type() = native gnu.bytecode.Type.pointer_type; mlsub.typing.TypeConstructor longTC() = native nice.tools.typing.PrimitiveType.longTC; mlsub.typing.TypeConstructor intTC() = native nice.tools.typing.PrimitiveType.intTC; --- 225,228 ---- |
From: Daniel B. <bo...@us...> - 2005-07-05 18:33:02
|
Update of /cvsroot/nice/Nice/src/mlsub/typing/lowlevel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8749/src/mlsub/typing/lowlevel Modified Files: K0.java Log Message: Only perform abstract interface computations when at least one soft node implements at least one abstract interface. Speeds up typechecking by another ~ 10%. Index: K0.java =================================================================== RCS file: /cvsroot/nice/Nice/src/mlsub/typing/lowlevel/K0.java,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** K0.java 5 Jul 2005 16:04:46 -0000 1.31 --- K0.java 5 Jul 2005 18:32:53 -0000 1.32 *************** *** 594,597 **** --- 594,598 ---- **/ public void indexImplements(int x, int iid) throws Unsatisfiable { + usingInterfaces = true; S.assume(S.a&& hasBeenInitialized); if (LowlevelUnsatisfiable.refinedReports) { *************** *** 1158,1168 **** } private void prepareConstraint() throws Unsatisfiable { collapseMinimal(); ! BitMatrix leq = new BitMatrix(C); ! leq.closure(); ! computeArrows(leq); ! saturateAbs(leq); ! //condense(leq); } --- 1159,1174 ---- } + private boolean usingInterfaces = false; + private void prepareConstraint() throws Unsatisfiable { collapseMinimal(); ! if (usingInterfaces) { ! BitMatrix leq = new BitMatrix(C); ! leq.closure(); ! computeArrows(leq); ! saturateAbs(leq); ! //condense(leq); ! usingInterfaces = false; ! } } |
From: Daniel B. <bo...@us...> - 2005-07-05 16:04:58
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31186 Modified Files: NEWS Log Message: Only create commonly used exception objects in debug mode, to speed up typechecking (~ 10%). Index: NEWS =================================================================== RCS file: /cvsroot/nice/Nice/NEWS,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** NEWS 18 Jun 2005 13:26:56 -0000 1.81 --- NEWS 5 Jul 2005 16:04:47 -0000 1.82 *************** *** 5,8 **** --- 5,10 ---- import static java.lang.Math.PI; + * Improved compilation speed. + -- |
From: Daniel B. <bo...@us...> - 2005-07-05 16:04:58
|
Update of /cvsroot/nice/Nice/src/mlsub/typing/lowlevel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31186/src/mlsub/typing/lowlevel Modified Files: K0.java Engine.java Log Message: Only create commonly used exception objects in debug mode, to speed up typechecking (~ 10%). Index: K0.java =================================================================== RCS file: /cvsroot/nice/Nice/src/mlsub/typing/lowlevel/K0.java,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** K0.java 1 Apr 2005 12:12:04 -0000 1.30 --- K0.java 5 Jul 2005 16:04:46 -0000 1.31 *************** *** 679,683 **** if (isRigid(x1) && isRigid(x2)) { if (!R.get(x1, x2)) { ! throw new LowlevelRigidClash(indexToString(x1), indexToString(x2)); } else { return; --- 679,686 ---- if (isRigid(x1) && isRigid(x2)) { if (!R.get(x1, x2)) { ! if (debugK0) ! throw new LowlevelRigidClash(indexToString(x1), indexToString(x2)); ! else ! throw LowlevelUnsatisfiable.instance; } else { return; Index: Engine.java =================================================================== RCS file: /cvsroot/nice/Nice/src/mlsub/typing/lowlevel/Engine.java,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** Engine.java 21 Jun 2005 18:30:59 -0000 1.39 --- Engine.java 5 Jul 2005 16:04:47 -0000 1.40 *************** *** 282,290 **** if(dbg) ! Debug.println("Bad kinding discovered by Engine : "+ ! k1+" != "+k2+ ! "\nfor elements "+e1+" and "+e2); ! throw new LowlevelUnsatisfiable("Bad Kinding for "+ ! e1+ " and "+e2); } } --- 282,294 ---- if(dbg) ! { ! Debug.println("Bad kinding discovered by Engine : "+ ! k1+" != "+k2+ ! "\nfor elements "+e1+" and "+e2); ! throw new LowlevelUnsatisfiable("Bad Kinding for "+ ! e1+ " and "+e2); ! } ! else ! throw LowlevelUnsatisfiable.instance; } } |
From: Daniel B. <bo...@us...> - 2005-06-28 07:58:45
|
Update of /cvsroot/nice/Nice/src/nice/tools/ant In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1292/src/nice/tools/ant Modified Files: NiceUnit.java Log Message: Add null parameter for classloader, to adapt to artem's last change. Index: NiceUnit.java =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/ant/NiceUnit.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NiceUnit.java 20 Mar 2004 15:49:24 -0000 1.2 --- NiceUnit.java 28 Jun 2005 07:58:36 -0000 1.3 *************** *** 130,134 **** (nestedClasspath != null ? File.pathSeparator+nestedClasspath : ""); ! if (! nice.tools.unit.fun.runTests(pack, listener, classpath)) throw new BuildException("Package " + pack + " was not found"); --- 130,134 ---- (nestedClasspath != null ? File.pathSeparator+nestedClasspath : ""); ! if (! nice.tools.unit.fun.runTests(pack, listener, classpath, null)) throw new BuildException("Package " + pack + " was not found"); |
From: Artem Gr K. <ar...@us...> - 2005-06-23 08:28:09
|
Update of /cvsroot/nice/Nice/src/nice/tools/unit/console In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11627/src/nice/tools/unit/console Modified Files: main.nice Log Message: An option to invoke System.exit when finished. Index: main.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/unit/console/main.nice,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** main.nice 18 Apr 2005 18:03:25 -0000 1.7 --- main.nice 23 Jun 2005 08:27:59 -0000 1.8 *************** *** 17,20 **** --- 17,21 ---- ?String classpath = null; ?String jar = null; + boolean systemExit = false; prg.options = *************** *** 31,35 **** option("man", "Print man page to stdout", visible: false, ! () => man(prg)) ]; --- 32,39 ---- option("man", "Print man page to stdout", visible: false, ! () => man(prg)), ! ! option("exit", "Invoke System.exit when finished\nExit code will be the number of tests failed", ! () => { systemExit = true; }) ]; *************** *** 56,59 **** --- 60,64 ---- println(""listener.nFailures"/"listener.nTests" tests failed"); + if (systemExit) System.exit(listener.nFailures); } |
From: Artem Gr K. <ar...@us...> - 2005-06-23 08:27:02
|
Update of /cvsroot/nice/Nice/src/nice/tools/unit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11085/src/nice/tools/unit Modified Files: api.nice Log Message: Custom classloader. Index: api.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/unit/api.nice,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** api.nice 24 Feb 2005 16:38:23 -0000 1.4 --- api.nice 23 Jun 2005 08:26:53 -0000 1.5 *************** *** 6,12 **** public boolean runTests(String packageName, TestListener listener, ! ?String classpath = null) { ! let classloader = classpath == null ? ClassLoader.getSystemClassLoader() : classloaderFromClasspath(notNull(classpath)); --- 6,16 ---- public boolean runTests(String packageName, TestListener listener, ! ?String classpath = null, ?ClassLoader classloader = null) { ! // A custom classloader might be required, in particular, when testing ! // multiple packages, to keep opened databases from loosing. ! // Using separate classloaders will left databases open, locked, ! // but not accessible from subsequent classloaders. ! if( classloader == null ) classloader = classpath == null ? ClassLoader.getSystemClassLoader() : classloaderFromClasspath(notNull(classpath)); |