nice-commit Mailing List for The Nice Programming Language (Page 19)
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: Arjan B. <ar...@us...> - 2005-03-01 18:56:33
|
Update of /cvsroot/nice/Nice/testsuite/compiler/overloading In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17429/F:/nice/testsuite/compiler/overloading Modified Files: specificity.testsuite Log Message: Removed deprecated pattern syntax from testsuite. Index: specificity.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/overloading/specificity.testsuite,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** specificity.testsuite 11 Oct 2004 15:21:33 -0000 1.8 --- specificity.testsuite 1 Mar 2005 18:56:22 -0000 1.9 *************** *** 51,55 **** void foo(A); void foo(B); ! foo(@B) {} /// PASS --- 51,55 ---- void foo(A); void foo(B); ! foo(B x) {} /// PASS *************** *** 59,64 **** void foo(A, String); void foo(B ,Number); ! foo(@B(A) ,s) {} ! foo(@B(B) ,s) {} /// PASS --- 59,64 ---- void foo(A, String); void foo(B ,Number); ! foo(B(A) x ,s) {} ! foo(B(B) x ,s) {} /// PASS *************** *** 70,74 **** void foo(B, A); void foo(B, B); ! foo(@B,@B) {} /// FAIL --- 70,74 ---- void foo(B, A); void foo(B, B); ! foo(B x, B y) {} /// FAIL *************** *** 78,83 **** void foo(A); void foo(A); ! foo(@B(A)) {} ! foo(@B(B)) {} /// PASS --- 78,83 ---- void foo(A); void foo(A); ! foo(B(A) x) {} ! foo(B(B) x) {} /// PASS *************** *** 88,94 **** void foo(B ,Number); void foo(B ,Integer); ! foo(@B, s@String) {} ! foo(@B, s@Number) {} ! foo(@B, s@Integer) {} /// PASS --- 88,94 ---- void foo(B ,Number); void foo(B ,Integer); ! foo(B x, String s) {} ! foo(B x, Number s) {} ! foo(B x, Integer s) {} /// PASS *************** *** 98,103 **** void foo(A, B); void foo(B ,A); ! foo(@B(A) ,x) {} ! foo(@B(B) ,x) {} /// PASS --- 98,103 ---- void foo(A, B); void foo(B ,A); ! foo(B(A) a ,x) {} ! foo(B(B) a ,x) {} /// PASS |
From: Daniel B. <bo...@us...> - 2005-03-01 17:40:41
|
Update of /cvsroot/nice/Nice/testsuite/compiler/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28532/testsuite/compiler/classes Modified Files: fields.testsuite Log Message: More testcases for clashes between methods and automatic getters and setters. Index: fields.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/classes/fields.testsuite,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** fields.testsuite 15 Jan 2005 21:05:55 -0000 1.19 --- fields.testsuite 1 Mar 2005 17:40:31 -0000 1.20 *************** *** 195,196 **** --- 195,260 ---- String foo = ""; } + + /// PASS + let m = new B("file", name: 0); + /// Toplevel + class A extends java.io.File + { + } + class B extends A + { + int name; + + getName() = ""; + } + + String foo(B m) = m.getName(); + + /// PASS + /// package a + let f = new FunctionClass(x: 0); + /// Toplevel + class FunctionClass + { + int x; + void setX(int value) { this.x = 2*value; } + } + /// package b import a + let f = new FunctionClass(x: 0); + f.setX(2); + assert f.x == 4; + + /// PASS + assert foo().equals("bar") : foo(); + /// Toplevel + class MyFile extends java.io.File + { + int name; + } + + String foo() + { + java.io.File f = new MyFile("foo", name: 0); + String s = f.getName(); + return s; + } + getName(MyFile this) = "bar"; + + /// PASS + /// package a + /// Toplevel + class MyFile extends java.io.File + { + int name; + } + + String foo() + { + java.io.File f = new MyFile("foo", name: 0); + String s = f.getName(); + return s; + } + getName(MyFile this) = "bar"; + /// package b import a + assert foo().equals("bar") : foo(); + /// Toplevel |
From: Daniel B. <bo...@us...> - 2005-03-01 17:37:31
|
Update of /cvsroot/nice/Nice/testsuite/compiler/native In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27179/testsuite/compiler/native Modified Files: constructors.testsuite Log Message: Make sure that constructors with defaults omitted are compiled first so they get unmangled names, in case they clash with ones with all values. Cleaned up DefaultConstructor by creating a class CompiledConstructor to handle the details of bytecode generation. Index: constructors.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/native/constructors.testsuite,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** constructors.testsuite 26 Dec 2004 06:21:16 -0000 1.4 --- constructors.testsuite 1 Mar 2005 17:36:33 -0000 1.5 *************** *** 30,34 **** /// PASS /// package pkg ! /* java.lang.Thread has many constructors, including one () and one (Runnable). There is therefore ambiguity in A(Runnable x) between --- 30,34 ---- /// PASS /// package pkg ! /* java.lang.Thread has many constructors, including one () and one (Runnable). There is therefore ambiguity in A(Runnable x) between *************** *** 37,42 **** super.(x) + this.dummy = null In this case the second interpretation must be taken. */ ! Class c = Class.forName("pkg.A"); Constructor make = c.getConstructor([Runnable.class]); --- 37,45 ---- super.(x) + this.dummy = null In this case the second interpretation must be taken. + The rationale is that you should be able to use the inherited constructor + as usual. You can always use the full constructor to specify all values. + Most important is, this is better specified than random. */ ! Class c = Class.forName("pkg.A"); Constructor make = c.getConstructor([Runnable.class]); *************** *** 49,53 **** try { instance.join(); } catch(InterruptedException ex) {} ! assert ran; --- 52,56 ---- try { instance.join(); } catch(InterruptedException ex) {} ! assert ran; *************** *** 58,61 **** --- 61,80 ---- /// PASS + // Simpler testcase than the one using Thread. + /// package pkg + Class c = Class.forName("pkg.A"); + Constructor make = c.getConstructor([Collection.class]); + + Collection<Object> col = new ArrayList(); + + A<Object> instance = cast(make.newInstance([col])); + assert instance.dummy == null; + + /// Toplevel + import java.lang.reflect.*; + + class A<T> extends LinkedList<T> { ?Collection<T> dummy = null; } + + /// PASS // bug #1090888 HashMap<String,String> m = new HashMap(); |
From: Daniel B. <bo...@us...> - 2005-03-01 17:37:03
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27179/src/bossa/syntax Modified Files: niceclass.nice enum.nice defaultconstructor.nice Log Message: Make sure that constructors with defaults omitted are compiled first so they get unmangled names, in case they clash with ones with all values. Cleaned up DefaultConstructor by creating a class CompiledConstructor to handle the details of bytecode generation. Index: defaultconstructor.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/defaultconstructor.nice,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** defaultconstructor.nice 13 Jan 2005 14:06:15 -0000 1.5 --- defaultconstructor.nice 1 Mar 2005 17:36:36 -0000 1.6 *************** *** 30,46 **** ?MethodDeclaration parent; ! /** Call the constructor, with all the arguments. */ ! private ?gnu.expr.Expression initialize = null; ! /** Call the constructor, with all the arguments, with an implicit this argument. */ ! private ?gnu.expr.Expression initializeFromConstructor = null; ! /** Call the constructor, with only non-default arguments. */ ! private ?gnu.expr.Expression initializeOmitDefaults = null; ! /** Instantiate the class, calling the constructor with all the arguments. */ ! private ?gnu.expr.Expression instantiate = null; getInitializationCode(implicitThis) { this.getCode(); ! return notNull(initializeFromConstructor); } --- 30,40 ---- ?MethodDeclaration parent; ! private CompiledConstructor compiledFull = cast(null); ! private ?CompiledConstructor compiledMini = null; getInitializationCode(implicitThis) { this.getCode(); ! return notNull(compiledFull.initialization); } *************** *** 49,124 **** this.getCode(); return ! // lambdaOmitDefaults is null if the two versions are identical ! omitDefaults && initializeOmitDefaults != null ! ? notNull(initializeOmitDefaults) : notNull(initialize); } ! computeCode() { ! if (classe.getDefinition().inInterfaceFile()) ! throw new Error("Constructors are loaded from the compiled package"); ! this.createBytecode(true); ! this.createBytecode(false); ! return notNull(instantiate); } ! /** ! @param omitDefaults if true, do not take the value of fields with ! default values as parameters, but use that default instead. ! */ ! private void createBytecode(boolean omitDefaults) { ! gnu.bytecode.ClassType thisType = cast(this.javaReturnType()); ! let thisDecl = new gnu.expr.Declaration("this"); ! thisDecl.setType(thisType); ! let thisExp = new gnu.expr.ThisExp(thisDecl); ! ! let fullArgs = notNull(parameters).getMonoSymbols(); ! let fullArgTypes = this.javaArgTypes(); ! ! List<MonoSymbol> args = new LinkedList(); ! List<gnu.bytecode.Type> argTypes = new LinkedList(); ! ! for (int i = 0; i < notNull(parameters).size; i++) ! { ! if (omitDefaults && notNull(parameters).hasDefaultValue(i)) ! continue; ! ! args.add(fullArgs[i]); ! argTypes.add(fullArgTypes[i]); ! } ! ! // Do not create a second constructor omiting defaults if there is ! // no default to omit! ! if (omitDefaults && args.size() == fullArgs.length) ! return; ! let argTypesArray = argTypes.toArray(); ! let argsArray = args.toArray(); ! let lambda = generateConstructor ! (thisDecl, argTypesArray, argsArray); ! lambda.setSuperCall(this.callSuper(thisExp, fullArgs, omitDefaults)); ! nice.tools.code.Gen.setMethodBody(lambda, this.body(thisExp, fullArgs, omitDefaults)); ! classe.getClassExp().addMethod(lambda); ! if (! omitDefaults) ! { ! initialize = new gnu.expr.QuoteExp(new gnu.expr.InitializeProc(lambda)); ! initializeFromConstructor = new gnu.expr.QuoteExp(new gnu.expr.InitializeProc(lambda, true)); ! instantiate = new gnu.expr.QuoteExp(new gnu.expr.InstantiateProc(lambda)); ! // Add attributes useful for the nice compiler. These are not needed ! // for the version omitting defaults, since that one is only there for ! // Java users' sake. ! lambda.addBytecodeAttribute(notNull(parameters).asBytecodeAttribute()); ! lambda.addBytecodeAttribute(new gnu.bytecode.MiscAttr("default")); ! } ! else ! { ! initializeOmitDefaults = new gnu.expr.QuoteExp(new gnu.expr.InitializeProc(lambda)); ! } } --- 43,86 ---- this.getCode(); return ! // compiledMini is null if the two versions are identical ! omitDefaults && compiledMini != null ! ? notNull(compiledMini).invoke : compiledFull.invoke; } ! void createFirstPass() { ! // We want to create bytecode methods in two passes to guarantee a ! // consistent behaviour in case versions with and without defaults omitted ! // clash. ! // Create the full version first. At the moment class methods are created ! // in reverse order, so they don't get the priority for unmangled names. ! compiledFull = new CompiledConstructor(constructor: this); ! compiledFull.createMethod(false); } ! computeCode() { ! if (classe.getDefinition().inInterfaceFile()) ! throw new Error("Constructors are loaded from the compiled package"); ! compiledMini = new CompiledConstructor(constructor: this).createMethod(true); ! // Add attributes useful for the nice compiler. These are not needed ! // for the version omitting defaults, since that one is only there for ! // Java users' sake. ! compiledFull.lambda.addBytecodeAttribute(notNull(parameters).asBytecodeAttribute()); ! compiledFull.lambda.addBytecodeAttribute(new gnu.bytecode.MiscAttr("default")); ! return notNull(compiledFull.instantiate); ! } ! compile() ! { ! this.getCode(); ! if (compiledMini != null) ! notNull(compiledMini).compileBody(true); ! compiledFull.compileBody(false); } *************** *** 180,181 **** --- 142,226 ---- (new gnu.expr.InitializeProc( notNull(gnu.bytecode.Type.pointer_type).getDeclaredMethod("<init>", 0))); + + /** + A wrapper for a bytecode version of this constructor. + + One instance of this class is used to hold the version with all parameters, + another one holds the version where fields with default values are omitted. + */ + private class CompiledConstructor + { + DefaultConstructor constructor; + + /** Call the constructor. */ + private gnu.expr.Expression invoke = cast(null); + + /** Call the constructor with an implicit this argument. */ + private ?gnu.expr.Expression initialization = null; + + /** Instantiate the class then call the constructor. */ + private ?gnu.expr.Expression instantiate = null; + + // Things that need to be remembered from the method constructor + // to the compilation of the body. + + gnu.expr.ConstructorExp lambda = cast(null); + + private MonoSymbol[] fullArgs = cast(null); + + /** + @param omitDefaults if true, do not take the value of fields with + default values as parameters, but use that default instead. + */ + private ?CompiledConstructor createMethod(boolean omitDefaults) + { + gnu.bytecode.ClassType thisType = cast(constructor.javaReturnType()); + let thisDecl = new gnu.expr.Declaration("this"); + thisDecl.setType(thisType); + + let parameters = constructor.parameters; + + fullArgs = notNull(parameters).getMonoSymbols(); + let fullArgTypes = constructor.javaArgTypes(); + + List<MonoSymbol> args = new LinkedList(); + List<gnu.bytecode.Type> argTypes = new LinkedList(); + + for (int i = 0; i < notNull(parameters).size; i++) + { + if (omitDefaults && notNull(parameters).hasDefaultValue(i)) + continue; + + args.add(fullArgs[i]); + argTypes.add(fullArgTypes[i]); + } + + // Do not create a second constructor omiting defaults if there is + // no default to omit! + if (omitDefaults && args.size() == fullArgs.length) + return null; + + lambda = generateConstructor(thisDecl, argTypes.toArray(), args.toArray()); + constructor.classe.getClassExp().addMethod(lambda); + + invoke = new gnu.expr.QuoteExp(new gnu.expr.InitializeProc(lambda)); + + if (! omitDefaults) + { + initialization = new gnu.expr.QuoteExp(new gnu.expr.InitializeProc(lambda, true)); + instantiate = new gnu.expr.QuoteExp(new gnu.expr.InstantiateProc(lambda)); + } + + return this; + } + + private void compileBody(boolean omitDefaults) + { + let thisExp = new gnu.expr.ThisExp(lambda.getThisDecl()); + + lambda.setSuperCall(constructor.callSuper(thisExp, fullArgs, omitDefaults)); + + nice.tools.code.Gen.setMethodBody + (lambda, constructor.body(thisExp, fullArgs, omitDefaults)); + } + } Index: niceclass.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/niceclass.nice,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** niceclass.nice 28 Feb 2005 14:00:58 -0000 1.23 --- niceclass.nice 1 Mar 2005 17:36:36 -0000 1.24 *************** *** 47,51 **** /** List of symbols for calling constructors of this class. */ private List<MethodSymbol> constructors = new ArrayList(); ! private Constructor[?] constructorMethod = null; // Used to resolve fields, and constructor constraint. --- 47,51 ---- /** List of symbols for calling constructors of this class. */ private List<MethodSymbol> constructors = new ArrayList(); ! private DefaultConstructor[?] constructorMethod = null; // Used to resolve fields, and constructor constraint. *************** *** 559,563 **** cst = mlsub.typing.Constraint.True; ! constructorMethod = cast(new Constructor[allConstructorParams.size()]); for (int i = 0; i < allConstructorParams.size(); i++) { --- 559,563 ---- cst = mlsub.typing.Constraint.True; ! constructorMethod = cast(new DefaultConstructor[allConstructorParams.size()]); for (int i = 0; i < allConstructorParams.size(); i++) { *************** *** 597,600 **** --- 597,608 ---- for (field : fields) field.createField(); + + // Creating constructor methods needs to be done even if we don't recompile + // since classes are always regenerated. + // We want to do it in two passes to guarantee a consistent behaviour + // in case versions with and without defaults omitted clash. + if (constructorMethod != null) + for (cm : notNull(constructorMethod)) + cm.createFirstPass(); } *************** *** 614,618 **** if (constructorMethod != null) for (cm : notNull(constructorMethod)) ! cm.getCode(); // Take into account external interface implementations, which --- 622,626 ---- if (constructorMethod != null) for (cm : notNull(constructorMethod)) ! cm.compile(); // Take into account external interface implementations, which Index: enum.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/enum.nice,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** enum.nice 16 Jan 2005 21:51:15 -0000 1.17 --- enum.nice 1 Mar 2005 17:36:36 -0000 1.18 *************** *** 55,58 **** --- 55,60 ---- for (symbol : symbols) symbol.compileValue(); + + classDef.compile(); } |
From: Daniel B. <bo...@us...> - 2005-03-01 17:37:03
|
Update of /cvsroot/nice/Nice/src/gnu/expr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27179/src/gnu/expr Modified Files: ConstructorExp.java Log Message: Make sure that constructors with defaults omitted are compiled first so they get unmangled names, in case they clash with ones with all values. Cleaned up DefaultConstructor by creating a class CompiledConstructor to handle the details of bytecode generation. Index: ConstructorExp.java =================================================================== RCS file: /cvsroot/nice/Nice/src/gnu/expr/ConstructorExp.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ConstructorExp.java 9 Oct 2004 10:25:48 -0000 1.9 --- ConstructorExp.java 1 Mar 2005 17:36:35 -0000 1.10 *************** *** 45,48 **** --- 45,50 ---- private Expression superCall; + public Declaration getThisDecl() { return thisDecl; } + ClassType getClassType() { return classType; } |
From: Daniel B. <bo...@us...> - 2005-03-01 17:37:02
|
Update of /cvsroot/nice/Nice/testsuite/compiler/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27179/testsuite/compiler/classes Modified Files: typeParameters.testsuite Log Message: Make sure that constructors with defaults omitted are compiled first so they get unmangled names, in case they clash with ones with all values. Cleaned up DefaultConstructor by creating a class CompiledConstructor to handle the details of bytecode generation. Index: typeParameters.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/classes/typeParameters.testsuite,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** typeParameters.testsuite 12 Aug 2004 23:21:41 -0000 1.19 --- typeParameters.testsuite 1 Mar 2005 17:36:35 -0000 1.20 *************** *** 238,241 **** --- 238,242 ---- /// PASS + Foo<int> foo = new Foo(); /// Toplevel interface A<T> {} |
From: Daniel B. <bo...@us...> - 2005-03-01 12:27:21
|
Update of /cvsroot/nice/Nice/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2223/web Modified Files: new.xsl Log Message: Added link to feature requests. Index: new.xsl =================================================================== RCS file: /cvsroot/nice/Nice/web/new.xsl,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** new.xsl 20 Oct 2004 10:52:12 -0000 1.18 --- new.xsl 1 Mar 2005 12:27:03 -0000 1.19 *************** *** 163,166 **** --- 163,170 ---- <span class="small">o</span><xsl:text> </xsl:text> <a class="nav" href="http://sourceforge.net/tracker/?func=add&group_id=12788&atid=112788">Report a bug</a> + + <br /> + <span class="small">o</span><xsl:text> </xsl:text> + <a class="nav" href="http://sourceforge.net/tracker/?group_id=12788&atid=362788">Feature requests</a> <br /> </td> |
From: Daniel B. <bo...@us...> - 2005-02-28 14:10:58
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18203/src/bossa/syntax Modified Files: dispatchTest.nice Log Message: Make use of the new getClassType(NiceClass) method. Index: dispatchTest.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/dispatchTest.nice,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** dispatchTest.nice 14 Jan 2005 22:47:11 -0000 1.7 --- dispatchTest.nice 28 Feb 2005 14:10:44 -0000 1.8 *************** *** 244,248 **** let NiceClass nc = cast(def.getImplementation()); ! return nc.getClassExp().getClassType(); } --- 244,248 ---- let NiceClass nc = cast(def.getImplementation()); ! return nc.getClassType(); } |
From: Daniel B. <bo...@us...> - 2005-02-28 14:01:37
|
Update of /cvsroot/nice/Nice/testsuite/compiler/methods In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15108/testsuite/compiler/methods Modified Files: compilation.testsuite Log Message: Find compiled version of dispatch methods even when they are members of Nice classes (and not static members of the dispatch class). Index: compilation.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/methods/compilation.testsuite,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** compilation.testsuite 20 Mar 2004 15:49:23 -0000 1.1 --- compilation.testsuite 28 Feb 2005 14:00:56 -0000 1.2 *************** *** 9,10 **** --- 9,36 ---- String foo() = "ABC"; } + + /// PASS + // Check that polymorphic methods compiled inside classes get the right + // bytecode type. + /// package a + /// Toplevel + class A { + <A T> T foo(T x) = x; + } + /// package b import a + let B b = new B(); + let A a = new A(); + + // invoke foo reflexively. + // the method should be A.foo(A); + let methodFoo = A.class.getMethod("foo", [A.class]); + methodFoo.invoke(a, [b]); + + assert b.ran; + + /// Toplevel + final class B extends A { + boolean ran = false; + } + + foo(A a, B b) { b.ran = true; return b; } |
From: Daniel B. <bo...@us...> - 2005-02-28 14:01:18
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15108/src/bossa/syntax Modified Files: niceclass.nice niceMethod.nice Module.java Log Message: Find compiled version of dispatch methods even when they are members of Nice classes (and not static members of the dispatch class). Index: niceMethod.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/niceMethod.nice,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** niceMethod.nice 16 Jan 2005 00:28:21 -0000 1.18 --- niceMethod.nice 28 Feb 2005 14:01:07 -0000 1.19 *************** *** 326,329 **** --- 326,347 ---- gnu.bytecode.Type retType; + // Try to compile the dispatch method as a member method if possible. + ?NiceClass receiver; + if (def.getArity() == 0) + receiver = null; + else + { + receiver = getNiceClass(def.getArgTypes()[0]); + + // JVM interfaces cannot contain code. + if (receiver != null && receiver.isInterface()) + receiver = null; + + // Special treatment for serialization at the moment. + if (def.getArity() == 2 && + (name.equals("writeObject")||name.equals("readObject"))) + receiver = null; + } + /* If this package is not recompiled, *************** *** 335,339 **** as the precise types are found during typechecking. */ ! ?gnu.bytecode.Method meth = module.lookupDispatchClassMethod(name, "id", def.getFullName()); if (meth != null) // Reuse existing dispatch method header { --- 353,359 ---- as the precise types are found during typechecking. */ ! ?gnu.bytecode.Method meth = module.lookupDispatchClassMethod ! (receiver == null ? null : receiver.getClassType(), ! name, "id", def.getFullName()); if (meth != null) // Reuse existing dispatch method header { *************** *** 342,346 **** --- 362,371 ---- argTypes = notNull(meth.arg_types); + + if (receiver != null) + argTypes = [receiver.getClassType()] + argTypes; + retType = notNull(meth.return_type); + // Make sure we use the same bytecode name, since compiled code // can rely on it. *************** *** 353,374 **** } - // Try to compile the dispatch method as a member method if possible. - ?NiceClass receiver; - if (argTypes.length == 0) - receiver = null; - else - { - receiver = getNiceClass(def.getArgTypes()[0]); - - // JVM interfaces cannot contain code. - if (receiver != null && receiver.isInterface()) - receiver = null; - - // Special treatment for serialization at the moment. - if (def.getArity() == 2 && - (name.equals("writeObject")||name.equals("readObject"))) - receiver = null; - } - res = generateMethod (name, argTypes, retType, def.getSymbols(), toplevel: true, member: receiver != null); --- 378,381 ---- Index: niceclass.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/niceclass.nice,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** niceclass.nice 16 Jan 2005 00:28:21 -0000 1.22 --- niceclass.nice 28 Feb 2005 14:00:58 -0000 1.23 *************** *** 388,391 **** --- 388,393 ---- public gnu.expr.ClassExp getClassExp() = classe; + public gnu.bytecode.ClassType getClassType() = classe.getClassType(); + /** Collect in 'constraints' the constraints set by each class Index: Module.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Module.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Module.java 14 Jan 2005 11:12:10 -0000 1.23 --- Module.java 28 Feb 2005 14:01:07 -0000 1.24 *************** *** 32,36 **** gnu.bytecode.ClassType createClass(String name); void addGlobalVar(gnu.expr.Declaration declaration, boolean constant); ! gnu.bytecode.Method lookupDispatchClassMethod(String name, String attribute, String value); gnu.expr.ReferenceExp addMethod(gnu.expr.LambdaExp method, boolean packageMethod); --- 32,36 ---- gnu.bytecode.ClassType createClass(String name); void addGlobalVar(gnu.expr.Declaration declaration, boolean constant); ! gnu.bytecode.Method lookupDispatchClassMethod(gnu.bytecode.ClassType clas, String name, String attribute, String value); gnu.expr.ReferenceExp addMethod(gnu.expr.LambdaExp method, boolean packageMethod); |
From: Daniel B. <bo...@us...> - 2005-02-28 14:01:18
|
Update of /cvsroot/nice/Nice/src/bossa/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15108/src/bossa/modules Modified Files: Package.java Log Message: Find compiled version of dispatch methods even when they are members of Nice classes (and not static members of the dispatch class). Index: Package.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/modules/Package.java,v retrieving revision 1.136 retrieving revision 1.137 diff -C2 -d -r1.136 -r1.137 *** Package.java 20 Feb 2005 21:20:02 -0000 1.136 --- Package.java 28 Feb 2005 14:01:07 -0000 1.137 *************** *** 741,747 **** } ! public Method lookupDispatchClassMethod(String name, String attribute, String value) { ! return lookupClassMethod(source.getDispatch(), name, attribute, value); } --- 741,750 ---- } ! public Method lookupDispatchClassMethod ! (ClassType clas, String name, String attribute, String value) { ! if (clas == null) ! clas = source.getDispatch(); ! return lookupClassMethod(clas, name, attribute, value); } |
From: Artem Gr K. <ar...@us...> - 2005-02-28 06:29:15
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20203 Modified Files: build.xml Log Message: Bootstrapping no longer requires 'nice.jar' to be present in the Ant classpath. Index: build.xml =================================================================== RCS file: /cvsroot/nice/Nice/build.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** build.xml 27 Feb 2005 19:22:52 -0000 1.1 --- build.xml 28 Feb 2005 06:29:06 -0000 1.2 *************** *** 3,7 **** <project name="Nice" default="check"> <!-- For Nice arguments see "http://nice.sourceforge.net/cgi-bin/twiki/view/Doc/NicecAntTaskdef". --> - <taskdef name="nicec" classname="nice.tools.ant.Nicec" /> <property environment="env" /> <property name="compiler" value="modern" description="example: ant -Dcompiler=gcj" /> --- 3,6 ---- *************** *** 46,70 **** <macrodef name="mac-nicec-old"> <attribute name="package" /> <attribute name="sourcepath" default="src" /> <sequential> ! <nicec package="@{package}" ! sourcepath="@{sourcepath}" ! destination="${build}" ! runtime="${NICE_JAR}" ! recompile_all="yes" ! /> </sequential> </macrodef> <macrodef name="mac-nicec-new"> <attribute name="package" /> <attribute name="args" default="" /> <sequential> <java failonerror="yes" fork="yes" ! classpath="${NICE_JAR}" classname="nice.tools.compiler.console.dispatch" > <arg value="--sourcepath" /> ! <arg value="src${path.separator}stdlib" /> <arg value="--destination" /> <arg value="${build}" /> --- 45,79 ---- <macrodef name="mac-nicec-old"> <attribute name="package" /> + <attribute name="runtime" default="${NICE_JAR}" /> + <attribute name="args" default="--recompile-all" /> <attribute name="sourcepath" default="src" /> <sequential> ! <java failonerror="yes" ! fork="yes" ! classpath="@{runtime}" ! classname="nice.tools.compiler.console.dispatch" ! > ! <arg value="--sourcepath" /> ! <arg value="@{sourcepath}" /> ! <arg value="--destination" /> ! <arg value="${build}" /> ! <arg line="@{args}" /> ! <arg value="@{package}" /> ! </java> </sequential> </macrodef> <macrodef name="mac-nicec-new"> <attribute name="package" /> + <attribute name="runtime" default="${build}/console.jar${path.separator}${build}" /> <attribute name="args" default="" /> + <attribute name="sourcepath" default="src${path.separator}stdlib" /> <sequential> <java failonerror="yes" fork="yes" ! classpath="@{runtime}" classname="nice.tools.compiler.console.dispatch" > <arg value="--sourcepath" /> ! <arg value="@{sourcepath}" /> <arg value="--destination" /> <arg value="${build}" /> *************** *** 133,137 **** </exec> </target> ! <target name="javacc" depends="javacc-download"> <unzip src="${javaccZip}" dest="${build}"> <patternset> --- 142,147 ---- </exec> </target> ! <available file="${build}/javacc.jar" property="haveJavaccJar" /> ! <target name="javacc" depends="javacc-download" unless="haveJavaccJar"> <unzip src="${javaccZip}" dest="${build}"> <patternset> *************** *** 142,146 **** <delete dir="${build}/${javaccVersion}" /> </target> ! <target name="parser"> <java fork="yes" dir="src/bossa/parser" classname="javacc"> <classpath> --- 152,156 ---- <delete dir="${build}/${javaccVersion}" /> </target> ! <target name="parser" depends="javacc"> <java fork="yes" dir="src/bossa/parser" classname="javacc"> <classpath> *************** *** 151,156 **** </java> </target> ! <target name="recompile"> ! <mac-javac-multi> <include> <include name="bossa/**/*.java" /> --- 161,166 ---- </java> </target> ! <target name="recompile" depends="initialize"> ! <mac-javac-multi classpath="${NICE_JAR}"> <include> <include name="bossa/**/*.java" /> *************** *** 183,192 **** </manifest> </target> ! <target name="compiler" depends="setDate"> ! <!-- <mac-nicec-new package="nice.lang" /> --> <mac-nicec-new package="bossa.syntax" args="--recompile-all" /> <mac-nicec-new package="nice.tools.compiler.console" args="--recompile-all --jar ${build}/console.jar" /> </target> ! <target name="tools"> <echo message="Compiling nice.tools.doc..." level="info" /> <mac-nicec-new package="nice.tools.doc" /> --- 193,205 ---- </manifest> </target> ! <target name="compiler1" depends="setDate,initialize"> ! <mac-nicec-old package="bossa.syntax" /> ! <mac-nicec-old package="nice.tools.compiler.console" args="--recompile-all --jar ${build}/console.jar" /> ! </target> ! <target name="compiler2"> <mac-nicec-new package="bossa.syntax" args="--recompile-all" /> <mac-nicec-new package="nice.tools.compiler.console" args="--recompile-all --jar ${build}/console.jar" /> </target> ! <target name="tools" depends="initialize"> <echo message="Compiling nice.tools.doc..." level="info" /> <mac-nicec-new package="nice.tools.doc" /> *************** *** 210,217 **** <mac-nicec-new package="nice.tools.repository.publish" args="--jar ${build}/nicepublish.jar" /> </target> ! <target name="libs"> <mac-nicec-new package="nice.functional" /> </target> ! <target name="bootstrap" depends="core-bootstrap,javacc,parser,recompile,compiler,tools,libs" /> <!-- The end of bootstrap targets. --> --- 223,232 ---- <mac-nicec-new package="nice.tools.repository.publish" args="--jar ${build}/nicepublish.jar" /> </target> ! <target name="libs" depends="initialize"> <mac-nicec-new package="nice.functional" /> </target> ! <target name="bootstrap" ! depends="core-bootstrap,javacc,parser,recompile,compiler1,compiler2,tools,libs,recompile" ! /> <!-- The end of bootstrap targets. --> |
From: Artem Gr K. <ar...@us...> - 2005-02-27 19:23:02
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28021 Added Files: build.xml Log Message: Nicec bootstrapping using Ant. --- NEW FILE: build.xml --- <?xml version="1.0" encoding="UTF-8"?> <!-- The file was formatted automatically by Eclipse 3.1.0 with maximum line width set to 110. --> <project name="Nice" default="check"> <!-- For Nice arguments see "http://nice.sourceforge.net/cgi-bin/twiki/view/Doc/NicecAntTaskdef". --> <taskdef name="nicec" classname="nice.tools.ant.Nicec" /> <property environment="env" /> <property name="compiler" value="modern" description="example: ant -Dcompiler=gcj" /> <property name="build" value="classes" /> <property name="javaccVersion" value="javacc-3.2" /> <property name="javaccZip" value="external/${javaccVersion}.zip" /> <available file="${javaccZip}" property="haveJavacc" /> <path id="freshNice"> <pathelement path="${build}" /> <pathelement path="${build}/console.jar" /> </path> <macrodef name="mac-javac-single"> <attribute name="includes" /> <attribute name="classpath" default="" /> <sequential> <javac srcdir="src${path.separator}stdlib" destdir="${build}" classpath="@{classpath}" includes="@{includes}" debug="on" optimize="yes" compiler="${compiler}" /> </sequential> </macrodef> <macrodef name="mac-javac-multi"> <attribute name="classpath" default="" /> <element name="include" optional="no" /> <sequential> <javac srcdir="src${path.separator}stdlib" destdir="${build}" classpath="@{classpath}" debug="on" optimize="yes" compiler="${compiler}" > <include /> </javac> </sequential> </macrodef> <macrodef name="mac-nicec-old"> <attribute name="package" /> <attribute name="sourcepath" default="src" /> <sequential> <nicec package="@{package}" sourcepath="@{sourcepath}" destination="${build}" runtime="${NICE_JAR}" recompile_all="yes" /> </sequential> </macrodef> <macrodef name="mac-nicec-new"> <attribute name="package" /> <attribute name="args" default="" /> <sequential> <java failonerror="yes" fork="yes" classpath="${NICE_JAR}" classname="nice.tools.compiler.console.dispatch" > <arg value="--sourcepath" /> <arg value="src${path.separator}stdlib" /> <arg value="--destination" /> <arg value="${build}" /> <arg value="--exclude-runtime" /> <arg line="@{args}" /> <arg value="@{package}" /> </java> </sequential> </macrodef> <!-- Find an existing "nice.jar". --> <target name="envNicec1" if="env.NICEPATH"> <property name="NICE_JAR" value="${env.NICEPATH}${file.separator}nice.jar" /> </target> <target name="envNicec2" if="env.NICE"> <property name="NICE_JAR" value="${env.NICE}${file.separator}nice.jar" /> </target> <target name="envNicec3" if="env.NICE_JAR"> <property name="NICE_JAR" value="${env.NICE_JAR}" /> </target> <target name="initialize" depends="envNicec3,envNicec2,envNicec1"> <echo message="Existing Nice compiler was found at ${NICE_JAR}" level="info" /> </target> <!-- Bootstrap is split into a sequence of targets, combined in the "bootstrap" target. --> <target name="core-bootstrap" depends="initialize"> <mkdir dir="${build}" /> <move file="src/bossa/syntax/dispatch.java.bootstrap" tofile="src/bossa/syntax/dispatch.java" failonerror="no" /> <mac-javac-single includes="nice/tools/util/System.java" /> <mac-nicec-old package="nice.tools.repository" /> <mac-javac-multi> <include> <include name="bossa/syntax/dispatch.java" /> <include name="mlsub/typing/*.java" /> <include name="gnu/expr/*.java" /> <include name="nice/lang/Native.java" /> <include name="nice/lang/rawArray.java" /> <include name="bossa/modules/Package.java" /> <include name="bossa/modules/CompilationListener.java" /> <include name="nice/tools/code/*.java" /> <include name="nice/tools/util/JDK.java" /> </include> </mac-javac-multi> <mac-javac-single includes="nice/lang/inline/*.java" /> <mac-nicec-old package="bossa.modules" /> <mac-nicec-old package="nice.tools.ast" /> <mac-javac-single includes="bossa/syntax/*.java" /> <move file="src/bossa/syntax/dispatch.java" tofile="src/bossa/syntax/dispatch.java.bootstrap" failonerror="no" /> <delete file="${build}/bossa/syntax/dispatch.class" /> <mac-nicec-old package="bossa.syntax" /> </target> <target name="javacc-download" unless="haveJavacc"> <!-- actual location is currently https://www.dev.java.net/files/documents/17/686/javacc-3.2.zip --> <property name="url" value="https://javacc.dev.java.net/files/documents/17/686/${javaccVersion}.zip" /> <echo message="Should download '${url}' and save it into '${javaccZip}'." level="info" /> <exec executable="wget" dir="external"> <arg value="-t0" /> <arg value="-c" /> <arg value="https://javacc.dev.java.net/files/documents/17/686/${javaccVersion}.zip" /> </exec> </target> <target name="javacc" depends="javacc-download"> <unzip src="${javaccZip}" dest="${build}"> <patternset> <include name="${javaccVersion}/bin/lib/javacc.jar" /> </patternset> </unzip> <move file="${build}/${javaccVersion}/bin/lib/javacc.jar" todir="${build}" /> <delete dir="${build}/${javaccVersion}" /> </target> <target name="parser"> <java fork="yes" dir="src/bossa/parser" classname="javacc"> <classpath> <pathelement path="${basedir}/${build}/javacc.jar" /> <pathelement path="${basedir}/${build}" /> </classpath> <arg value="Parser.jj" /> </java> </target> <target name="recompile"> <mac-javac-multi> <include> <include name="bossa/**/*.java" /> <include name="nice/**/*.java" /> <include name="mlsub/**/*.java" /> <include name="gnu/*/*.java" /> <include name="gnu/*/*/*.java" /> </include> </mac-javac-multi> <mac-javac-single includes="nice/lang/*.java" /> </target> <target name="setDate"> <!-- TODO: Extract the current Nice version from the head of the NEWS file. --> <property name="version" value="0.9.10" /> <property name="to" value="src/nice/tools/compiler/dateBuild.nice" /> <tstamp> <format property="NICE_DATE" timezone="UTC" pattern="yyyy.MM.dd, HH:mm:ss zzz" /> </tstamp> <echo file="${to}" append="no" message="package nice.tools.compiler; " /> <echo file="${to}" append="yes" message="let String versionNumber = "${version}"; " /> <echo file="${to}" append="yes" message="let String buildDate = "${NICE_DATE}"; " /> <echo file="${to}" append="yes" message="let String javaVersion = "${java.version}"; " /> <manifest file="src/nice/tools/compiler/Manifest"> <attribute name="Main-Class" value="nice.tools.compiler.console.fun" /> <attribute name="Implementation-Title" value="Nice Compiler" /> <attribute name="Implementation-Version" value="${version}" /> <attribute name="Implementation-Vendor" value="Daniel Bonniot" /> <attribute name="Implementation-URL" value="http://nice.sourceforge.net/" /> <attribute name="Build-Id" value="Nice compiler version ${version} (build ${NICE_DATE})" /> </manifest> </target> <target name="compiler" depends="setDate"> <!-- <mac-nicec-new package="nice.lang" /> --> <mac-nicec-new package="bossa.syntax" args="--recompile-all" /> <mac-nicec-new package="nice.tools.compiler.console" args="--recompile-all --jar ${build}/console.jar" /> </target> <target name="tools"> <echo message="Compiling nice.tools.doc..." level="info" /> <mac-nicec-new package="nice.tools.doc" /> <echo message="Compiling nice.tools.unit.console..." level="info" /> <mac-nicec-new package="nice.tools.unit.console" /> <echo message="Compiling nice.tools.ant..." level="info" /> <!-- From the Makefile: NICE_ANTJAR or ANT_HOME should be set, --> <!-- Ant should be in the CLASSPATH or at least linked to by ./external/ant.jar --> <property name="sep" value="${path.separator}" /> <property name="ant1" value="${env.NICE_ANTJAR}" /> <property name="ant2" value="${env.ANT_HOME}/lib/ant.jar" /> <property name="ant3" value="external/ant.jar" /> <property name="antPath" value="${ant1}${sep}${ant2}${sep}${ant3}" /> <echo message="Classpath is '${antPath}'." level="debug" /> <mac-nicec-new package="nice.tools.ant" args="--classpath ${antPath}" /> <mac-javac-single includes="nice/tools/ant/*.java" classpath="${antPath}" /> <echo message="Compiling nice.tools.repository.publish..." level="info" /> <mac-nicec-new package="nice.tools.repository.publish" args="--jar ${build}/nicepublish.jar" /> </target> <target name="libs"> <mac-nicec-new package="nice.functional" /> </target> <target name="bootstrap" depends="core-bootstrap,javacc,parser,recompile,compiler,tools,libs" /> <!-- The end of bootstrap targets. --> <available file="${build}/nice.jar" property="haveArchive" /> <target name="archive" unless="haveArchive"> <antcall target="bootstrap" /> <jar destfile="${build}/nice.jar" duplicate="preserve" manifest="src/nice/tools/compiler/Manifest"> <zipfileset src="${build}/console.jar" /> <fileset dir="${build}"> <include name="nice/**" /> <include name="mlsub/**" /> <include name="bossa/**" /> <include name="gnu/**" /> </fileset> </jar> </target> <target name="jar" depends="archive" description="compile and put Nice compiler into share/java/nice.jar"> <copy file="${build}/nice.jar" todir="share/java" /> </target> <!-- Testing targets. --> <property name="checkFail" value="yes" description="whether to fail if there are testsuite regressions" /> <target name="testengine"> <mac-javac-single includes="nice/tools/testsuite/*.java" /> </target> <target name="check_compiler" depends="archive,testengine"> <java classpathref="freshNice" classname="nice.tools.testsuite.TestNice" failonerror="${checkFail}"> <arg value="-runtime" /> <arg value="${build}" /> <arg value="testsuite/compiler" /> </java> </target> <target name="check_lib" depends="archive,testengine"> <java classpathref="freshNice" classname="nice.tools.testsuite.TestNice" failonerror="${checkFail}"> <arg value="-runtime" /> <arg value="${build}" /> <arg value="testsuite/lib" /> </java> </target> <target name="check" depends="check_compiler,check_lib" description="run testsuite" /> <!-- The end of testing targets. --> <target name="clean" description="remove all generated files"> <delete dir="${build}" /> <delete dir="testsuite-fail-folder" /> <delete dir="testsuite-temp-folder" /> <delete> <fileset dir="regtest" includes="*.jar" /> <fileset dir="src/bossa/parser"> <include name="Parse*.java" /> <include name="Token*.java" /> <include name="*CharStream.java" /> </fileset> <fileset dir="bin"> <include name="nicedoc" /> <include name="niceunit" /> <include name="nicedoc.lnk" /> <include name="niceunit.lnk" /> </fileset> </delete> <delete dir="share/java" /> <move file="src/bossa/syntax/dispatch.java" tofile="src/bossa/syntax/dispatch.java.bootstrap" failonerror="no" /> </target> </project> |
From: Daniel B. <bo...@us...> - 2005-02-26 10:51:55
|
Update of /cvsroot/nice/tester In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1131 Modified Files: run Added Files: gcj.test Log Message: Added gcj testing (running the testuiste only) Index: run =================================================================== RCS file: /cvsroot/nice/tester/run,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** run 25 Feb 2005 16:35:53 -0000 1.13 --- run 26 Feb 2005 10:51:42 -0000 1.14 *************** *** 28,31 **** --- 28,36 ---- fi + if [ "$GCC_HOME" -a ! "$GCJ" ]; then + export GCJ=$GCC_HOME/bin/gcj + [ -x $GCJ ] || export GCJ= + fi + if ! ls config.* >/dev/null 2>&1; then echo "You must create at least one config.* file." *************** *** 102,106 **** 2) echo "SKIP" ;; 3) echo "IMPOSSIBLE" ;; ! *) echo "OTHER" ;; esac } >> $config.res --- 107,111 ---- 2) echo "SKIP" ;; 3) echo "IMPOSSIBLE" ;; ! *) echo "$((code-10))" ;; esac } >> $config.res *************** *** 113,116 **** --- 118,124 ---- echo "Admin: $us...@us..." > $machine.id echo "System: $system" >> $machine.id + if [ "$GCJ" ]; then + "$GCJ" --version | head -1 >> $machine.id + fi # Send the results to the Test Central --- NEW FILE: gcj.test --- #! /bin/sh [ "$GCJ" ] || exit 2 cd Nice /usr/bin/time -o TIME java -Xms64M -classpath "classes" nice.tools.testsuite.TestNice -gcc "$GCC_HOME" testsuite > OUT RES=$? # print for the log cat OUT NUM_PREFIX=" regressions: " NUM=`tail -10 OUT | grep "$NUM_PREFIX"` NUM=`expr match "$NUM" "$NUM_PREFIX"'\(.*\)'` # Number of errors is encoded as 10+number (since smaller numbers have # other meanings) exit $((10+NUM)) |
From: Daniel B. <bo...@us...> - 2005-02-25 17:49:47
|
Update of /cvsroot/nice/Nice/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16274/web Modified Files: .htaccess Log Message: Released 0.9.10 Index: .htaccess =================================================================== RCS file: /cvsroot/nice/Nice/web/.htaccess,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** .htaccess 22 Sep 2004 09:45:58 -0000 1.20 --- .htaccess 25 Feb 2005 17:49:38 -0000 1.21 *************** *** 1,6 **** Redirect /Wiki http://nice.sourceforge.net/cgi-bin/twiki/view ! Redirect /Nice.tar http://prdownloads.sourceforge.net/nice/Nice-0.9.9-unix.tar.gz ! Redirect /Nice-source.tar.gz http://prdownloads.sourceforge.net/nice/Nice-0.9.9-source.tar.gz ! Redirect /Nice.zip http://prdownloads.sourceforge.net/nice/Nice-0.9.9-windows.zip ! Redirect /nice.deb http://prdownloads.sourceforge.net/nice/nice_0.9.9-1_all.deb ! Redirect /nice.rpm http://prdownloads.sourceforge.net/nice/Nice-0.9.9-1.noarch.rpm --- 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 |
From: Daniel B. <bo...@us...> - 2005-02-25 16:36:12
|
Update of /cvsroot/nice/tester In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27117 Modified Files: run Log Message: Use short machine name. USER seems not defined when running from cron, using whoami instead. Push the creation of the test results page, instead of pulling it from SF. Would need locking with more than one test machine. Index: run =================================================================== RCS file: /cvsroot/nice/tester/run,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** run 7 May 2004 09:01:02 -0000 1.12 --- run 25 Feb 2005 16:35:53 -0000 1.13 *************** *** 18,24 **** # Set up variables, that can be overriden in the setup file. ! machine="`hostname -f`" system="`uname -a`" ! user="$USER" export CVS_SOURCEFORGE="cvs.sourceforge.net" --- 18,24 ---- # Set up variables, that can be overriden in the setup file. ! machine="`hostname`" system="`uname -a`" ! user="`whoami`" export CVS_SOURCEFORGE="cvs.sourceforge.net" *************** *** 49,53 **** name="`expr match $conffile '../config\.\(.*\)'`" ! # Blamk the variable, so it does not keep the previous value if it # is not reset to a new value. JDK_VERSION= --- 49,53 ---- name="`expr match $conffile '../config\.\(.*\)'`" ! # Blank the variable, so it does not keep the previous value if it # is not reset to a new value. JDK_VERSION= *************** *** 121,127 **** else scp -p ./*.id ./*.res ./*.html $us...@sh...:$results_dir # If everything went OK, upload the new development version. ! if [ $failed = false -a "$NICE_MASTER" ]; then scp Nice/share/java/nice.jar bo...@sh...:/home/groups/n/ni/nice/htdocs fi --- 121,129 ---- else scp -p ./*.id ./*.res ./*.html $us...@sh...:$results_dir + # update the results page + ssh $us...@sh... "sh -c 'cd $results_dir/.. && ./run'" # If everything went OK, upload the new development version. ! if [ "$failed" = false -a "$NICE_MASTER" ]; then scp Nice/share/java/nice.jar bo...@sh...:/home/groups/n/ni/nice/htdocs fi |
From: Daniel B. <bo...@us...> - 2005-02-25 16:15:49
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22504 Modified Files: NEWS Log Message: Mentioned the conversion effort from Java to Nice, with thanks to Luc and Arjan. Index: NEWS =================================================================== RCS file: /cvsroot/nice/Nice/NEWS,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** NEWS 24 Feb 2005 16:38:24 -0000 1.63 --- NEWS 25 Feb 2005 16:15:40 -0000 1.64 *************** *** 29,32 **** --- 29,35 ---- information for the failed assertion. * Native compilation with gcj is twice faster. + * An important part of the Nice compiler has been converted from Java to + Nice itself! A lot of thanks go to Luc Perrin and Arjan Boeijink for this + achievement. * Bug fixes (disallowed redefinition of parameters, execution order of initializers in super classes, visibility checking of java classes, *************** *** 35,39 **** values with primitive values, ... ) ! -- nice (0.9.9) --- 38,42 ---- values with primitive values, ... ) ! -- Fri, 25 Feb 2005 17:13:05 +0100 nice (0.9.9) |
From: Daniel B. <bo...@us...> - 2005-02-25 16:15:49
|
Update of /cvsroot/nice/Nice/debian In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22504/debian Modified Files: changelog Log Message: Mentioned the conversion effort from Java to Nice, with thanks to Luc and Arjan. Index: changelog =================================================================== RCS file: /cvsroot/nice/Nice/debian/changelog,v retrieving revision 1.244 retrieving revision 1.245 diff -C2 -d -r1.244 -r1.245 *** changelog 13 Feb 2005 17:49:38 -0000 1.244 --- changelog 25 Feb 2005 16:15:39 -0000 1.245 *************** *** 4,8 **** * Version 0.9.9-1 was not uploaded to the Debian archive. ! -- Daniel Bonniot <bo...@us...> Sun, 13 Feb 2005 11:10:44 +0100 nice (0.9.9-1) unstable; urgency=low --- 4,8 ---- * Version 0.9.9-1 was not uploaded to the Debian archive. ! -- Daniel Bonniot <bo...@us...> Fri, 25 Feb 2005 17:13:30 +0100 nice (0.9.9-1) unstable; urgency=low |
From: Daniel B. <bo...@us...> - 2005-02-25 03:12:04
|
Update of /cvsroot/nice/Nice/src/nice/tools/ant In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23223/src/nice/tools/ant Modified Files: TestListener.nice Log Message: Print correct source file and line numbers in niceunit (#1096734). Index: TestListener.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/ant/TestListener.nice,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestListener.nice 18 Feb 2004 17:45:10 -0000 1.2 --- TestListener.nice 25 Feb 2005 03:11:39 -0000 1.3 *************** *** 42,46 **** } ! failure(test, cause) { failures++; --- 42,46 ---- } ! failure(test, cause, loader) { failures++; *************** *** 50,55 **** let couldPrint = iterLocations (test, cause, (?String file, String method, int line) => ! println("Location: " + file + " method " + method + ! (line < 0 ? "" : " line " + line))); if (! couldPrint) --- 50,56 ---- let couldPrint = iterLocations (test, cause, (?String file, String method, int line) => ! println("Location: " + file + " method " + method + ! (line < 0 ? "" : " line " + line)), ! loader); if (! couldPrint) *************** *** 62,66 **** throw new BuildException(""failures" tests failed", task.getLocation); ! task.log("Unit testing done: "tests" tests successful", Project.MSG_INFO); } --- 63,67 ---- throw new BuildException(""failures" tests failed", task.getLocation); ! task.log("Unit testing done: "tests" tests successful", Project.MSG_INFO); } |
From: Daniel B. <bo...@us...> - 2005-02-24 16:38:50
|
Update of /cvsroot/nice/Nice/src/nice/tools/repository/publish In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7228/src/nice/tools/repository/publish Modified Files: main.nice Log Message: Print correct source file and line numbers in niceunit (#1096734). Index: main.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/repository/publish/main.nice,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** main.nice 7 Aug 2004 14:57:32 -0000 1.1 --- main.nice 24 Feb 2005 16:38:24 -0000 1.2 *************** *** 54,58 **** boolean failed = false; ! failure(test, cause) { super; --- 54,58 ---- boolean failed = false; ! failure(test, cause, loader) { super; |
From: Daniel B. <bo...@us...> - 2005-02-24 16:38:50
|
Update of /cvsroot/nice/Nice/src/nice/tools/unit/console In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7228/src/nice/tools/unit/console Modified Files: main.nice Log Message: Print correct source file and line numbers in niceunit (#1096734). Index: main.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/unit/console/main.nice,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** main.nice 24 Feb 2005 15:10:52 -0000 1.3 --- main.nice 24 Feb 2005 16:38:23 -0000 1.4 *************** *** 43,51 **** start(test) = println(test); end(test) {} ! failure(test, cause) { println("Test failed:\n " + cause); if (!(iterLocations(test, cause, (?String file, String method, int line) => ! println("Location: "file" method "method + (line < 0 ? "" : " line "line))))) cause.printStackTrace(); } --- 43,54 ---- start(test) = println(test); end(test) {} ! failure(test, cause, loader) { println("Test failed:\n " + cause); if (!(iterLocations(test, cause, (?String file, String method, int line) => ! println(""file + ! (line < 0 ? "" : ":"line) + ! " method "method), ! loader))) cause.printStackTrace(); } |
From: Daniel B. <bo...@us...> - 2005-02-24 16:38:49
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7228/stdlib/nice/lang Modified Files: source-lines.nice Log Message: Print correct source file and line numbers in niceunit (#1096734). Index: source-lines.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/source-lines.nice,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** source-lines.nice 5 Aug 2004 12:04:21 -0000 1.7 --- source-lines.nice 24 Feb 2005 16:38:23 -0000 1.8 *************** *** 50,54 **** elements.foreach(Object e => { (?String file, int line) = ! getSourceLocation__(e.call__("getClassName"), e.call__("getLineNumber"), loader) || (e.call__("getFileName"), e.call__("getLineNumber")); let location = --- 50,54 ---- elements.foreach(Object e => { (?String file, int line) = ! getSourceLocation(e.call__("getClassName"), e.call__("getLineNumber"), loader) || (e.call__("getFileName"), e.call__("getLineNumber")); let location = *************** *** 215,220 **** } ! ?(String,int) getSourceLocation__(String className, int lineNumber, ! ?ClassLoader loader) { let map = sourceDebugExtension__(className, loader); --- 215,220 ---- } ! public ?(String,int) getSourceLocation(String className, int lineNumber, ! ?ClassLoader loader) { let map = sourceDebugExtension__(className, loader); |
From: Daniel B. <bo...@us...> - 2005-02-24 16:38:34
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7228 Modified Files: NEWS Log Message: Print correct source file and line numbers in niceunit (#1096734). Index: NEWS =================================================================== RCS file: /cvsroot/nice/Nice/NEWS,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** NEWS 20 Feb 2005 22:34:26 -0000 1.62 --- NEWS 24 Feb 2005 16:38:24 -0000 1.63 *************** *** 26,29 **** --- 26,31 ---- * Improved source information for debuggers. * Generated classes are smaller, thanks to smaller debugging information. + * Niceunit now reports test failures with the source file and line number + information for the failed assertion. * Native compilation with gcj is twice faster. * Bug fixes (disallowed redefinition of parameters, execution order of |
From: Daniel B. <bo...@us...> - 2005-02-24 16:38:32
|
Update of /cvsroot/nice/Nice/src/nice/tools/unit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7228/src/nice/tools/unit Modified Files: listener.nice api.nice Log Message: Print correct source file and line numbers in niceunit (#1096734). Index: api.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/unit/api.nice,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** api.nice 24 Feb 2005 15:11:00 -0000 1.3 --- api.nice 24 Feb 2005 16:38:23 -0000 1.4 *************** *** 34,38 **** public boolean iterLocations ! (String testName, Throwable t, (?String, String, int)->void handleLocation) { let stack = nice.tools.util.JDK.getStackTrace(t); --- 34,39 ---- public boolean iterLocations ! (String testName, Throwable t, (?String, String, int)->void handleLocation, ! ClassLoader loader) { let stack = nice.tools.util.JDK.getStackTrace(t); *************** *** 46,51 **** String method = nice.tools.util.JDK.stackMethodName(stackTraceElement); String className = nice.tools.util.JDK.stackClassName(stackTraceElement); ! int lineNumber = nice.tools.util.JDK.stackLineNumber(stackTraceElement); ! handleLocation(file, method, lineNumber); // We stop when we reach the start of the test. Going deeper // only shows the internals of the test engine, which are not --- 47,53 ---- String method = nice.tools.util.JDK.stackMethodName(stackTraceElement); String className = nice.tools.util.JDK.stackClassName(stackTraceElement); ! int line = nice.tools.util.JDK.stackLineNumber(stackTraceElement); ! (file, line) = getSourceLocation(className, line, loader) || (file,line); ! handleLocation(file, method, line); // We stop when we reach the start of the test. Going deeper // only shows the internals of the test engine, which are not *************** *** 73,77 **** { let cause = e.getTargetException(); ! listener.failure(name, cause); } finally --- 75,79 ---- { let cause = e.getTargetException(); ! listener.failure(name, cause, m.getDeclaringClass().getClassLoader()); } finally Index: listener.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/unit/listener.nice,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** listener.nice 18 Feb 2004 16:33:25 -0000 1.1 --- listener.nice 24 Feb 2005 16:38:23 -0000 1.2 *************** *** 5,8 **** void start(String test); void end(String test); ! void failure(String test, Throwable cause); } --- 5,8 ---- void start(String test); void end(String test); ! void failure(String test, Throwable cause, ClassLoader loader); } |
From: Daniel B. <bo...@us...> - 2005-02-24 15:11:40
|
Update of /cvsroot/nice/Nice/src/nice/tools/unit/console In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14379/src/nice/tools/unit/console Modified Files: main.nice Log Message: Cleanup. Index: main.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/unit/console/main.nice,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** main.nice 21 Feb 2004 14:53:14 -0000 1.2 --- main.nice 24 Feb 2005 15:10:52 -0000 1.3 *************** *** 15,19 **** ?String classpath = null; ! prg.options = [ option("classpath", --- 15,19 ---- ?String classpath = null; ! prg.options = [ option("classpath", *************** *** 43,51 **** start(test) = println(test); end(test) {} ! failure(test, cause) { println("Test failed:\n " + cause); if (!(iterLocations(test, cause, (?String file, String method, int line) => ! println("Location: " + file + " method " + method + (line < 0 ? "" : " line " + line))))) cause.printStackTrace(); } --- 43,51 ---- start(test) = println(test); end(test) {} ! failure(test, cause) { println("Test failed:\n " + cause); if (!(iterLocations(test, cause, (?String file, String method, int line) => ! println("Location: "file" method "method + (line < 0 ? "" : " line "line))))) cause.printStackTrace(); } |