nice-commit Mailing List for The Nice Programming Language (Page 43)
Brought to you by:
bonniot
You can subscribe to this list here.
2003 |
Jan
|
Feb
(60) |
Mar
(125) |
Apr
(183) |
May
(140) |
Jun
(227) |
Jul
(141) |
Aug
(181) |
Sep
(75) |
Oct
(89) |
Nov
(187) |
Dec
(162) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(69) |
Feb
(197) |
Mar
(98) |
Apr
(26) |
May
(10) |
Jun
(85) |
Jul
(88) |
Aug
(79) |
Sep
(80) |
Oct
(81) |
Nov
(53) |
Dec
(109) |
2005 |
Jan
(68) |
Feb
(77) |
Mar
(232) |
Apr
(79) |
May
(37) |
Jun
(37) |
Jul
(3) |
Aug
(18) |
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
(10) |
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(9) |
2007 |
Jan
(2) |
Feb
(8) |
Mar
(2) |
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
|
Nov
(17) |
Dec
(6) |
2008 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Daniel B. <bo...@us...> - 2004-07-22 13:52:51
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14699/src/bossa/syntax Modified Files: OverloadedSymbolExp.java Log Message: Cleanup. Index: OverloadedSymbolExp.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/OverloadedSymbolExp.java,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** OverloadedSymbolExp.java 23 Jun 2004 21:27:46 -0000 1.71 --- OverloadedSymbolExp.java 22 Jul 2004 13:52:41 -0000 1.72 *************** *** 188,197 **** User.error(this, "Arguments " + arguments.printTypes() + ! " do not fit: \n" + removed.get(0)); else ! User.error(this, ! "No possible call for " + ident + ! ".\nArguments: " + arguments.printTypes() + ! "\nPossibilities:\n" + Util.map("", "\n", "", removed)); } --- 188,197 ---- User.error(this, "Arguments " + arguments.printTypes() + ! " do not fit:\n" + removed.get(0)); else ! User.error(this, ! "No possible call for " + ident + ! ".\nArguments: " + arguments.printTypes() + ! "\nPossibilities:\n" + Util.map("", "\n", "", removed)); } |
From: Daniel B. <bo...@us...> - 2004-07-22 13:50:47
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14466/stdlib/nice/lang Modified Files: java.nice Log Message: Fix typo. Index: java.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/java.nice,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** java.nice 22 Jul 2004 13:05:08 -0000 1.52 --- java.nice 22 Jul 2004 13:50:38 -0000 1.53 *************** *** 402,406 **** class StringTokenizer = native java.util.StringTokenizer; ! boolean hasMoreElement(StringTokenizer) = native boolean java.util.StringTokenizer.hasMoreElements(); String nextElement(StringTokenizer) = native Object java.util.StringTokenizer.nextElement(); --- 402,406 ---- class StringTokenizer = native java.util.StringTokenizer; ! boolean hasMoreElements(StringTokenizer) = native boolean java.util.StringTokenizer.hasMoreElements(); String nextElement(StringTokenizer) = native Object java.util.StringTokenizer.nextElement(); |
From: Arjan B. <ar...@us...> - 2004-07-22 13:05:17
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6420/F:/nice/stdlib/nice/lang Modified Files: java.nice Log Message: Retypings for StringTokenizer methods that are part of Enumeration. Index: java.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/java.nice,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** java.nice 19 Dec 2003 18:52:45 -0000 1.51 --- java.nice 22 Jul 2004 13:05:08 -0000 1.52 *************** *** 402,405 **** --- 402,407 ---- class StringTokenizer = native java.util.StringTokenizer; + boolean hasMoreElement(StringTokenizer) = native boolean java.util.StringTokenizer.hasMoreElements(); + String nextElement(StringTokenizer) = native Object java.util.StringTokenizer.nextElement(); <T> void update(Observer, Observable, T) = |
From: Arjan B. <ar...@us...> - 2004-07-22 12:43:04
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2995/F:/nice/src/bossa/syntax Modified Files: analyse.nice Log Message: Preciser typings for analyse methods. Index: analyse.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/analyse.nice,v retrieving revision 1.102 retrieving revision 1.103 diff -C2 -d -r1.102 -r1.103 *** analyse.nice 27 Jun 2004 23:37:24 -0000 1.102 --- analyse.nice 22 Jul 2004 12:42:54 -0000 1.103 *************** *** 23,27 **** Statement analyse(Statement, VarScope, TypeScope, boolean mustReturnAValue); ! ?Expression analyse(Expression, VarScope, TypeScope); TypeMaper typeMaper(SymbolTable<TypeSymbol>,TypeScope) = --- 23,27 ---- Statement analyse(Statement, VarScope, TypeScope, boolean mustReturnAValue); ! Expression analyse(Expression, VarScope, TypeScope); TypeMaper typeMaper(SymbolTable<TypeSymbol>,TypeScope) = *************** *** 228,232 **** } ! ?Expression analyse(?Expression, Info); void analyse(?Statement, Info); --- 228,234 ---- } ! ?Expression analyse(?Expression, Info) = null; ! override Expression analyse(Expression, Info); ! void analyse(?Statement, Info); *************** *** 236,240 **** analyse(e@Expression, i) = e; - analyse(null(Expression), info) = null; void setInitialized (Block.LocalVariable.Symbol v, Info info, --- 238,241 ---- *************** *** 414,418 **** } ! ?Expression analyse(Expression e, Info info, boolean noEscape) = analyse(e, info); --- 415,419 ---- } ! Expression analyse(Expression e, Info info, boolean noEscape) = analyse(e, info); |
From: Arjan B. <ar...@us...> - 2004-07-22 12:40:53
|
Update of /cvsroot/nice/Nice/testsuite/compiler/overloading In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2464/F:/nice/testsuite/compiler/overloading Modified Files: specificity.testsuite Log Message: Testcase for bug in resolving methods with null patterns. Index: specificity.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/overloading/specificity.testsuite,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** specificity.testsuite 28 Feb 2004 14:23:41 -0000 1.5 --- specificity.testsuite 22 Jul 2004 12:40:42 -0000 1.6 *************** *** 118,119 **** --- 118,128 ---- void foo(A x) {} void foo(B x) {} + + /// PASS bug + assert foo(null) == null; + let String s = foo("abc"); + ///Toplevel + ?String foo(?String); + override String foo(String); + foo(null) = null; + foo(String s) = s; |
From: Daniel B. <bo...@us...> - 2004-07-21 20:26:25
|
Update of /cvsroot/nice/Nice/testsuite/compiler/expressions/arrays In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20768/testsuite/compiler/expressions/arrays Modified Files: typing.testsuite Log Message: Handle creation of arrays with a parameterized type component (which was broken by the new handling of type variables in 0.9.8). Index: typing.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/expressions/arrays/typing.testsuite,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** typing.testsuite 15 Apr 2004 14:42:00 -0000 1.3 --- typing.testsuite 21 Jul 2004 20:26:14 -0000 1.4 *************** *** 17,18 **** --- 17,21 ---- <T> ?T[] foo(!T x) = new T[1]; <T> ?T[] foo2(int length) = new T[length]; + + /// PASS + ?List<String>[] myArray = new List[10]; |
From: Daniel B. <bo...@us...> - 2004-07-21 20:26:24
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20768/src/bossa/syntax Modified Files: NewArrayExp.java Log Message: Handle creation of arrays with a parameterized type component (which was broken by the new handling of type variables in 0.9.8). Index: NewArrayExp.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/NewArrayExp.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** NewArrayExp.java 16 Apr 2004 13:55:29 -0000 1.22 --- NewArrayExp.java 21 Jul 2004 20:26:14 -0000 1.23 *************** *** 80,83 **** --- 80,85 ---- nullVars = null; + MonotypeVar[] typeVars = null; + // Whether the element are surely not null boolean sure = false; *************** *** 102,106 **** TypeConstructor tc = (TypeConstructor) resolvedType; ! monotype = new MonotypeConstructor(tc, MonotypeVar.news(tc.arity())); if (Types.isPrimitive(tc)) --- 104,110 ---- TypeConstructor tc = (TypeConstructor) resolvedType; ! ! typeVars = MonotypeVar.news(tc.arity()); ! monotype = new MonotypeConstructor(tc, typeVars); if (Types.isPrimitive(tc)) *************** *** 117,121 **** monotype = MonotypeConstructor.apply (nullVars[nullVars.length - 1], monotype); ! cst = new Constraint(nullVars, null); } --- 121,139 ---- monotype = MonotypeConstructor.apply (nullVars[nullVars.length - 1], monotype); ! } ! ! if (nullVars != null || typeVars != null) ! { ! if (nullVars == null) ! cst = new Constraint(typeVars, null); ! else if (typeVars == null) ! cst = new Constraint(nullVars, null); ! else ! { ! TypeSymbol[] binders = new TypeSymbol[nullVars.length + typeVars.length]; ! System.arraycopy(nullVars, 0, binders, 0, nullVars.length); ! System.arraycopy(typeVars, 0, binders, nullVars.length, typeVars.length); ! cst = new Constraint(binders, null); ! } } |
From: Daniel B. <bo...@us...> - 2004-07-20 22:37:59
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19902 Modified Files: NEWS Log Message: Take instanceof assertions into account in the typechecker (implements rfe #923854). Index: NEWS =================================================================== RCS file: /cvsroot/nice/Nice/NEWS,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** NEWS 29 Jun 2004 18:57:20 -0000 1.37 --- NEWS 20 Jul 2004 22:37:50 -0000 1.38 *************** *** 1,2 **** --- 1,13 ---- + nice (0.9.9) + + * Assertions about the type of variables are used by the typechecker, so that + casts are not necessary. For instance: + Object o = ...; + // We happen to know by design than the object must be a string + assert o instanceof String; + // Here o can be used as a string without cast + + -- + nice (0.9.8) |
From: Daniel B. <bo...@us...> - 2004-07-20 22:37:58
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19902/src/bossa/syntax Modified Files: typecheck.nice Log Message: Take instanceof assertions into account in the typechecker (implements rfe #923854). Index: typecheck.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/typecheck.nice,v retrieving revision 1.100 retrieving revision 1.101 diff -C2 -d -r1.100 -r1.101 *** typecheck.nice 24 Mar 2004 23:44:25 -0000 1.100 --- typecheck.nice 20 Jul 2004 22:37:49 -0000 1.101 *************** *** 201,204 **** --- 201,214 ---- e.arguments.typecheckArgs(); + if (e.isCallTo("assert") && 1 <= e.arguments.size() <= 2) + { + ?List<(MonoSymbol, mlsub.typing.Monotype)> instanceofIfSucceeds = + first_(instanceofInfo(e.arguments.getExp(0))); + + if (instanceofIfSucceeds != null) + instanceofIfSucceeds.foreach(((MonoSymbol variable, mlsub.typing.Monotype type)) => + setVarType(variable, now: type, out: variable.type)); + } + // forces computation of the type if not done. mlsub.typing.Polytype t = e.getType(); *************** *** 1015,1018 **** // Local Variables: ! // nice-xprogram: "$HOME/Nice/bin/nicec -d ../classes" // End: --- 1025,1028 ---- // Local Variables: ! // nice-xprogram: "../bin/nicec -d ../classes" // End: |
From: Daniel B. <bo...@us...> - 2004-07-20 22:37:57
|
Update of /cvsroot/nice/Nice/testsuite/compiler/typing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19902/testsuite/compiler/typing Modified Files: instanceof.testsuite Log Message: Take instanceof assertions into account in the typechecker (implements rfe #923854). Index: instanceof.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/typing/instanceof.testsuite,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** instanceof.testsuite 27 Jun 2004 23:37:25 -0000 1.21 --- instanceof.testsuite 20 Jul 2004 22:37:49 -0000 1.22 *************** *** 331,332 **** --- 331,357 ---- } + /// PASS + Object o = foo(); + assert o instanceof String; + String s = o; + /// Toplevel + Object foo() = ""; + + /// FAIL + Object o = foo(); + assert o instanceof String; + o = 42; + String /*/// FAIL HERE*/ s = o; + /// Toplevel + Object foo() = ""; + + + /// FAIL + Object o = foo(); + if (o == "") + { + assert o instanceof String; + } + String /*/// FAIL HERE*/ s = o; + /// Toplevel + Object foo() = ""; |
From: Daniel B. <bo...@us...> - 2004-07-16 10:02:12
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9811/src/bossa/syntax Modified Files: MethodContainer.java Log Message: When there is a class constraint, report undeclared class type parameters. Index: MethodContainer.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/MethodContainer.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** MethodContainer.java 25 Feb 2004 11:23:29 -0000 1.15 --- MethodContainer.java 16 Jul 2004 10:01:33 -0000 1.16 *************** *** 18,21 **** --- 18,22 ---- import mlsub.typing.TypeConstructor; import bossa.util.User; + import bossa.util.Location; import java.util.List; *************** *** 79,83 **** */ public static Constraint make(bossa.syntax.Constraint cst, ! MonotypeVar[] typeParameters, List atoms) { TypeSymbol[] binders; --- 80,85 ---- */ public static Constraint make(bossa.syntax.Constraint cst, ! MonotypeVar[] typeParameters, List atoms, ! Location loc) { TypeSymbol[] binders; *************** *** 98,110 **** } ! return new Constraint(binders, constraints, typeParameters, resolve); } ! private Constraint (TypeSymbol[] binders, List atoms, ! MonotypeVar[] typeParameters, boolean resolve) { super(binders, atoms); if (resolve) ! findBinders(typeParameters); else this.typeParameters = typeParameters; --- 100,114 ---- } ! return new Constraint ! (binders, constraints, typeParameters, resolve, loc); } ! private Constraint (TypeSymbol[] binders, List atoms, ! MonotypeVar[] typeParameters, boolean resolve, ! Location loc) { super(binders, atoms); if (resolve) ! findBinders(typeParameters, loc); else this.typeParameters = typeParameters; *************** *** 119,134 **** constraint by their definition. */ ! private void findBinders(MonotypeVar[] typeParameters) { this.typeParameters = new mlsub.typing.Monotype[typeParameters.length]; ! for (int i = 0; i < typeParameters.length; i++) { ! this.typeParameters[i] = findBinder(typeParameters[i]); } } ! private mlsub.typing.Monotype findBinder(MonotypeVar binder) { ! for (java.util.Iterator i = this.getBinders().iterator(); i.hasNext(); ) { TypeSymbol s = (TypeSymbol) i.next(); --- 123,138 ---- constraint by their definition. */ ! private void findBinders(MonotypeVar[] typeParameters, Location loc) { this.typeParameters = new mlsub.typing.Monotype[typeParameters.length]; ! for (int i = 0; i < typeParameters.length; i++) { ! this.typeParameters[i] = findBinder(typeParameters[i], loc); } } ! private mlsub.typing.Monotype findBinder(MonotypeVar binder, Location loc) { ! for (java.util.Iterator i = this.getBinders().iterator(); i.hasNext(); ) { TypeSymbol s = (TypeSymbol) i.next(); *************** *** 145,150 **** } ! // Not found. It was not introduced earlier, use it as the binder. ! return binder; } --- 149,153 ---- } ! throw User.error(loc, binder + " is not declared in the constraint"); } |
From: Daniel B. <bo...@us...> - 2004-07-16 10:02:12
|
Update of /cvsroot/nice/Nice/testsuite/compiler/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9811/testsuite/compiler/classes Modified Files: typeParameters.testsuite Log Message: When there is a class constraint, report undeclared class type parameters. Index: typeParameters.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/classes/typeParameters.testsuite,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** typeParameters.testsuite 16 Jun 2004 10:00:33 -0000 1.17 --- typeParameters.testsuite 16 Jul 2004 10:01:32 -0000 1.18 *************** *** 302,305 **** --- 302,314 ---- <String S> class B<S> extends A<S> {} + /// FAIL + // bug #992007 + /// Toplevel + <A,B | B <: A> class Foo<B,X> + { + A a; + void foo(B b) { a = b; } + } + /// PASS A<String> a; |
From: Daniel B. <bo...@us...> - 2004-07-16 10:01:55
|
Update of /cvsroot/nice/Nice/src/bossa/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9811/src/bossa/parser Modified Files: Parser.jj Log Message: When there is a class constraint, report undeclared class type parameters. Index: Parser.jj =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v retrieving revision 1.247 retrieving revision 1.248 diff -C2 -d -r1.247 -r1.248 *** Parser.jj 1 Jul 2004 10:46:18 -0000 1.247 --- Parser.jj 16 Jul 2004 10:01:33 -0000 1.248 *************** *** 1167,1177 **** MonotypeVar var; Token start; } { ! start="<" var=taggedMonotypeVar(tags, atoms) { binders.add(var); } ( "," var=taggedMonotypeVar(tags, atoms) { binders.add(var); } )* [ "|" atomics(atoms) ] ! ">" { // For the moment, disallow constraints to come from both the prefix --- 1167,1178 ---- MonotypeVar var; Token start; + Location loc; } { ! start="<" { loc = makeLocation(start); } var=taggedMonotypeVar(tags, atoms) { binders.add(var); } ( "," var=taggedMonotypeVar(tags, atoms) { binders.add(var); } )* [ "|" atomics(atoms) ] ! ">" { // For the moment, disallow constraints to come from both the prefix *************** *** 1179,1186 **** if (prefix != Constraint.True && atoms.size() > 0) throw bossa.util.User.error ! (makeLocation(start), "Constraints on type parameters should all be specified in the prefix constraint"); MonotypeVar[] b = (MonotypeVar[]) binders.toArray(new MonotypeVar[binders.size()]); ! return MethodContainer.Constraint.make(prefix, b, atoms); } } --- 1180,1187 ---- if (prefix != Constraint.True && atoms.size() > 0) throw bossa.util.User.error ! (loc, "Constraints on type parameters should all be specified in the prefix constraint"); MonotypeVar[] b = (MonotypeVar[]) binders.toArray(new MonotypeVar[binders.size()]); ! return MethodContainer.Constraint.make(prefix, b, atoms, loc); } } |
From: Daniel B. <bo...@us...> - 2004-07-15 10:53:38
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7319/src/bossa/syntax Modified Files: AbstractInterfaceImplementation.java Log Message: Only allow an existing class to implement a non-abstract interface if the class is defined in Nice. Index: AbstractInterfaceImplementation.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/AbstractInterfaceImplementation.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** AbstractInterfaceImplementation.java 11 Jun 2004 15:53:35 -0000 1.6 --- AbstractInterfaceImplementation.java 15 Jul 2004 10:53:29 -0000 1.7 *************** *** 68,71 **** --- 68,74 ---- if (def != null) def.addInterfaceImplementation(interfaceITF); + else if (interfaceITF.associatedTC() != null) + User.error(this, classTC + " is not a class defined in Nice.\n" + + "It can only implement abstract interfaces."); createContext(); |
From: Daniel B. <bo...@us...> - 2004-07-15 10:53:37
|
Update of /cvsroot/nice/Nice/testsuite/compiler/abstractInterfaces In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7319/testsuite/compiler/abstractInterfaces Modified Files: existingClass.testsuite Log Message: Only allow an existing class to implement a non-abstract interface if the class is defined in Nice. Index: existingClass.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/abstractInterfaces/existingClass.testsuite,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** existingClass.testsuite 11 Jun 2004 15:53:35 -0000 1.7 --- existingClass.testsuite 15 Jul 2004 10:53:29 -0000 1.8 *************** *** 80,84 **** /// PASS // bug #904327 ! // When implementing a non-abstract interface, the class must really // implement that interface in the bytecode. --- 80,84 ---- /// PASS // bug #904327 ! // When implementing a non-abstract interface, the class must really // implement that interface in the bytecode. *************** *** 97,98 **** --- 97,111 ---- class vendor.Vendor implements ITest; + + /// FAIL + // bug #989049 + // Making an existing class implement a non-abstract interface + // can only be done with classes defined in Nice. + String a = "hello"; + println( a.test() ); + + /// Toplevel + interface ITest { String test(); } + + class /*/// FAIL HERE */ java.lang.String implements ITest; + test(String a) = "done"; |
From: Daniel B. <bo...@us...> - 2004-07-13 11:05:51
|
Update of /cvsroot/nice/Nice/src/bossa/link In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14989/src/bossa/link Modified Files: Compilation.java Log Message: Clarify the error message when a native method is not dispatched on the first argument. Index: Compilation.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/link/Compilation.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Compilation.java 20 Mar 2004 15:49:25 -0000 1.16 --- Compilation.java 13 Jul 2004 11:05:40 -0000 1.17 *************** *** 181,194 **** ClassDefinition def = ClassDefinition.get(firstArgument); - if (def == null || ! (def.getImplementation() instanceof NiceClass)) - throw User.error(alt, - m + " is a native method.\n" + - "It can not be overriden because the first argument" + - (firstArgument == null - ? "" - : " " + firstArgument.toString()) - + " is not a class defined in Nice"); ! return (NiceClass) def.getImplementation(); } --- 181,198 ---- ClassDefinition def = ClassDefinition.get(firstArgument); ! if (def != null && def.getImplementation() instanceof NiceClass) ! return (NiceClass) def.getImplementation(); ! ! // Explain that this cannot be done. ! String msg = m + " is a native method.\n"; ! ! if (firstArgument == null) ! msg += "It cannot be implemented without dispatch on the first argument"; ! else ! msg += "It cannot be overriden because the first argument " + ! firstArgument + " is not a class defined in Nice"; ! ! throw User.error(alt, msg); } |
From: Arjan B. <ar...@us...> - 2004-07-05 08:22:35
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27827/F:/nice/src/bossa/syntax Modified Files: Pattern.java Log Message: Fixed comparing of enum patterns. Index: Pattern.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Pattern.java,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** Pattern.java 5 Jul 2004 07:55:23 -0000 1.85 --- Pattern.java 5 Jul 2004 08:22:25 -0000 1.86 *************** *** 422,426 **** if (this.atEnum() && that.atEnum()) ! return false; if (this.atIntCompare() && that.atIntCompare()) --- 422,426 ---- if (this.atEnum() && that.atEnum()) ! return this.atValue.equals(that.atValue); if (this.atIntCompare() && that.atIntCompare()) |
From: Arjan B. <ar...@us...> - 2004-07-05 08:22:35
|
Update of /cvsroot/nice/Nice/testsuite/compiler/enums In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27827/F:/nice/testsuite/compiler/enums Modified Files: enum.testsuite Log Message: Fixed comparing of enum patterns. Index: enum.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/enums/enum.testsuite,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** enum.testsuite 5 Jul 2004 07:55:25 -0000 1.8 --- enum.testsuite 5 Jul 2004 08:22:25 -0000 1.9 *************** *** 119,120 **** --- 119,130 ---- Signal `&`(Signal x, Signal y) = x; `&`(Low, Low) = Low; + + /// PASS + assert (Low & High) == Low; + /// Toplevel + enum Signal { High, Low, X } + Signal `&`(Signal, Signal); + `&`(High, x) = x; + `&`(X, x) = X; + `&`(Low, Low) = Low; + `&`(Low, z) = z & Low; |
From: Arjan B. <ar...@us...> - 2004-07-05 07:55:36
|
Update of /cvsroot/nice/Nice/testsuite/compiler/enums In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23006/F:/nice/testsuite/compiler/enums Modified Files: enum.testsuite Log Message: Bugfix: avoid global symbols being added multiple times to a scope when they are used as patterns. Index: enum.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/enums/enum.testsuite,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** enum.testsuite 16 Jan 2004 00:14:07 -0000 1.7 --- enum.testsuite 5 Jul 2004 07:55:25 -0000 1.8 *************** *** 113,114 **** --- 113,120 ---- assert dime.value == dime.foo(); assert quarter.value == quarter.foo(); + + /// PASS + /// Toplevel + enum Signal { High, Low, X } + Signal `&`(Signal x, Signal y) = x; + `&`(Low, Low) = Low; |
From: Arjan B. <ar...@us...> - 2004-07-05 07:55:35
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23006/F:/nice/src/bossa/syntax Modified Files: Pattern.java Log Message: Bugfix: avoid global symbols being added multiple times to a scope when they are used as patterns. Index: Pattern.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Pattern.java,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** Pattern.java 16 Jun 2004 10:00:37 -0000 1.84 --- Pattern.java 5 Jul 2004 07:55:23 -0000 1.85 *************** *** 214,223 **** if (sym instanceof EnumDefinition.EnumSymbol) { ! EnumDefinition.EnumSymbol symbol = (EnumDefinition.EnumSymbol)sym; ! NewExp val = (NewExp)symbol.getValue(); ! tc = val.tc; ! atValue = new ConstantExp(null, tc, symbol, name.toString(), location); return; } --- 214,225 ---- if (sym instanceof EnumDefinition.EnumSymbol) { ! EnumDefinition.EnumSymbol symbol = (EnumDefinition.EnumSymbol)sym; ! NewExp val = (NewExp)symbol.getValue(); ! tc = val.tc; ! atValue = new ConstantExp(null, tc, symbol, name.toString(), location); + refName = name; + name = null; return; } *************** *** 239,242 **** --- 241,245 ---- tc = val.tc; atValue = val; + name = null; } else if (symbol.getValue() instanceof NewExp) *************** *** 247,250 **** --- 250,255 ---- atValue = new ConstantExp(null, tc, symbol, name.toString(), location); + refName = name; + name = null; } else *************** *** 649,653 **** if (atReference()) ! return "@=" + name; if (atString()) --- 654,658 ---- if (atReference()) ! return "@=" + refName; if (atString()) |
From: Daniel B. <bo...@us...> - 2004-07-04 02:01:51
|
Update of /cvsroot/nice/Nice/src/gnu/bytecode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27645/src/gnu/bytecode Modified Files: Type.java Log Message: Remove nice.tools.code.ClassLoader (which was used to load java.util.* classes from a version with type parameter). For now, all imported classes are loaded using reflexion. Index: Type.java =================================================================== RCS file: /cvsroot/nice/Nice/src/gnu/bytecode/Type.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Type.java 1 Jul 2004 11:41:41 -0000 1.19 --- Type.java 4 Jul 2004 02:01:43 -0000 1.20 *************** *** 92,98 **** else { ! type = loadFromClasspath(name); ! if (type == null) ! type = new ClassType(name, ClassType.EXISTING_CLASS); } mapNameToType.put(name, type); --- 92,96 ---- else { ! type = new ClassType(name, ClassType.EXISTING_CLASS); } mapNameToType.put(name, type); *************** *** 101,129 **** } - private static nice.tools.code.ClassLoader loader; - static { - String runtime = nice.tools.code.TypeImport.getRuntime(); - loader = new nice.tools.code.ClassLoader - (runtime, - new nice.tools.code.ClassLoader.Registrar() { - public void register(String name, ClassType type) - { - getMapNameToType().put(name, type); - } - }); - } - - public static Type loadFromClasspath(String name) - { - Type type = lookupType(name); - if (type != null) - return type; - - if (name.startsWith("java.util.")) - return loader.load(name); - else - return null; - } - /** Register that the Type for class is type. */ public static void registerTypeForName(String name, Type type) --- 99,102 ---- *************** *** 171,175 **** } ! type = loadFromClasspath(reflectClass.getName()); if (type != null) return type; --- 144,148 ---- } ! type = lookupType(reflectClass.getName()); if (type != null) return type; |
From: Daniel B. <bo...@us...> - 2004-07-04 02:01:51
|
Update of /cvsroot/nice/Nice/src/nice/tools/code In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27645/src/nice/tools/code Modified Files: TypeImport.java Removed Files: ClassLoader.java Log Message: Remove nice.tools.code.ClassLoader (which was used to load java.util.* classes from a version with type parameter). For now, all imported classes are loaded using reflexion. Index: TypeImport.java =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/code/TypeImport.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TypeImport.java 2 Jul 2004 19:31:03 -0000 1.7 --- TypeImport.java 4 Jul 2004 02:01:42 -0000 1.8 *************** *** 98,110 **** public static Type lookupQualified(String className) { ! Type res = Type.loadFromClasspath(className); if (res != null) return res; Class c = lookupQualifiedJavaClass(className); ! if (c == null) return null; ! return gnu.bytecode.Type.make(c); } --- 98,110 ---- public static Type lookupQualified(String className) { ! Type res = Type.lookupType(className); if (res != null) return res; Class c = lookupQualifiedJavaClass(className); ! if (c == null) return null; ! return gnu.bytecode.Type.make(c); } --- ClassLoader.java DELETED --- |
From: Daniel B. <bo...@us...> - 2004-07-02 23:29:17
|
Update of /cvsroot/nice/Nice/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26559/bin Modified Files: nicec Log Message: Ignore SIGHUP signals, as these seem to terminate the JVM and override the exit status with certain JVM under Emacs. Index: nicec =================================================================== RCS file: /cvsroot/nice/Nice/bin/nicec,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** nicec 29 Jun 2004 18:54:49 -0000 1.38 --- nicec 2 Jul 2004 23:29:08 -0000 1.39 *************** *** 87,89 **** --- 87,94 ---- esac + # Certain JVMs seem to exit by throwing SIGHUP, thus replacing the exit code + # with 129. + # This happens only when running inside Emacs with Sun's 1.4.2_04-b05. + trap "" SIGHUP + exec ${java} $class ${system_args} "$@" |
From: Daniel B. <bo...@us...> - 2004-07-02 23:26:32
|
Update of /cvsroot/nice/Nice/lib/emacs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26041/lib/emacs Modified Files: nice-mode.el Log Message: Print unknow exit status number for debugging. Index: nice-mode.el =================================================================== RCS file: /cvsroot/nice/Nice/lib/emacs/nice-mode.el,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** nice-mode.el 8 Mar 2004 17:49:59 -0000 1.34 --- nice-mode.el 2 Jul 2004 23:26:23 -0000 1.35 *************** *** 557,562 **** ((eq exit-status 2) (save-excursion (next-error) '("error" . "error"))) ((eq exit-status 3) '("successful with warning" . "warning")) ! (t '("Unknown exit status" . "")) ! ) )) --- 557,562 ---- ((eq exit-status 2) (save-excursion (next-error) '("error" . "error"))) ((eq exit-status 3) '("successful with warning" . "warning")) ! (t `(,(concat "Unknown exit status: " (int-to-string exit-status)) . "?")) ! ) )) |
From: Daniel B. <bo...@us...> - 2004-07-02 21:15:12
|
Update of /cvsroot/nice/Nice/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1836/bin Modified Files: nicec.bat Log Message: Set the echo back on at the end, which is useful when nicec is called from another script. Index: nicec.bat =================================================================== RCS file: /cvsroot/nice/Nice/bin/nicec.bat,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** nicec.bat 29 Jun 2004 18:54:49 -0000 1.16 --- nicec.bat 2 Jul 2004 21:15:00 -0000 1.17 *************** *** 19,21 **** :end rem -- clean up a bit ! set NICEPATH= \ No newline at end of file --- 19,22 ---- :end rem -- clean up a bit ! set NICEPATH= ! @echo on \ No newline at end of file |