nice-commit Mailing List for The Nice Programming Language (Page 52)
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: <bo...@us...> - 2004-03-08 18:20:00
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11126 Modified Files: NEWS Log Message: Eclipse 3.0 working... Index: NEWS =================================================================== RCS file: /cvsroot/nice/Nice/NEWS,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** NEWS 5 Mar 2004 16:24:26 -0000 1.28 --- NEWS 8 Mar 2004 18:03:24 -0000 1.29 *************** *** 20,25 **** when one depends on another, both directly and through the default implementation of a method. ! -- nice (0.9.6) --- 20,27 ---- when one depends on another, both directly and through the default implementation of a method. + * The Eclipse plugin now works with Eclipse 3.0 M7 (although 2.1 is still the + preferred version at this point). ! -- Mon, 8 Mar 2004 19:03:15 +0100 nice (0.9.6) |
From: <bo...@us...> - 2004-03-08 18:06:33
|
Update of /cvsroot/nice/Nice/lib/emacs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8150/lib/emacs Modified Files: nice-mode.el Log Message: Make the Emacs mode support whitespace checking. Index: nice-mode.el =================================================================== RCS file: /cvsroot/nice/Nice/lib/emacs/nice-mode.el,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** nice-mode.el 13 Dec 2003 18:28:41 -0000 1.33 --- nice-mode.el 8 Mar 2004 17:49:59 -0000 1.34 *************** *** 442,445 **** --- 442,448 ---- (local-set-key [down-mouse-3] 'nice-files-menu) (local-set-key [help] 'nice-next-error) + ; Declare that it makes sense to look for spurious whitespaces in Nice buffers + (if (boundp 'whitespace-modes) + (setq whitespace-modes (cons 'nice-mode whitespace-modes))) (make-local-variable 'font-lock-defaults) (setq font-lock-defaults |
From: <bo...@us...> - 2004-03-08 16:16:56
|
Update of /cvsroot/nice/eclipse/src/nice/eclipse/core/builder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15529/src/nice/eclipse/core/builder Modified Files: NiceBuilder.nice Log Message: Use the Nice compiler as a Nice package, not as a Java package! Index: NiceBuilder.nice =================================================================== RCS file: /cvsroot/nice/eclipse/src/nice/eclipse/core/builder/NiceBuilder.nice,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** NiceBuilder.nice 8 Mar 2004 15:46:00 -0000 1.4 --- NiceBuilder.nice 8 Mar 2004 16:00:12 -0000 1.5 *************** *** 12,16 **** package nice.eclipse.core.builder; ! class NiceBuilder extends IncrementalProjectBuilder { --- 12,16 ---- package nice.eclipse.core.builder; ! import nice.tools.compiler; class NiceBuilder extends IncrementalProjectBuilder { *************** *** 47,52 **** NICE_MODEL_PROBLEM_MARKER, true, IResource.DEPTH_INFINITE); ! Compilation compilation = ! bossa.modules.fun.createCompilation(embedded); File projectFolder = currentProject.getLocation().toFile(); --- 47,52 ---- NICE_MODEL_PROBLEM_MARKER, true, IResource.DEPTH_INFINITE); ! Compilation compilation = ! new bossa.modules.Compilation(listener: embedded); File projectFolder = currentProject.getLocation().toFile(); *************** *** 66,80 **** compilation.runtimeFile = runtime.getFile(); ! nice.tools.compiler.fun.compile( ! compilation, ! getMainPackageProperty(currentProject), ! null, ! //output, ! null, //native_compiler, ! false //editor ! ); ! ! //int retval = console.statusCode; ! } catch (Exception e) { e.printStackTrace(); --- 66,70 ---- compilation.runtimeFile = runtime.getFile(); ! compile(compilation, getMainPackageProperty(currentProject)); } catch (Exception e) { e.printStackTrace(); |
From: <bo...@us...> - 2004-03-08 16:02:31
|
Update of /cvsroot/nice/eclipse/src/nice/eclipse/core/builder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12266/src/nice/eclipse/core/builder Modified Files: NiceBuilder.nice Log Message: Find the Nice runtime in the plugin, since the default location code cannot work with Eclipse 3.0, since plugins are now inside OSGi bundles. Index: NiceBuilder.nice =================================================================== RCS file: /cvsroot/nice/eclipse/src/nice/eclipse/core/builder/NiceBuilder.nice,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NiceBuilder.nice 23 Feb 2004 17:52:21 -0000 1.3 --- NiceBuilder.nice 8 Mar 2004 15:46:00 -0000 1.4 *************** *** 15,23 **** class NiceBuilder extends IncrementalProjectBuilder { ! IProject currentProject = cast(null); ?IProgressMonitor monitor = cast(null); NiceBuildNotifier notifier = cast(null); ! build(kind, argsMap, aMonitor) { //println("NiceBuilder.build()"); --- 15,23 ---- class NiceBuilder extends IncrementalProjectBuilder { ! IProject currentProject = cast(null); ?IProgressMonitor monitor = cast(null); NiceBuildNotifier notifier = cast(null); ! build(kind, argsMap, aMonitor) { //println("NiceBuilder.build()"); *************** *** 60,63 **** --- 60,69 ---- //println("destinationDir: " + compilation.destinationDir); + // Locate the Nice runtime + java.net.URL runtime = plugin.find(new Path("lib/nice.jar")); + // Eclipse 3.0 puts plugins into OSGi bundles + runtime = Platform.asLocalURL(runtime); + compilation.runtimeFile = runtime.getFile(); + nice.tools.compiler.fun.compile( compilation, |
From: <bo...@us...> - 2004-03-08 14:57:08
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29658 Modified Files: Makefile Log Message: Properly report problems with finding Ant in the classpath and ignore the error now that we also build Nice sources using Ant. Index: Makefile =================================================================== RCS file: /cvsroot/nice/Nice/Makefile,v retrieving revision 1.142 retrieving revision 1.143 diff -C2 -d -r1.142 -r1.143 *** Makefile 4 Mar 2004 10:45:45 -0000 1.142 --- Makefile 8 Mar 2004 14:40:38 -0000 1.143 *************** *** 191,196 **** ant: @echo "Building the Ant task definition..." ! $(NICEC1) --classpath "${ANT_CLASSPATH}" nice.tools.ant ! @${javac} -sourcepath src -classpath "${ANT_CLASSPATH}:./classes:./classes.old" -d classes src/nice/tools/ant/*.java ||\ echo -e "Compilation of the Ant task definition failed.\n NICE_ANTJAR or ANT_HOME should be set, Ant should be in the CLASSPATH or at least linked to by ./external/ant.jar" --- 191,196 ---- ant: @echo "Building the Ant task definition..." ! @$(NICEC1) --classpath "${ANT_CLASSPATH}" nice.tools.ant &&\ ! ${javac} -sourcepath src -classpath "${ANT_CLASSPATH}:./classes:./classes.old" -d classes src/nice/tools/ant/*.java ||\ echo -e "Compilation of the Ant task definition failed.\n NICE_ANTJAR or ANT_HOME should be set, Ant should be in the CLASSPATH or at least linked to by ./external/ant.jar" |
From: <bo...@us...> - 2004-03-05 16:38:41
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2891/src/bossa/syntax Modified Files: NiceMethod.java MethodDeclaration.java Log Message: Global constants and global variables are now initialized in a proper order when one depends on another, both directly and through the default implementation of a method. Index: NiceMethod.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/NiceMethod.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** NiceMethod.java 3 Mar 2004 12:37:52 -0000 1.32 --- NiceMethod.java 5 Mar 2004 16:24:26 -0000 1.33 *************** *** 360,363 **** --- 360,377 ---- implementation.innerTypecheck(); } + + protected gnu.expr.Expression computeCode() + { + // We need to store the result before compiling the implementation. + code = super.computeCode(); + + // Compile the implementation before returning. This is used to detect + // dependencies between global variables through default method + // implementations, so that the global variables can be initialized in + // the proper order. + implementation.getRefExp(); + + return code; + } } } Index: MethodDeclaration.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/MethodDeclaration.java,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** MethodDeclaration.java 28 Feb 2004 14:23:43 -0000 1.55 --- MethodDeclaration.java 5 Mar 2004 16:24:26 -0000 1.56 *************** *** 427,431 **** public static final char methodListSeparator = ';'; ! private gnu.expr.Expression code; protected abstract gnu.expr.Expression computeCode(); --- 427,431 ---- public static final char methodListSeparator = ';'; ! gnu.expr.Expression code; protected abstract gnu.expr.Expression computeCode(); |
From: <bo...@us...> - 2004-03-05 16:38:41
|
Update of /cvsroot/nice/Nice/testsuite/compiler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2891/testsuite/compiler Modified Files: globalVariables.testsuite Log Message: Global constants and global variables are now initialized in a proper order when one depends on another, both directly and through the default implementation of a method. Index: globalVariables.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/globalVariables.testsuite,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** globalVariables.testsuite 5 Mar 2004 14:07:13 -0000 1.15 --- globalVariables.testsuite 5 Mar 2004 16:24:25 -0000 1.16 *************** *** 152,155 **** --- 152,164 ---- let String s1 = "1"; + /// PASS + assert isFoo; + /// Toplevel + var boolean isFoo = computeFoo(); + + var java.io.File f = new java.io.File("foo"); + + boolean computeFoo() = f.getPath().equals("foo"); + /// FAIL /// Toplevel |
From: <bo...@us...> - 2004-03-05 16:38:38
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2891 Modified Files: NEWS Log Message: Global constants and global variables are now initialized in a proper order when one depends on another, both directly and through the default implementation of a method. Index: NEWS =================================================================== RCS file: /cvsroot/nice/Nice/NEWS,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** NEWS 3 Mar 2004 15:42:29 -0000 1.27 --- NEWS 5 Mar 2004 16:24:26 -0000 1.28 *************** *** 17,20 **** --- 17,23 ---- Individual methods can be treated specially by retyping them. * The 'Any' keyword is now deprecated. + * Global constants and global variables are now initialized in a proper order + when one depends on another, both directly and through the default + implementation of a method. -- |
From: <bo...@us...> - 2004-03-05 14:21:24
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4983/src/bossa/syntax Modified Files: Module.java GlobalVarDeclaration.java EnumDefinition.java AST.java Log Message: Compile global variables lazily, so that all direct dependencies are handled correctly (not just one level of dependency). Index: Module.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Module.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Module.java 27 Nov 2003 14:57:56 -0000 1.19 --- Module.java 5 Mar 2004 14:07:14 -0000 1.20 *************** *** 31,35 **** gnu.bytecode.ClassType createClass(String name); ! gnu.expr.Declaration addGlobalVar(String name, gnu.bytecode.Type type, boolean constant); gnu.expr.Expression getDispatchMethod(NiceMethod def); gnu.expr.ReferenceExp addMethod(gnu.expr.LambdaExp method, --- 31,35 ---- gnu.bytecode.ClassType createClass(String name); ! void addGlobalVar(gnu.expr.Declaration declaration, boolean constant); gnu.expr.Expression getDispatchMethod(NiceMethod def); gnu.expr.ReferenceExp addMethod(gnu.expr.LambdaExp method, Index: GlobalVarDeclaration.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/GlobalVarDeclaration.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** GlobalVarDeclaration.java 15 Dec 2003 14:04:13 -0000 1.22 --- GlobalVarDeclaration.java 5 Mar 2004 14:07:14 -0000 1.23 *************** *** 26,30 **** @version $Date$ ! @author Daniel Bonniot (d.b...@ma...) */ public class GlobalVarDeclaration extends Definition --- 26,30 ---- @version $Date$ ! @author Daniel Bonniot (bo...@us...) */ public class GlobalVarDeclaration extends Definition *************** *** 63,71 **** if (res == null) { ! res = module.addGlobalVar ! (left.name.toString(), ! nice.tools.code.Types.javaType(left.type), ! constant); setDeclaration(res); } --- 63,78 ---- if (res == null) { ! res = new gnu.expr.Declaration ! (name.toString(), nice.tools.code.Types.javaType(type)); setDeclaration(res); + + if (! inInterfaceFile()) + { + // Compute the value first, which might use another global value, + // which will then be properly initialized before use. + res.noteValue(GlobalVarDeclaration.this.compileValue()); + } + + module.addGlobalVar(res, constant); } *************** *** 128,146 **** ****************************************************************/ ! public void precompile() { ! // Compute the value first, and this might use another global value, ! // which will then be properly initialized before use. ! gnu.expr.Expression value = ! this.value != null ? this.value.compile() : null; ! ! gnu.expr.Declaration declaration = left.getDeclaration(); ! if (constant) declaration.setFlag(Declaration.IS_CONSTANT); ! ! declaration.noteValue(value); } ! public void compile() { } --- 135,147 ---- ****************************************************************/ ! public void compile() { ! left.getDeclaration(); } ! private gnu.expr.Expression compileValue() { + return + this.value != null ? this.value.compile() : null; } Index: EnumDefinition.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/EnumDefinition.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** EnumDefinition.java 16 Jan 2004 00:14:07 -0000 1.9 --- EnumDefinition.java 5 Mar 2004 14:07:14 -0000 1.10 *************** *** 122,127 **** if (res == null) { ! res = module.addGlobalVar(name.toString(), Types.javaType(type), true); setDeclaration(res); } --- 122,129 ---- if (res == null) { ! res = new gnu.expr.Declaration ! (name.toString(), Types.javaType(type)); setDeclaration(res); + module.addGlobalVar(res, true); } Index: AST.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/AST.java,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** AST.java 28 Feb 2004 14:23:43 -0000 1.57 --- AST.java 5 Mar 2004 14:07:14 -0000 1.58 *************** *** 213,220 **** // dependencies, and initialize them in the right order. for (int i = 0; i < globals.length; i++) ! globals[i].precompile(); ! for(Iterator i = children.iterator();i.hasNext();) ! ((Definition)i.next()).compile(); } } --- 213,220 ---- // dependencies, and initialize them in the right order. for (int i = 0; i < globals.length; i++) ! globals[i].compile(); ! for (Iterator i = children.iterator();i.hasNext();) ! ((Definition) i.next()).compile(); } } |
From: <bo...@us...> - 2004-03-05 14:21:23
|
Update of /cvsroot/nice/Nice/src/bossa/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4983/src/bossa/modules Modified Files: Package.java Log Message: Compile global variables lazily, so that all direct dependencies are handled correctly (not just one level of dependency). Index: Package.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/modules/Package.java,v retrieving revision 1.113 retrieving revision 1.114 diff -C2 -d -r1.113 -r1.114 *** Package.java 25 Feb 2004 14:23:20 -0000 1.113 --- Package.java 5 Mar 2004 14:07:14 -0000 1.114 *************** *** 639,665 **** } ! public gnu.expr.Declaration addGlobalVar(String name, Type type, boolean constant) { - gnu.expr.Declaration declaration = new gnu.expr.Declaration(name, type); - if (!compiling()) // The code is already there { ! declaration.setSimple(false); ! declaration.field = source.getBytecode().getField(name); ! if (declaration.field == null) Internal.error(this, ! "The compiled file is not consistant with the interface file for global variable " + name); } else { ! getImplementationClass().addDeclaration(declaration); ! if (constant) declaration.setFlag(Declaration.IS_CONSTANT); ! declaration.setFlag(Declaration.STATIC_SPECIFIED|Declaration.TYPE_SPECIFIED); } - - return declaration; } --- 639,662 ---- } ! public void addGlobalVar(gnu.expr.Declaration decl, ! boolean constant) { if (!compiling()) // The code is already there { ! decl.setSimple(false); ! decl.field = source.getBytecode().getField(decl.getName()); ! if (decl.field == null) Internal.error(this, ! "The compiled file is not consistant with the interface file for global variable " + decl.getName()); } else { ! getImplementationClass().addDeclaration(decl); ! if (constant) decl.setFlag(Declaration.IS_CONSTANT); ! decl.setFlag(Declaration.STATIC_SPECIFIED|Declaration.TYPE_SPECIFIED); } } |
From: <bo...@us...> - 2004-03-05 14:21:21
|
Update of /cvsroot/nice/Nice/testsuite/compiler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4983/testsuite/compiler Modified Files: globalVariables.testsuite Log Message: Compile global variables lazily, so that all direct dependencies are handled correctly (not just one level of dependency). Index: globalVariables.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/globalVariables.testsuite,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** globalVariables.testsuite 30 Nov 2003 14:24:34 -0000 1.14 --- globalVariables.testsuite 5 Mar 2004 14:07:13 -0000 1.15 *************** *** 144,147 **** --- 144,155 ---- class QualifiedName { String a; String b; } + /// PASS + assert s4.equals("1234"); + /// Toplevel + let String s4 = s3 + "4"; + let String s3 = s2 + "3"; + let String s2 = s1 + "2"; + let String s1 = "1"; + /// FAIL /// Toplevel |
From: <bo...@us...> - 2004-03-04 16:01:46
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4886/src/bossa/syntax Modified Files: NiceClass.java Log Message: Use the type parameter list, not the binders list, when constructing constructors based on parent constructors (fixes #892041). Index: NiceClass.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/NiceClass.java,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** NiceClass.java 4 Mar 2004 12:56:28 -0000 1.79 --- NiceClass.java 4 Mar 2004 15:48:21 -0000 1.80 *************** *** 690,698 **** private List getParentConstructorParameters ! (List constraints, TypeSymbol[] binders) { TypeScope scope = Node.getGlobalTypeScope(); Map map = null; ! if (binders != null) { // Constructs a type scope that maps the type parameters of this --- 690,698 ---- private List getParentConstructorParameters ! (List constraints, mlsub.typing.Monotype[] typeParameters) { TypeScope scope = Node.getGlobalTypeScope(); Map map = null; ! if (typeParameters != null) { // Constructs a type scope that maps the type parameters of this *************** *** 700,708 **** scope = new TypeScope(scope); map = new HashMap(); ! TypeSymbol[] ourBinders = definition.getBinders(); ! for (int i = 0; i < binders.length; i++) try { ! scope.addMapping(ourBinders[i].toString(), binders[i]); ! map.put(ourBinders[i], binders[i]); } catch(TypeScope.DuplicateName e) {} } --- 700,711 ---- scope = new TypeScope(scope); map = new HashMap(); ! mlsub.typing.Monotype[] ourTypeParameters = ! definition.getTypeParameters(); ! for (int i = 0; i < ourTypeParameters.length; i++) try { ! TypeSymbol ourSym = asTypeSymbol(ourTypeParameters[i]); ! TypeSymbol sym = asTypeSymbol(typeParameters[i]); ! scope.addMapping(ourSym.toString(), sym); ! map.put(ourSym, sym); } catch(TypeScope.DuplicateName e) {} } *************** *** 734,738 **** } ! private List getConstructorParameters(List constraints, TypeSymbol[] binders) { TypeConstructor supTC = definition.getSuperClass(); --- 737,750 ---- } ! private TypeSymbol asTypeSymbol(mlsub.typing.Monotype type) ! { ! if (type instanceof TypeSymbol) ! return (TypeSymbol) type; ! else ! return ((MonotypeConstructor) type).getTC(); ! } ! ! private List getConstructorParameters(List constraints, ! mlsub.typing.Monotype[] typeParameters) { TypeConstructor supTC = definition.getSuperClass(); *************** *** 743,747 **** res = getNativeConstructorParameters(supTC, constraints); else ! res = sup.getParentConstructorParameters(constraints, binders); if (overrides.length > 0) --- 755,759 ---- res = getNativeConstructorParameters(supTC, constraints); else ! res = sup.getParentConstructorParameters(constraints, typeParameters); if (overrides.length > 0) *************** *** 807,811 **** constraints = new LinkedList(); ! List allConstructorParams = getConstructorParameters(constraints, binders); Constraint cst; --- 819,826 ---- constraints = new LinkedList(); ! mlsub.typing.Monotype[] typeParameters = definition.getTypeParameters(); ! ! List allConstructorParams = ! getConstructorParameters(constraints, typeParameters); Constraint cst; |
From: <bo...@us...> - 2004-03-04 16:01:46
|
Update of /cvsroot/nice/Nice/testsuite/compiler/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4886/testsuite/compiler/classes Modified Files: typeParameters.testsuite Log Message: Use the type parameter list, not the binders list, when constructing constructors based on parent constructors (fixes #892041). Index: typeParameters.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/classes/typeParameters.testsuite,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** typeParameters.testsuite 15 Jan 2004 21:39:19 -0000 1.15 --- typeParameters.testsuite 4 Mar 2004 15:48:20 -0000 1.16 *************** *** 283,284 **** --- 283,302 ---- <A SomeA> class AWrapper<SomeA> { } + + /// PASS + Translated<SimpleShape<void>> t = new Translated(someShape: new SimpleShape()); + /// Toplevel + abstract class Shape<T> {} + + class SimpleShape<T> extends Shape<T> {} + + <Shape S, ST, T | S<ST> <: T <: S<ST> > + class Translated<T> extends Shape { + T someShape; + } + + /// PASS + /// Toplevel + class A<T> {} + + <String S> class B<S> extends A<S> {} |
From: <bo...@us...> - 2004-03-04 13:09:51
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31840/src/bossa/syntax Modified Files: NiceClass.java Log Message: Mino: removed unused parameter. Index: NiceClass.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/NiceClass.java,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** NiceClass.java 25 Feb 2004 11:23:29 -0000 1.78 --- NiceClass.java 4 Mar 2004 12:56:28 -0000 1.79 *************** *** 661,665 **** */ private static List getNativeConstructorParameters ! (TypeConstructor tc, List constraints, TypeSymbol[] binders) { List constructors = TypeConstructors.getConstructors(tc); --- 661,665 ---- */ private static List getNativeConstructorParameters ! (TypeConstructor tc, List constraints) { List constructors = TypeConstructors.getConstructors(tc); *************** *** 741,745 **** List res; if (sup == null) ! res = getNativeConstructorParameters(supTC, constraints, binders); else res = sup.getParentConstructorParameters(constraints, binders); --- 741,745 ---- List res; if (sup == null) ! res = getNativeConstructorParameters(supTC, constraints); else res = sup.getParentConstructorParameters(constraints, binders); |
From: <bo...@us...> - 2004-03-04 10:59:14
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7614 Modified Files: Makefile Log Message: Delete links and cleanup bootstrap files in the clean target to really end-up with a clean tree. Index: Makefile =================================================================== RCS file: /cvsroot/nice/Nice/Makefile,v retrieving revision 1.141 retrieving revision 1.142 diff -C2 -d -r1.141 -r1.142 *** Makefile 2 Mar 2004 21:44:28 -0000 1.141 --- Makefile 4 Mar 2004 10:45:45 -0000 1.142 *************** *** 128,132 **** clean: rm -f src/nice/tools/compiler/console.jar ! -rm -rf classes classes-inline share/java src/bossa/parser/{Parse*.java,Token*.java,*CharStream.java} find "${TOP}" \( -name "*.class" -o -name "*.nicei" -o -name "*~" \) -exec rm {} \; --- 128,134 ---- clean: rm -f src/nice/tools/compiler/console.jar ! rm -rf classes classes-inline share/java src/bossa/parser/{Parse*.java,Token*.java,*CharStream.java} ! rm -f bin/{nicedoc,niceunit} ! [ -r src/bossa/syntax/dispatch.java ] && mv src/bossa/syntax/dispatch.java src/bossa/syntax/dispatch.java.bootstrap || true find "${TOP}" \( -name "*.class" -o -name "*.nicei" -o -name "*~" \) -exec rm {} \; |
From: <bo...@us...> - 2004-03-04 10:53:44
|
Update of /cvsroot/nice/Nice/debian In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6773/debian Modified Files: control Log Message: Require jikes-classpath, since we use it explicitly for the build. Index: control =================================================================== RCS file: /cvsroot/nice/Nice/debian/control,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** control 20 Feb 2004 15:32:49 -0000 1.17 --- control 4 Mar 2004 10:40:29 -0000 1.18 *************** *** 3,7 **** Priority: optional Maintainer: Daniel Bonniot <bo...@us...> ! Build-Depends-Indep: debhelper (>> 3.0.0), jikes-classpath (>= 1:1.18) | java-compiler, kaffe (>= 1:1.1.1), javacc, groff, libant1.5-java Standards-Version: 3.6.1 --- 3,7 ---- Priority: optional Maintainer: Daniel Bonniot <bo...@us...> ! Build-Depends-Indep: debhelper (>> 3.0.0), jikes-classpath (>= 1:1.18), kaffe (>= 1:1.1.1), javacc, groff, libant1.5-java Standards-Version: 3.6.1 |
From: <bo...@us...> - 2004-03-03 15:55:11
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9467 Modified Files: NEWS Log Message: Method overrides. Index: NEWS =================================================================== RCS file: /cvsroot/nice/Nice/NEWS,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** NEWS 1 Mar 2004 16:04:18 -0000 1.26 --- NEWS 3 Mar 2004 15:42:29 -0000 1.27 *************** *** 1,4 **** --- 1,15 ---- nice (0.9.7) + * Methods can be overriden using the override keyword: + class A { + A doSomething() { ... } + } + class B extends A { + override B doSomething() { ... } + } + An important aspect is that the return type can be more precise than the + original type (covariance). + Overriding without the override keyword (a la Java) is accepted but + generates a warning. * When importing a java package, it is possible to specify that its methods do not accept null arguments: |
From: <bo...@us...> - 2004-03-03 15:13:11
|
Update of /cvsroot/nice/Nice/src/bossa/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv948/src/bossa/parser Modified Files: Parser.jj Log Message: Remove unsupported syntax from the lookahead for method bodies. Index: Parser.jj =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v retrieving revision 1.243 retrieving revision 1.244 diff -C2 -d -r1.243 -r1.244 *** Parser.jj 3 Mar 2004 14:13:58 -0000 1.243 --- Parser.jj 3 Mar 2004 15:00:33 -0000 1.244 *************** *** 1312,1316 **** {} { ! [ "<" strings() ">" ] identOrBackquoted() [ "<" strings() ">" ] "(" } --- 1312,1316 ---- {} { ! [ "<" strings() ">" ] identOrBackquoted() "(" } |
From: <bo...@us...> - 2004-03-03 14:26:33
|
Update of /cvsroot/nice/Nice/src/bossa/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23158/src/bossa/parser Modified Files: Parser.jj Log Message: Allow 'override' in front of method implementations inside classes. Index: Parser.jj =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v retrieving revision 1.242 retrieving revision 1.243 diff -C2 -d -r1.242 -r1.243 *** Parser.jj 2 Mar 2004 16:02:44 -0000 1.242 --- Parser.jj 3 Mar 2004 14:13:58 -0000 1.243 *************** *** 892,896 **** } ! Definition internalMethodOrFunction(MethodContainer c): { LocatedString name; --- 892,896 ---- } ! Definition internalMethodOrFunction(MethodContainer c, boolean isOverride): { LocatedString name; *************** *** 901,908 **** Contract contract; List statements = new LinkedList(); - boolean isOverride = false; } { - [ "override" { isOverride = true; } ] cst=constraint() returnType=monotype() --- 901,906 ---- *************** *** 1044,1049 **** LOOKAHEAD( getField(null, null) ) overrides = getField(impl, fields, overrides, storeDocString) ! | { Definition m; Token t = getToken(1); } [ "public" | "private" ] ( LOOKAHEAD( methodBodyDefinitionLookahead() ) --- 1042,1048 ---- LOOKAHEAD( getField(null, null) ) overrides = getField(impl, fields, overrides, storeDocString) ! | { Definition m; Token t = getToken(1); boolean isOverride = false; } [ "public" | "private" ] + [ "override" { isOverride = true; } ] ( LOOKAHEAD( methodBodyDefinitionLookahead() ) *************** *** 1051,1055 **** { definitions.add(m); } | ! m = internalMethodOrFunction(res) { if (methods == null) --- 1050,1054 ---- { definitions.add(m); } | ! m = internalMethodOrFunction(res, isOverride) { if (methods == null) *************** *** 1126,1130 **** { Definition m; } [ "public" | "private" ] ! m = internalMethodOrFunction(res) { res.addMethod(m); } )* --- 1125,1129 ---- { Definition m; } [ "public" | "private" ] ! m = internalMethodOrFunction(res, false) { res.addMethod(m); } )* |
From: <bo...@us...> - 2004-03-03 12:50:25
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4158/src/bossa/syntax Modified Files: NiceMethod.java Log Message: Print a warning when a method does an implicit override. Index: NiceMethod.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/NiceMethod.java,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** NiceMethod.java 3 Mar 2004 09:40:27 -0000 1.31 --- NiceMethod.java 3 Mar 2004 12:37:52 -0000 1.32 *************** *** 169,172 **** --- 169,188 ---- User.error(this, "This method does not override any other method"); + if (! inInterfaceFile() && ! isOverride && specializedMethods != null) + { + MethodDeclaration parent = + (MethodDeclaration) specializedMethods.get(0); + boolean sameResult = + getReturnType().toString().equals(parent.getReturnType().toString()); + + if (sameResult) + User.warning(this, "This method overrides " + parent + + "\nYou should make this explicit, either by omitting the return type" + + "\nor by using the 'override' keyword"); + else + User.warning(this, "This method overrides " + parent + + "\nYou should make this explicit by using the 'override' keyword"); + } + super.typedResolve(); } |
From: <bo...@us...> - 2004-03-03 09:52:53
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6419/src/bossa/syntax Modified Files: NiceMethod.java Log Message: Report an error if a method pretends to be an override but is not. Index: NiceMethod.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/NiceMethod.java,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** NiceMethod.java 2 Mar 2004 16:02:44 -0000 1.30 --- NiceMethod.java 3 Mar 2004 09:40:27 -0000 1.31 *************** *** 166,169 **** --- 166,172 ---- findSpecializedMethods(); + if (isOverride && specializedMethods == null) + User.error(this, "This method does not override any other method"); + super.typedResolve(); } |
From: <bo...@us...> - 2004-03-03 09:52:53
|
Update of /cvsroot/nice/Nice/testsuite/compiler/methods In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6419/testsuite/compiler/methods Modified Files: overriding.testsuite Log Message: Report an error if a method pretends to be an override but is not. Index: overriding.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/methods/overriding.testsuite,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** overriding.testsuite 2 Mar 2004 16:02:44 -0000 1.4 --- overriding.testsuite 3 Mar 2004 09:40:26 -0000 1.5 *************** *** 178,179 **** --- 178,186 ---- <T, T1, T2 | T1 <: T, T2 <: T> A<T> foo(A<T1> a1, A<T2> a2); <U, U1, U2 | U1 <: U, U2 <: U> B<U> foo(B<U1> a1, B<U2> a2) = new B(); + + /// FAIL + /// Toplevel + class A {} + class B {} + void foo(A a) {} + override void foo(B b) {} |
From: <bo...@us...> - 2004-03-02 21:56:33
|
Update of /cvsroot/nice/Nice/src/nice/tools/testsuite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8812/src/nice/tools/testsuite Modified Files: TestNice.java Log Message: Make the testsuite enable assertions, so that they don't have to bet set externally when starting the JVM that will run the testsuite. Index: TestNice.java =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/testsuite/TestNice.java,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** TestNice.java 26 Jan 2004 12:42:44 -0000 1.29 --- TestNice.java 2 Mar 2004 21:44:27 -0000 1.30 *************** *** 546,550 **** File[] dirs = { getTempFolder(), new File(getRuntime()) }; ! return new nice.tools.util.DirectoryClassLoader(dirs, null); } --- 546,557 ---- File[] dirs = { getTempFolder(), new File(getRuntime()) }; ! ClassLoader res = new nice.tools.util.DirectoryClassLoader(dirs, null); ! try { ! nice.tools.util.JDK.setDefaultAssertionStatus(res, true); ! } ! catch(java.lang.reflect.InvocationTargetException e) { ! System.out.println("WARNING: could not enable assertions"); ! } ! return res; } |
From: <bo...@us...> - 2004-03-02 21:56:32
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8812 Modified Files: Makefile Log Message: Make the testsuite enable assertions, so that they don't have to bet set externally when starting the JVM that will run the testsuite. Index: Makefile =================================================================== RCS file: /cvsroot/nice/Nice/Makefile,v retrieving revision 1.140 retrieving revision 1.141 diff -C2 -d -r1.140 -r1.141 *** Makefile 21 Feb 2004 14:53:14 -0000 1.140 --- Makefile 2 Mar 2004 21:44:28 -0000 1.141 *************** *** 105,120 **** check: ! if [ `${java} -h 2>&1 | grep -- -enableassertions | wc -l` = 0 ]; then\ ! /usr/bin/time ${java} -Dassertions=true -classpath "classes" nice.tools.testsuite.TestNice testsuite; \ ! else \ ! /usr/bin/time ${java} -enableassertions -classpath "classes" nice.tools.testsuite.TestNice testsuite; \ ! fi check_lib: ! if [ `${java} -h 2>&1 | grep -- -enableassertions | wc -l` = 0 ]; then\ ! /usr/bin/time ${java} -Dassertions=true -classpath "classes" nice.tools.testsuite.TestNice testsuite/lib; \ ! else \ ! /usr/bin/time ${java} -enableassertions -classpath "classes" nice.tools.testsuite.TestNice testsuite/lib; \ ! fi .PHONY: coverage --- 105,112 ---- check: ! /usr/bin/time ${java} -classpath "classes" nice.tools.testsuite.TestNice testsuite check_lib: ! /usr/bin/time ${java} -Dassertions=true -classpath "classes" nice.tools.testsuite.TestNice testsuite/lib .PHONY: coverage |
From: <ar...@us...> - 2004-03-02 20:33:12
|
Update of /cvsroot/nice/Nice/src/gnu/bytecode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22004/F:/nice/src/gnu/bytecode Modified Files: Method.java Log Message: Throw an error when generating code for an abstract method. Index: Method.java =================================================================== RCS file: /cvsroot/nice/Nice/src/gnu/bytecode/Method.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Method.java 24 Feb 2004 14:05:47 -0000 1.8 --- Method.java 2 Mar 2004 20:21:11 -0000 1.9 *************** *** 175,178 **** --- 175,181 ---- void prepareCode(int max_size) { + if (isAbstract()) + throw new Error("generating code for an abstract method: " + toString()); + if (code == null) code = new CodeAttr(this); |