nice-commit Mailing List for The Nice Programming Language (Page 75)
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...> - 2003-11-21 16:05:17
|
Update of /cvsroot/nice/Nice/debian In directory sc8-pr-cvs1:/tmp/cvs-serv23733/debian Modified Files: changelog Log Message: String concatenation can be performed by mere juxtaposition of string literals and simple expressions, which are converted into strings. For instance: println("x has value "x" and y has value "y); Index: changelog =================================================================== RCS file: /cvsroot/nice/Nice/debian/changelog,v retrieving revision 1.226 retrieving revision 1.227 diff -C2 -d -r1.226 -r1.227 *** changelog 19 Nov 2003 23:22:51 -0000 1.226 --- changelog 21 Nov 2003 16:05:14 -0000 1.227 *************** *** 1,2 **** --- 1,11 ---- + nice (0.9.5) unstable; urgency=low + + * String concatenation can be performed by mere juxtaposition of string + literals and simple expressions, which are converted into strings. For + instance: + println("x has value "x" and y has value "y); + + -- + nice (0.9.4) unstable; urgency=low |
From: <bo...@us...> - 2003-11-21 16:05:17
|
Update of /cvsroot/nice/Nice/src/bossa/parser In directory sc8-pr-cvs1:/tmp/cvs-serv23733/src/bossa/parser Modified Files: Parser.jj Log Message: String concatenation can be performed by mere juxtaposition of string literals and simple expressions, which are converted into strings. For instance: println("x has value "x" and y has value "y); Index: Parser.jj =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v retrieving revision 1.214 retrieving revision 1.215 diff -C2 -d -r1.214 -r1.215 *** Parser.jj 19 Nov 2003 15:25:36 -0000 1.214 --- Parser.jj 21 Nov 2003 16:05:14 -0000 1.215 *************** *** 48,51 **** --- 48,55 ---- return symb(t.image,t); } + private static IdentExp symb(String name, Location loc) + { + return new IdentExp(new LocatedString(name, loc)); + } static List globalDefinitions; } *************** *** 2099,2102 **** --- 2103,2115 ---- } + // The expressions that can follow a string literal, to be concatenated with it + Expression StringLiteralSuffixExpression() : + { Expression res; } + { + res=identExp() + ( LOOKAHEAD(2) res=PrimarySuffix(res) )* + { return res; } + } + Expression Literal() : { *************** *** 2111,2114 **** --- 2124,2133 ---- | res=charConstantExp() | res=stringConstantExp() + ( {Expression e;} e=StringLiteralSuffixExpression() + { res = CallExp.create(symb("+", e.location()), res, e); } + [ e=stringConstantExp() + { res = CallExp.create(symb("+", e.location()), res, e); } + ] + )* | res=multiLineStringExp() ) |
From: <bo...@us...> - 2003-11-21 16:05:16
|
Update of /cvsroot/nice/Nice/testsuite/compiler/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv23733/testsuite/compiler/syntax Added Files: strings.testsuite Log Message: String concatenation can be performed by mere juxtaposition of string literals and simple expressions, which are converted into strings. For instance: println("x has value "x" and y has value "y); --- NEW FILE: strings.testsuite --- /// PASS String s = "ABC"; assert s.equals("ABC"); int x = 5; s = "x="x; assert s.equals("x=5"); List<int> l = new LinkedList(); s = "l has length " l.size; assert s.equals("l has length 0"); |
From: <bo...@us...> - 2003-11-21 15:09:48
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv11043/src/bossa/syntax Modified Files: typecheck.nice Log Message: Optimization, and added comment. Index: typecheck.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/typecheck.nice,v retrieving revision 1.87 retrieving revision 1.88 diff -C2 -d -r1.87 -r1.88 *** typecheck.nice 21 Nov 2003 14:41:40 -0000 1.87 --- typecheck.nice 21 Nov 2003 15:09:42 -0000 1.88 *************** *** 451,454 **** --- 451,455 ---- var Stack<List<(MonoSymbol, mlsub.typing.Monotype)>> replacedTypes = new Stack(); + /** @return true if exitClosure should be called. */ boolean enterClosure() { *************** *** 456,464 **** return false; ! List<(MonoSymbol, mlsub.typing.Monotype)> replaced = new ArrayList(); ! //set all for all variables the original type back and store it for (int i = levels.size(); i-- > 0;) { ! (MonoSymbol variable, mlsub.typing.Monotype type) = conditionalTypes.get(i); replaced.add((variable, variable.type)); variable.type = type; --- 457,467 ---- return false; ! List<(MonoSymbol, mlsub.typing.Monotype)> replaced = ! new ArrayList(levels.size()); ! ! // for all variables, set the original type back and store it for (int i = levels.size(); i-- > 0;) { ! (MonoSymbol variable, mlsub.typing.Monotype type) = conditionalTypes[i]; replaced.add((variable, variable.type)); variable.type = type; |
From: <ar...@us...> - 2003-11-21 14:41:44
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv4821/F:/nice/src/bossa/syntax Modified Files: typecheck.nice Log Message: optimized type checking in closures. Index: typecheck.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/typecheck.nice,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** typecheck.nice 21 Nov 2003 00:43:05 -0000 1.86 --- typecheck.nice 21 Nov 2003 14:41:40 -0000 1.87 *************** *** 227,236 **** Node.setCurrentFunction(e); ! enterClosure(); try { typecheck(e.body); } finally { ! exitClosure(); } --- 227,237 ---- Node.setCurrentFunction(e); ! let needExit = enterClosure(); try { typecheck(e.body); } finally { ! if (needExit) ! exitClosure(); } *************** *** 450,467 **** var Stack<List<(MonoSymbol, mlsub.typing.Monotype)>> replacedTypes = new Stack(); ! void enterClosure() { ! Set<MonoSymbol> done = new HashSet(); List<(MonoSymbol, mlsub.typing.Monotype)> replaced = new ArrayList(); //set all for all variables the original type back and store it ! for (int i = 0; i < levels.size(); i++) { (MonoSymbol variable, mlsub.typing.Monotype type) = conditionalTypes.get(i); ! if (!done.contains(variable)) ! { ! replaced.add((variable, variable.type)); ! variable.type = type; ! done.add(variable); ! } } --- 451,466 ---- var Stack<List<(MonoSymbol, mlsub.typing.Monotype)>> replacedTypes = new Stack(); ! boolean enterClosure() { ! if (levels.isEmpty()) ! return false; ! List<(MonoSymbol, mlsub.typing.Monotype)> replaced = new ArrayList(); //set all for all variables the original type back and store it ! for (int i = levels.size(); i-- > 0;) { (MonoSymbol variable, mlsub.typing.Monotype type) = conditionalTypes.get(i); ! replaced.add((variable, variable.type)); ! variable.type = type; } *************** *** 470,473 **** --- 469,474 ---- levels = new Stack(); conditionalTypes = new Stack(); + + return true; } |
From: <ar...@us...> - 2003-11-21 13:03:40
|
Update of /cvsroot/nice/Nice/testsuite/compiler/typing In directory sc8-pr-cvs1:/tmp/cvs-serv19991/F:/nice/testsuite/compiler/typing Modified Files: instanceof.testsuite Log Message: additional testcase for typing in closures. Index: instanceof.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/typing/instanceof.testsuite,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** instanceof.testsuite 21 Nov 2003 00:43:05 -0000 1.12 --- instanceof.testsuite 21 Nov 2003 13:03:38 -0000 1.13 *************** *** 247,248 **** --- 247,260 ---- int x = a.life; } + + /// FAIL + A a = new C(); + if (a instanceof B) { + if (a instanceof C) { + void->void f = () => {a = new A(); }; + + int x = a./* /// FAIL HERE */life; + } + } + /// Toplevel + class C extends B {} |
From: <bo...@us...> - 2003-11-21 08:55:23
|
Update of /cvsroot/nice/Nice/web In directory sc8-pr-cvs1:/tmp/cvs-serv13298/web Modified Files: .htaccess Log Message: Released 0.9.4 Index: .htaccess =================================================================== RCS file: /cvsroot/nice/Nice/web/.htaccess,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** .htaccess 28 Oct 2003 10:37:50 -0000 1.13 --- .htaccess 21 Nov 2003 08:55:20 -0000 1.14 *************** *** 1,5 **** Redirect /Wiki http://nice.sourceforge.net/cgi-bin/twiki/view ! Redirect /Nice.tar http://prdownloads.sourceforge.net/nice/Nice-0.9.3-unix.tar.gz ! Redirect /Nice.zip http://prdownloads.sourceforge.net/nice/Nice-0.9.3-windows.zip ! Redirect /nice.deb http://prdownloads.sourceforge.net/nice/nice_0.9.3_all.deb ! Redirect /nice.rpm http://prdownloads.sourceforge.net/nice/Nice-0.9.3-1.noarch.rpm --- 1,5 ---- Redirect /Wiki http://nice.sourceforge.net/cgi-bin/twiki/view ! Redirect /Nice.tar http://prdownloads.sourceforge.net/nice/Nice-0.9.4-unix.tar.gz ! Redirect /Nice.zip http://prdownloads.sourceforge.net/nice/Nice-0.9.4-windows.zip ! Redirect /nice.deb http://prdownloads.sourceforge.net/nice/nice_0.9.4_all.deb ! Redirect /nice.rpm http://prdownloads.sourceforge.net/nice/Nice-0.9.4-1.noarch.rpm |
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv6307/F:/nice/src/bossa/syntax Modified Files: Arguments.java MethodDeclaration.java NiceClass.java NiceFieldAccess.java RetypedJavaMethod.java Statement.java Log Message: Removed some useless code. Index: Arguments.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Arguments.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Arguments.java 11 Aug 2003 19:31:31 -0000 1.19 --- Arguments.java 21 Nov 2003 08:09:58 -0000 1.20 *************** *** 273,277 **** if (param instanceof FormalParameters.NamedParameter) { - FormalParameters.NamedParameter namedParam = (FormalParameters.NamedParameter)param; for (int i = 0; i < arguments.length; i++) if (arguments[i].name != null) --- 273,276 ---- Index: MethodDeclaration.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/MethodDeclaration.java,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** MethodDeclaration.java 7 Nov 2003 23:34:19 -0000 1.49 --- MethodDeclaration.java 21 Nov 2003 08:09:58 -0000 1.50 *************** *** 121,129 **** } - public String getSyntacticReturnType() - { - return String.valueOf(getReturnType()); - } - boolean isIgnored() { --- 121,124 ---- *************** *** 251,255 **** (syntacticConstraint != null ? syntacticConstraint : Constraint.toString(getType().getConstraint())) ! + getSyntacticReturnType() + " " + getName().toQuotedString() --- 246,250 ---- (syntacticConstraint != null ? syntacticConstraint : Constraint.toString(getType().getConstraint())) ! + String.valueOf(getReturnType()) + " " + getName().toQuotedString() Index: NiceClass.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/NiceClass.java,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** NiceClass.java 15 Nov 2003 17:25:47 -0000 1.65 --- NiceClass.java 21 Nov 2003 08:09:58 -0000 1.66 *************** *** 597,601 **** mlsub.typing.TypeSymbol[] ourBinders = definition.getBinders(); TypeScope scope = Node.getGlobalTypeScope(); - Map map = null; if (binders != null) { --- 597,600 ---- *************** *** 672,676 **** private void checkFields (FormalParameters.Parameter[] allFields) { - int len = allFields.length; for (int f = 0; f < fields.length; f++) fields[f].checkNoDuplicate(allFields, f); --- 671,674 ---- Index: NiceFieldAccess.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/NiceFieldAccess.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** NiceFieldAccess.java 15 Nov 2003 13:02:15 -0000 1.18 --- NiceFieldAccess.java 21 Nov 2003 08:09:59 -0000 1.19 *************** *** 64,76 **** /**************************************************************** - * Code generation - ****************************************************************/ - - private Type fieldType() - { - return javaReturnType(); - } - - /**************************************************************** * Debug only ****************************************************************/ --- 64,67 ---- Index: RetypedJavaMethod.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/RetypedJavaMethod.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** RetypedJavaMethod.java 8 Nov 2003 15:36:52 -0000 1.10 --- RetypedJavaMethod.java 21 Nov 2003 08:09:59 -0000 1.11 *************** *** 58,62 **** this.methodName = methodName; this.javaTypes = javaTypes; - this.syntacticReturnType = returnType.toString(); } --- 58,61 ---- *************** *** 274,287 **** return res + ")"; } - - public String getSyntacticReturnType() - { - if (ignoredRetyping) - return syntacticReturnType; - - return super.getSyntacticReturnType(); - } - - String syntacticReturnType; boolean ignoredRetyping; --- 273,276 ---- Index: Statement.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Statement.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Statement.java 18 Jul 2003 22:56:49 -0000 1.19 --- Statement.java 21 Nov 2003 08:09:59 -0000 1.20 *************** *** 73,84 **** } - static gnu.expr.Expression sequence(gnu.expr.Expression e1, gnu.expr.Expression e2) - { - gnu.expr.Expression[] array=new gnu.expr.Expression[2]; - array[0]=e1; - array[1]=e2; - return new gnu.expr.BeginExp(array); - } - /**************************************************************** * Location --- 73,76 ---- |
From: <ar...@us...> - 2003-11-21 00:43:08
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv9545/F:/nice/src/bossa/syntax Modified Files: typecheck.nice Log Message: testcase and fix for some case of type checking in anonymous functions. Index: typecheck.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/typecheck.nice,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** typecheck.nice 20 Nov 2003 20:50:30 -0000 1.85 --- typecheck.nice 21 Nov 2003 00:43:05 -0000 1.86 *************** *** 96,107 **** } - boolean hasConditionalType(MonoSymbol v) - { - return conditionalTypes.has((MonoSymbol, mlsub.typing.Monotype) couple =>{ - (MonoSymbol other, mlsub.typing.Monotype t) = couple; - return v == other; - }); - } - void typecheckExps(?Expression[] exps) { --- 96,99 ---- *************** *** 391,396 **** Collects knowledge about more precise type in branches of conditionals. ! At the moments only tests agains null are considered. ! Later, instanceof tests will also be taken into account. */ --- 383,387 ---- Collects knowledge about more precise type in branches of conditionals. ! At the moments tests agains null and instanceof tests are considered. */ *************** *** 463,466 **** --- 454,458 ---- Set<MonoSymbol> done = new HashSet(); List<(MonoSymbol, mlsub.typing.Monotype)> replaced = new ArrayList(); + //set all for all variables the original type back and store it for (int i = 0; i < levels.size(); i++) { *************** *** 483,490 **** { List<(MonoSymbol, mlsub.typing.Monotype)> replaced = replacedTypes.pop(); for (int i = 0; i < replaced.size(); i++) { (MonoSymbol variable, mlsub.typing.Monotype type) = replaced.get(i); ! variable.type = type; } --- 475,484 ---- { List<(MonoSymbol, mlsub.typing.Monotype)> replaced = replacedTypes.pop(); + //set back the stored conditional types for (int i = 0; i < replaced.size(); i++) { (MonoSymbol variable, mlsub.typing.Monotype type) = replaced.get(i); ! if (!variable.captured) ! variable.type = type; } *************** *** 497,500 **** --- 491,495 ---- { variable.captured = true; + //set all conditional types back to the original type let origType = getOriginalType(variable) || variable.type; variable.type = origType; |
From: <ar...@us...> - 2003-11-21 00:43:08
|
Update of /cvsroot/nice/Nice/testsuite/compiler/typing In directory sc8-pr-cvs1:/tmp/cvs-serv9545/F:/nice/testsuite/compiler/typing Modified Files: instanceof.testsuite Log Message: testcase and fix for some case of type checking in anonymous functions. Index: instanceof.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/typing/instanceof.testsuite,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** instanceof.testsuite 20 Nov 2003 20:50:30 -0000 1.11 --- instanceof.testsuite 21 Nov 2003 00:43:05 -0000 1.12 *************** *** 227,228 **** --- 227,248 ---- f(); } + + /// FAIL + A a = new B(); + if (a instanceof B) { + void->void f = () => + { + a = new A(); + }; + + f(); + int x = a./* /// FAIL HERE */life; + } + + /// PASS + A a = new B(); + if (a instanceof B) { + void->void f = () => { }; + + int x = a.life; + } |
From: <ar...@us...> - 2003-11-20 20:50:33
|
Update of /cvsroot/nice/Nice/testsuite/compiler/typing In directory sc8-pr-cvs1:/tmp/cvs-serv25298/F:/nice/testsuite/compiler/typing Modified Files: instanceof.testsuite Log Message: fix of type checking in anonymous functions. Index: instanceof.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/typing/instanceof.testsuite,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** instanceof.testsuite 20 Nov 2003 01:20:13 -0000 1.10 --- instanceof.testsuite 20 Nov 2003 20:50:30 -0000 1.11 *************** *** 216,220 **** } ! /// FAIL bug A a = new B(); if (a instanceof B) { --- 216,220 ---- } ! /// FAIL A a = new B(); if (a instanceof B) { *************** *** 222,226 **** { int x = a./* /// FAIL HERE */life; - a = new A(); }; --- 222,225 ---- |
From: <ar...@us...> - 2003-11-20 20:50:33
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv25298/F:/nice/src/bossa/syntax Modified Files: typecheck.nice Log Message: fix of type checking in anonymous functions. Index: typecheck.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/typecheck.nice,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** typecheck.nice 20 Nov 2003 00:32:41 -0000 1.84 --- typecheck.nice 20 Nov 2003 20:50:30 -0000 1.85 *************** *** 43,47 **** let variable = localVariable(to); if (variable != null && Node.getCurrentFunction() instanceof FunExp) ! variable.captured = true; try{ --- 43,47 ---- let variable = localVariable(to); if (variable != null && Node.getCurrentFunction() instanceof FunExp) ! setCaptured(variable); try{ *************** *** 234,238 **** ?Function saved = Node.getCurrentFunction(); Node.setCurrentFunction(e); ! typecheck(e.body); Node.setCurrentFunction(saved); } --- 234,246 ---- ?Function saved = Node.getCurrentFunction(); Node.setCurrentFunction(e); ! ! enterClosure(); ! try { ! typecheck(e.body); ! } ! finally { ! exitClosure(); ! } ! Node.setCurrentFunction(saved); } *************** *** 446,449 **** --- 454,513 ---- } return null; + } + + var Stack<(Stack<int>, Stack<(MonoSymbol, mlsub.typing.Monotype)>)> closureEnvironments = new Stack(); + var Stack<List<(MonoSymbol, mlsub.typing.Monotype)>> replacedTypes = new Stack(); + + void enterClosure() + { + Set<MonoSymbol> done = new HashSet(); + List<(MonoSymbol, mlsub.typing.Monotype)> replaced = new ArrayList(); + for (int i = 0; i < levels.size(); i++) + { + (MonoSymbol variable, mlsub.typing.Monotype type) = conditionalTypes.get(i); + if (!done.contains(variable)) + { + replaced.add((variable, variable.type)); + variable.type = type; + done.add(variable); + } + } + + replacedTypes.push(replaced); + closureEnvironments.push((levels, conditionalTypes)); + levels = new Stack(); + conditionalTypes = new Stack(); + } + + void exitClosure() + { + List<(MonoSymbol, mlsub.typing.Monotype)> replaced = replacedTypes.pop(); + for (int i = 0; i < replaced.size(); i++) + { + (MonoSymbol variable, mlsub.typing.Monotype type) = replaced.get(i); + variable.type = type; + } + + (levels, conditionalTypes) = closureEnvironments.pop(); + } + + void setCaptured(MonoSymbol variable) + { + if (!variable.captured) + { + variable.captured = true; + let origType = getOriginalType(variable) || variable.type; + variable.type = origType; + for (int i = 0; i < closureEnvironments.size(); i++) + { + (Stack<int> lvls, Stack<(MonoSymbol, mlsub.typing.Monotype)> condTypes) = closureEnvironments.get(i); + for (int k = 0; k < condTypes.size(); k++) + { + (MonoSymbol v, mlsub.typing.Monotype t) = condTypes.get(k); + if (v == variable) + condTypes.set(k, (v, origType)); + } + } + } } |
From: <ar...@us...> - 2003-11-20 01:20:57
|
Update of /cvsroot/nice/Nice/testsuite/compiler/typing In directory sc8-pr-cvs1:/tmp/cvs-serv30640/F:/nice/testsuite/compiler/typing Modified Files: instanceof.testsuite Log Message: Testcase where type inference doesn't work correctly on captured variables. Index: instanceof.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/typing/instanceof.testsuite,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** instanceof.testsuite 20 Nov 2003 00:32:41 -0000 1.9 --- instanceof.testsuite 20 Nov 2003 01:20:13 -0000 1.10 *************** *** 215,216 **** --- 215,229 ---- B /* /// FAIL HERE */b = a; } + + /// FAIL bug + A a = new B(); + if (a instanceof B) { + void->void f = () => + { + int x = a./* /// FAIL HERE */life; + a = new A(); + }; + + a = new A(); + f(); + } |
From: <ar...@us...> - 2003-11-20 01:17:30
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv30096/F:/nice/src/bossa/syntax Modified Files: MonoSymbol.java tools.nice Log Message: typo's Index: MonoSymbol.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/MonoSymbol.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** MonoSymbol.java 20 Nov 2003 00:32:41 -0000 1.25 --- MonoSymbol.java 20 Nov 2003 01:16:49 -0000 1.26 *************** *** 32,36 **** super(name); this.syntacticType=type; - this.captured = false; } --- 32,35 ---- *************** *** 39,43 **** super(name); this.type = type; - this.captured = false; } --- 38,41 ---- *************** *** 161,165 **** } ! boolean captured; Monotype syntacticType; --- 159,163 ---- } ! boolean captured = false; Monotype syntacticType; Index: tools.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/tools.nice,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** tools.nice 20 Nov 2003 00:32:41 -0000 1.28 --- tools.nice 20 Nov 2003 01:16:49 -0000 1.29 *************** *** 50,54 **** return null; ! // no type inference on captured varibles if (sym.captured) return null; --- 50,54 ---- return null; ! // no type inference on captured variables if (sym.captured) return null; |
From: <ar...@us...> - 2003-11-20 00:33:24
|
Update of /cvsroot/nice/Nice/testsuite/compiler/typing In directory sc8-pr-cvs1:/tmp/cvs-serv23539/F:/nice/testsuite/compiler/typing Modified Files: instanceof.testsuite Log Message: No type inference on captured variables. Index: instanceof.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/typing/instanceof.testsuite,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** instanceof.testsuite 28 Oct 2003 14:04:50 -0000 1.8 --- instanceof.testsuite 20 Nov 2003 00:32:41 -0000 1.9 *************** *** 207,208 **** --- 207,216 ---- void bar() {} } + + /// FAIL + A a = new B(); + void->void f = () => { a = new A(); }; + if (a instanceof B) { + f(); + B /* /// FAIL HERE */b = a; + } |
From: <ar...@us...> - 2003-11-20 00:33:20
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv23539/F:/nice/src/bossa/syntax Modified Files: MonoSymbol.java tools.nice typecheck.nice Log Message: No type inference on captured variables. Index: MonoSymbol.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/MonoSymbol.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** MonoSymbol.java 28 Aug 2003 08:46:32 -0000 1.24 --- MonoSymbol.java 20 Nov 2003 00:32:41 -0000 1.25 *************** *** 32,35 **** --- 32,36 ---- super(name); this.syntacticType=type; + this.captured = false; } *************** *** 38,41 **** --- 39,43 ---- super(name); this.type = type; + this.captured = false; } *************** *** 158,161 **** --- 160,165 ---- return type+" "+name; } + + boolean captured; Monotype syntacticType; Index: tools.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/tools.nice,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** tools.nice 28 Oct 2003 14:04:50 -0000 1.27 --- tools.nice 20 Nov 2003 00:32:41 -0000 1.28 *************** *** 50,54 **** return null; ! return cast(e.getSymbol()); } return null; --- 50,58 ---- return null; ! // no type inference on captured varibles ! if (sym.captured) ! return null; ! ! return sym; } return null; *************** *** 98,110 **** return null; ! Expression arg1 = condition.arguments.getExp(0); ! if (! (arg1 instanceof SymbolExp)) ! return null; ! SymbolExp symExp = cast(arg1); ! if (! (symExp.getSymbol() instanceof MonoSymbol)) return null; - - MonoSymbol sym = cast(symExp.getSymbol()); Expression arg2 = condition.arguments.getExp(1); --- 102,109 ---- return null; ! ?MonoSymbol sym = localVariable(condition.arguments.getExp(0)); ! if (sym == null) return null; Expression arg2 = condition.arguments.getExp(1); Index: typecheck.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/typecheck.nice,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -d -r1.83 -r1.84 *** typecheck.nice 8 Nov 2003 14:59:48 -0000 1.83 --- typecheck.nice 20 Nov 2003 00:32:41 -0000 1.84 *************** *** 42,45 **** --- 42,47 ---- let variable = localVariable(to); + if (variable != null && Node.getCurrentFunction() instanceof FunExp) + variable.captured = true; try{ |
From: <bo...@us...> - 2003-11-19 23:23:30
|
Update of /cvsroot/nice/Nice/debian In directory sc8-pr-cvs1:/tmp/cvs-serv10827/debian Modified Files: changelog Log Message: Constraints on class type parameters can be written as a prefix of class declarations: <Bound T> class MyClass<T> { ... } This syntax is required when Bound is an abstract interface. Closed 0.9.4 Index: changelog =================================================================== RCS file: /cvsroot/nice/Nice/debian/changelog,v retrieving revision 1.225 retrieving revision 1.226 diff -C2 -d -r1.225 -r1.226 *** changelog 19 Nov 2003 15:22:46 -0000 1.225 --- changelog 19 Nov 2003 23:22:51 -0000 1.226 *************** *** 6,9 **** --- 6,13 ---- return void. * Added source-level debugging information for recent debuggers (jsr 45). + * Constraints on class type parameters can be written as a prefix of + class declarations: + <Bound T> class MyClass<T> { ... } + This syntax is required when Bound is an abstract interface. * Generate more efficient code for anonymous functions that do not capture the environment. This also avoids a memory leak. *************** *** 14,18 **** recompilation of overloaded methods with the same bytecode types). ! -- nice (0.9.3) unstable; urgency=low --- 18,22 ---- recompilation of overloaded methods with the same bytecode types). ! -- Daniel Bonniot <bo...@us...> Thu, 20 Nov 2003 00:18:02 +0100 nice (0.9.3) unstable; urgency=low |
From: <bo...@us...> - 2003-11-19 23:18:26
|
Update of /cvsroot/nice/Nice/web In directory sc8-pr-cvs1:/tmp/cvs-serv9636/web Modified Files: safety.xml Log Message: Typography. Index: safety.xml =================================================================== RCS file: /cvsroot/nice/Nice/web/safety.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** safety.xml 11 Nov 2003 15:30:31 -0000 1.6 --- safety.xml 19 Nov 2003 23:17:43 -0000 1.7 *************** *** 534,538 **** <literal>String option</literal> is expected. It has to be explicitly injected into an option type with ! the Some constructor. Therefore, <literal>"A"</literal> has type <literal>String</literal>, and <literal>(Some "A")</literal> has type <literal>String option</literal>. --- 534,538 ---- <literal>String option</literal> is expected. It has to be explicitly injected into an option type with ! the <literal>Some</literal> constructor. Therefore, <literal>"A"</literal> has type <literal>String</literal>, and <literal>(Some "A")</literal> has type <literal>String option</literal>. |
Update of /cvsroot/nice/Nice/stdlib/nice/lang In directory sc8-pr-cvs1:/tmp/cvs-serv26313/stdlib/nice/lang Modified Files: threads.nice strings.nice rawArray.java range.nice prelude.nice numeric.nice null.nice native.nice java.nice graph.nice enum.nice comparable.nice collections.nice booleans.nice bigint.nice assertions.nice array.nice Native.java ForInIters.nice BooleanAlgebra.nice Log Message: Changed the license to GPL + linking exception, so that there is no restriction on licensing for user programs in any case. In particular, it is possible to natively compile a program to a self-contained static binary. Index: threads.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/threads.nice,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** threads.nice 21 Jul 2003 17:24:14 -0000 1.2 --- threads.nice 19 Nov 2003 16:04:45 -0000 1.3 *************** *** 1,13 **** ! /**************************************************************************/ ! /* N I C E */ ! /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2003 */ ! /* */ ! /* This package is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU Lesser General Public License as */ ! /* published by the Free Software Foundation; either version 2 of the */ ! /* License, or (at your option) any later version. */ ! /* */ ! /**************************************************************************/ package nice.lang; --- 1,18 ---- ! /**************************************************************************** ! * N I C E * ! * A high-level object-oriented research language * ! * (c) Daniel Bonniot 2003 * ! * * ! * This package is free software; you can redistribute it and/or modify * ! * it under the terms of the GNU General Public License as published by * ! * Free Software Foundation; either version 2 of the License, or (at your * ! * option) any later version. * ! * * ! * As a special exception, the copyright holders of this library give you * ! * permission to link this library with independent modules to produce an * ! * executable, regardless of the license terms of these independent * ! * modules, and to copy and distribute the resulting executable under * ! * terms of your choice. * ! ****************************************************************************/ package nice.lang; Index: strings.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/strings.nice,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** strings.nice 21 Jul 2003 17:24:14 -0000 1.13 --- strings.nice 19 Nov 2003 16:04:45 -0000 1.14 *************** *** 1,13 **** ! /**************************************************************************/ ! /* N I C E */ ! /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2003 */ ! /* */ ! /* This package is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU Lesser General Public License as */ ! /* published by the Free Software Foundation; either version 2 of the */ ! /* License, or (at your option) any later version. */ ! /* */ ! /**************************************************************************/ /** --- 1,18 ---- ! /**************************************************************************** ! * N I C E * ! * A high-level object-oriented research language * ! * (c) Daniel Bonniot 2003 * ! * * ! * This package is free software; you can redistribute it and/or modify * ! * it under the terms of the GNU General Public License as published by * ! * Free Software Foundation; either version 2 of the License, or (at your * ! * option) any later version. * ! * * ! * As a special exception, the copyright holders of this library give you * ! * permission to link this library with independent modules to produce an * ! * executable, regardless of the license terms of these independent * ! * modules, and to copy and distribute the resulting executable under * ! * terms of your choice. * ! ****************************************************************************/ /** Index: rawArray.java =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/rawArray.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** rawArray.java 11 Jun 2003 12:21:26 -0000 1.10 --- rawArray.java 19 Nov 2003 16:04:45 -0000 1.11 *************** *** 1,13 **** ! /**************************************************************************/ ! /* N I C E */ ! /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2002 */ ! /* */ ! /* This program is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU General Public License as published by */ ! /* the Free Software Foundation; either version 2 of the License, or */ ! /* (at your option) any later version. */ ! /* */ ! /**************************************************************************/ package nice.lang; --- 1,18 ---- ! /**************************************************************************** ! * N I C E * ! * A high-level object-oriented research language * ! * (c) Daniel Bonniot 2003 * ! * * ! * This package is free software; you can redistribute it and/or modify * ! * it under the terms of the GNU General Public License as published by * ! * Free Software Foundation; either version 2 of the License, or (at your * ! * option) any later version. * ! * * ! * As a special exception, the copyright holders of this library give you * ! * permission to link this library with independent modules to produce an * ! * executable, regardless of the license terms of these independent * ! * modules, and to copy and distribute the resulting executable under * ! * terms of your choice. * ! ****************************************************************************/ package nice.lang; Index: range.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/range.nice,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** range.nice 28 Aug 2003 17:46:15 -0000 1.1 --- range.nice 19 Nov 2003 16:04:45 -0000 1.2 *************** *** 1,13 **** ! /**************************************************************************/ ! /* N I C E */ ! /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2003 */ ! /* */ ! /* This program is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU General Public License as published by */ ! /* the Free Software Foundation; either version 2 of the License, or */ ! /* (at your option) any later version. */ ! /* */ ! /**************************************************************************/ package nice.lang; --- 1,18 ---- ! /**************************************************************************** ! * N I C E * ! * A high-level object-oriented research language * ! * (c) Daniel Bonniot 2003 * ! * * ! * This package is free software; you can redistribute it and/or modify * ! * it under the terms of the GNU General Public License as published by * ! * Free Software Foundation; either version 2 of the License, or (at your * ! * option) any later version. * ! * * ! * As a special exception, the copyright holders of this library give you * ! * permission to link this library with independent modules to produce an * ! * executable, regardless of the license terms of these independent * ! * modules, and to copy and distribute the resulting executable under * ! * terms of your choice. * ! ****************************************************************************/ package nice.lang; Index: prelude.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/prelude.nice,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** prelude.nice 16 Sep 2003 18:38:11 -0000 1.34 --- prelude.nice 19 Nov 2003 16:04:45 -0000 1.35 *************** *** 1,13 **** ! /**************************************************************************/ ! /* N I C E */ ! /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2003 */ ! /* */ ! /* This package is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU Lesser General Public License as */ ! /* published by the Free Software Foundation; either version 2 of the */ ! /* License, or (at your option) any later version. */ ! /* */ ! /**************************************************************************/ /** --- 1,18 ---- ! /**************************************************************************** ! * N I C E * ! * A high-level object-oriented research language * ! * (c) Daniel Bonniot 2003 * ! * * ! * This package is free software; you can redistribute it and/or modify * ! * it under the terms of the GNU General Public License as published by * ! * Free Software Foundation; either version 2 of the License, or (at your * ! * option) any later version. * ! * * ! * As a special exception, the copyright holders of this library give you * ! * permission to link this library with independent modules to produce an * ! * executable, regardless of the license terms of these independent * ! * modules, and to copy and distribute the resulting executable under * ! * terms of your choice. * ! ****************************************************************************/ /** Index: numeric.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/numeric.nice,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** numeric.nice 29 Aug 2003 15:38:21 -0000 1.32 --- numeric.nice 19 Nov 2003 16:04:45 -0000 1.33 *************** *** 1,13 **** ! /**************************************************************************/ ! /* N I C E */ ! /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2003 */ ! /* */ ! /* This package is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU Lesser General Public License as */ ! /* published by the Free Software Foundation; either version 2 of the */ ! /* License, or (at your option) any later version. */ ! /* */ ! /**************************************************************************/ /** --- 1,18 ---- ! /**************************************************************************** ! * N I C E * ! * A high-level object-oriented research language * ! * (c) Daniel Bonniot 2003 * ! * * ! * This package is free software; you can redistribute it and/or modify * ! * it under the terms of the GNU General Public License as published by * ! * Free Software Foundation; either version 2 of the License, or (at your * ! * option) any later version. * ! * * ! * As a special exception, the copyright holders of this library give you * ! * permission to link this library with independent modules to produce an * ! * executable, regardless of the license terms of these independent * ! * modules, and to copy and distribute the resulting executable under * ! * terms of your choice. * ! ****************************************************************************/ /** Index: null.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/null.nice,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** null.nice 21 Jul 2003 17:24:14 -0000 1.4 --- null.nice 19 Nov 2003 16:04:45 -0000 1.5 *************** *** 1,13 **** ! /**************************************************************************/ ! /* N I C E */ ! /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2003 */ ! /* */ ! /* This package is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU Lesser General Public License as */ ! /* published by the Free Software Foundation; either version 2 of the */ ! /* License, or (at your option) any later version. */ ! /* */ ! /**************************************************************************/ package nice.lang; --- 1,18 ---- ! /**************************************************************************** ! * N I C E * ! * A high-level object-oriented research language * ! * (c) Daniel Bonniot 2003 * ! * * ! * This package is free software; you can redistribute it and/or modify * ! * it under the terms of the GNU General Public License as published by * ! * Free Software Foundation; either version 2 of the License, or (at your * ! * option) any later version. * ! * * ! * As a special exception, the copyright holders of this library give you * ! * permission to link this library with independent modules to produce an * ! * executable, regardless of the license terms of these independent * ! * modules, and to copy and distribute the resulting executable under * ! * terms of your choice. * ! ****************************************************************************/ package nice.lang; Index: native.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/native.nice,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** native.nice 21 Jul 2003 17:24:14 -0000 1.5 --- native.nice 19 Nov 2003 16:04:45 -0000 1.6 *************** *** 1,13 **** ! /**************************************************************************/ ! /* N I C E */ ! /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2003 */ ! /* */ ! /* This package is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU Lesser General Public License as */ ! /* published by the Free Software Foundation; either version 2 of the */ ! /* License, or (at your option) any later version. */ ! /* */ ! /**************************************************************************/ package nice.lang; --- 1,18 ---- ! /**************************************************************************** ! * N I C E * ! * A high-level object-oriented research language * ! * (c) Daniel Bonniot 2003 * ! * * ! * This package is free software; you can redistribute it and/or modify * ! * it under the terms of the GNU General Public License as published by * ! * Free Software Foundation; either version 2 of the License, or (at your * ! * option) any later version. * ! * * ! * As a special exception, the copyright holders of this library give you * ! * permission to link this library with independent modules to produce an * ! * executable, regardless of the license terms of these independent * ! * modules, and to copy and distribute the resulting executable under * ! * terms of your choice. * ! ****************************************************************************/ package nice.lang; Index: java.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/java.nice,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** java.nice 19 Nov 2003 15:39:04 -0000 1.43 --- java.nice 19 Nov 2003 16:04:45 -0000 1.44 *************** *** 1,13 **** ! /**************************************************************************/ ! /* N I C E */ ! /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2003 */ ! /* */ ! /* This package is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU Lesser General Public License as */ ! /* published by the Free Software Foundation; either version 2 of the */ ! /* License, or (at your option) any later version. */ ! /* */ ! /**************************************************************************/ /** --- 1,18 ---- ! /**************************************************************************** ! * N I C E * ! * A high-level object-oriented research language * ! * (c) Daniel Bonniot 2003 * ! * * ! * This package is free software; you can redistribute it and/or modify * ! * it under the terms of the GNU General Public License as published by * ! * Free Software Foundation; either version 2 of the License, or (at your * ! * option) any later version. * ! * * ! * As a special exception, the copyright holders of this library give you * ! * permission to link this library with independent modules to produce an * ! * executable, regardless of the license terms of these independent * ! * modules, and to copy and distribute the resulting executable under * ! * terms of your choice. * ! ****************************************************************************/ /** Index: graph.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/graph.nice,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** graph.nice 21 Jul 2003 17:24:14 -0000 1.19 --- graph.nice 19 Nov 2003 16:04:45 -0000 1.20 *************** *** 1,13 **** ! /**************************************************************************/ ! /* N I C E */ ! /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2003 */ ! /* */ ! /* This package is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU Lesser General Public License as */ ! /* published by the Free Software Foundation; either version 2 of the */ ! /* License, or (at your option) any later version. */ ! /* */ ! /**************************************************************************/ package nice.lang; --- 1,18 ---- ! /**************************************************************************** ! * N I C E * ! * A high-level object-oriented research language * ! * (c) Daniel Bonniot 2003 * ! * * ! * This package is free software; you can redistribute it and/or modify * ! * it under the terms of the GNU General Public License as published by * ! * Free Software Foundation; either version 2 of the License, or (at your * ! * option) any later version. * ! * * ! * As a special exception, the copyright holders of this library give you * ! * permission to link this library with independent modules to produce an * ! * executable, regardless of the license terms of these independent * ! * modules, and to copy and distribute the resulting executable under * ! * terms of your choice. * ! ****************************************************************************/ package nice.lang; Index: enum.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/enum.nice,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** enum.nice 26 Jul 2003 16:18:07 -0000 1.3 --- enum.nice 19 Nov 2003 16:04:45 -0000 1.4 *************** *** 1,13 **** ! /**************************************************************************/ ! /* N I C E */ ! /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2003 */ ! /* */ ! /* This package is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU Lesser General Public License as */ ! /* published by the Free Software Foundation; either version 2 of the */ ! /* License, or (at your option) any later version. */ ! /* */ ! /**************************************************************************/ package nice.lang; --- 1,18 ---- ! /**************************************************************************** ! * N I C E * ! * A high-level object-oriented research language * ! * (c) Daniel Bonniot 2003 * ! * * ! * This package is free software; you can redistribute it and/or modify * ! * it under the terms of the GNU General Public License as published by * ! * Free Software Foundation; either version 2 of the License, or (at your * ! * option) any later version. * ! * * ! * As a special exception, the copyright holders of this library give you * ! * permission to link this library with independent modules to produce an * ! * executable, regardless of the license terms of these independent * ! * modules, and to copy and distribute the resulting executable under * ! * terms of your choice. * ! ****************************************************************************/ package nice.lang; Index: comparable.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/comparable.nice,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** comparable.nice 21 Jul 2003 17:24:14 -0000 1.3 --- comparable.nice 19 Nov 2003 16:04:46 -0000 1.4 *************** *** 1,13 **** ! /**************************************************************************/ ! /* N I C E */ ! /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2003 */ ! /* */ ! /* This package is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU Lesser General Public License as */ ! /* published by the Free Software Foundation; either version 2 of the */ ! /* License, or (at your option) any later version. */ ! /* */ ! /**************************************************************************/ /**************************************************************** --- 1,18 ---- ! /**************************************************************************** ! * N I C E * ! * A high-level object-oriented research language * ! * (c) Daniel Bonniot 2003 * ! * * ! * This package is free software; you can redistribute it and/or modify * ! * it under the terms of the GNU General Public License as published by * ! * Free Software Foundation; either version 2 of the License, or (at your * ! * option) any later version. * ! * * ! * As a special exception, the copyright holders of this library give you * ! * permission to link this library with independent modules to produce an * ! * executable, regardless of the license terms of these independent * ! * modules, and to copy and distribute the resulting executable under * ! * terms of your choice. * ! ****************************************************************************/ /**************************************************************** Index: collections.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/collections.nice,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** collections.nice 11 Sep 2003 17:10:08 -0000 1.56 --- collections.nice 19 Nov 2003 16:04:46 -0000 1.57 *************** *** 1,13 **** ! /**************************************************************************/ ! /* N I C E */ ! /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2003 */ ! /* */ ! /* This package is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU Lesser General Public License as */ ! /* published by the Free Software Foundation; either version 2 of the */ ! /* License, or (at your option) any later version. */ ! /* */ ! /**************************************************************************/ package nice.lang; --- 1,18 ---- ! /**************************************************************************** ! * N I C E * ! * A high-level object-oriented research language * ! * (c) Daniel Bonniot 2003 * ! * * ! * This package is free software; you can redistribute it and/or modify * ! * it under the terms of the GNU General Public License as published by * ! * Free Software Foundation; either version 2 of the License, or (at your * ! * option) any later version. * ! * * ! * As a special exception, the copyright holders of this library give you * ! * permission to link this library with independent modules to produce an * ! * executable, regardless of the license terms of these independent * ! * modules, and to copy and distribute the resulting executable under * ! * terms of your choice. * ! ****************************************************************************/ package nice.lang; Index: booleans.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/booleans.nice,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** booleans.nice 21 Jul 2003 17:24:14 -0000 1.14 --- booleans.nice 19 Nov 2003 16:04:46 -0000 1.15 *************** *** 1,13 **** ! /**************************************************************************/ ! /* N I C E */ ! /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2003 */ ! /* */ ! /* This package is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU Lesser General Public License as */ ! /* published by the Free Software Foundation; either version 2 of the */ ! /* License, or (at your option) any later version. */ ! /* */ ! /**************************************************************************/ package nice.lang; --- 1,18 ---- ! /**************************************************************************** ! * N I C E * ! * A high-level object-oriented research language * ! * (c) Daniel Bonniot 2003 * ! * * ! * This package is free software; you can redistribute it and/or modify * ! * it under the terms of the GNU General Public License as published by * ! * Free Software Foundation; either version 2 of the License, or (at your * ! * option) any later version. * ! * * ! * As a special exception, the copyright holders of this library give you * ! * permission to link this library with independent modules to produce an * ! * executable, regardless of the license terms of these independent * ! * modules, and to copy and distribute the resulting executable under * ! * terms of your choice. * ! ****************************************************************************/ package nice.lang; Index: bigint.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/bigint.nice,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** bigint.nice 21 Jul 2003 17:24:14 -0000 1.3 --- bigint.nice 19 Nov 2003 16:04:46 -0000 1.4 *************** *** 1,13 **** ! /**************************************************************************/ ! /* N I C E */ ! /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2003 */ ! /* */ ! /* This package is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU Lesser General Public License as */ ! /* published by the Free Software Foundation; either version 2 of the */ ! /* License, or (at your option) any later version. */ ! /* */ ! /**************************************************************************/ package nice.lang; --- 1,18 ---- ! /**************************************************************************** ! * N I C E * ! * A high-level object-oriented research language * ! * (c) Daniel Bonniot 2003 * ! * * ! * This package is free software; you can redistribute it and/or modify * ! * it under the terms of the GNU General Public License as published by * ! * Free Software Foundation; either version 2 of the License, or (at your * ! * option) any later version. * ! * * ! * As a special exception, the copyright holders of this library give you * ! * permission to link this library with independent modules to produce an * ! * executable, regardless of the license terms of these independent * ! * modules, and to copy and distribute the resulting executable under * ! * terms of your choice. * ! ****************************************************************************/ package nice.lang; Index: assertions.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/assertions.nice,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** assertions.nice 21 Jul 2003 17:24:14 -0000 1.5 --- assertions.nice 19 Nov 2003 16:04:46 -0000 1.6 *************** *** 1,13 **** ! /**************************************************************************/ ! /* N I C E */ ! /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2003 */ ! /* */ ! /* This package is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU Lesser General Public License as */ ! /* published by the Free Software Foundation; either version 2 of the */ ! /* License, or (at your option) any later version. */ ! /* */ ! /**************************************************************************/ package nice.lang; --- 1,18 ---- ! /**************************************************************************** ! * N I C E * ! * A high-level object-oriented research language * ! * (c) Daniel Bonniot 2003 * ! * * ! * This package is free software; you can redistribute it and/or modify * ! * it under the terms of the GNU General Public License as published by * ! * Free Software Foundation; either version 2 of the License, or (at your * ! * option) any later version. * ! * * ! * As a special exception, the copyright holders of this library give you * ! * permission to link this library with independent modules to produce an * ! * executable, regardless of the license terms of these independent * ! * modules, and to copy and distribute the resulting executable under * ! * terms of your choice. * ! ****************************************************************************/ package nice.lang; Index: array.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/array.nice,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** array.nice 8 Oct 2003 16:19:04 -0000 1.30 --- array.nice 19 Nov 2003 16:04:46 -0000 1.31 *************** *** 1,13 **** ! /**************************************************************************/ ! /* N I C E */ ! /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2003 */ ! /* */ ! /* This package is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU Lesser General Public License as */ ! /* published by the Free Software Foundation; either version 2 of the */ ! /* License, or (at your option) any later version. */ ! /* */ ! /**************************************************************************/ package nice.lang; --- 1,18 ---- ! /**************************************************************************** ! * N I C E * ! * A high-level object-oriented research language * ! * (c) Daniel Bonniot 2003 * ! * * ! * This package is free software; you can redistribute it and/or modify * ! * it under the terms of the GNU General Public License as published by * ! * Free Software Foundation; either version 2 of the License, or (at your * ! * option) any later version. * ! * * ! * As a special exception, the copyright holders of this library give you * ! * permission to link this library with independent modules to produce an * ! * executable, regardless of the license terms of these independent * ! * modules, and to copy and distribute the resulting executable under * ! * terms of your choice. * ! ****************************************************************************/ package nice.lang; Index: Native.java =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/Native.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Native.java 27 Sep 2003 11:51:52 -0000 1.15 --- Native.java 19 Nov 2003 16:04:46 -0000 1.16 *************** *** 1,13 **** ! /**************************************************************************/ ! /* N I C E */ ! /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2003 */ ! /* */ ! /* This package is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU Lesser General Public License as */ ! /* published by the Free Software Foundation; either version 2 of the */ ! /* License, or (at your option) any later version. */ ! /* */ ! /**************************************************************************/ package nice.lang; --- 1,18 ---- ! /**************************************************************************** ! * N I C E * ! * A high-level object-oriented research language * ! * (c) Daniel Bonniot 2003 * ! * * ! * This package is free software; you can redistribute it and/or modify * ! * it under the terms of the GNU General Public License as published by * ! * Free Software Foundation; either version 2 of the License, or (at your * ! * option) any later version. * ! * * ! * As a special exception, the copyright holders of this library give you * ! * permission to link this library with independent modules to produce an * ! * executable, regardless of the license terms of these independent * ! * modules, and to copy and distribute the resulting executable under * ! * terms of your choice. * ! ****************************************************************************/ package nice.lang; Index: ForInIters.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/ForInIters.nice,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ForInIters.nice 28 Aug 2003 17:46:15 -0000 1.5 --- ForInIters.nice 19 Nov 2003 16:04:46 -0000 1.6 *************** *** 1,13 **** ! /**************************************************************************/ ! /* N I C E */ ! /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2003 */ ! /* */ ! /* This package is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU Lesser General Public License as */ ! /* published by the Free Software Foundation; either version 2 of the */ ! /* License, or (at your option) any later version. */ ! /* */ ! /**************************************************************************/ package nice.lang; --- 1,18 ---- ! /**************************************************************************** ! * N I C E * ! * A high-level object-oriented research language * ! * (c) Daniel Bonniot 2003 * ! * * ! * This package is free software; you can redistribute it and/or modify * ! * it under the terms of the GNU General Public License as published by * ! * Free Software Foundation; either version 2 of the License, or (at your * ! * option) any later version. * ! * * ! * As a special exception, the copyright holders of this library give you * ! * permission to link this library with independent modules to produce an * ! * executable, regardless of the license terms of these independent * ! * modules, and to copy and distribute the resulting executable under * ! * terms of your choice. * ! ****************************************************************************/ package nice.lang; Index: BooleanAlgebra.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/BooleanAlgebra.nice,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** BooleanAlgebra.nice 21 Jul 2003 17:24:14 -0000 1.4 --- BooleanAlgebra.nice 19 Nov 2003 16:04:46 -0000 1.5 *************** *** 1,13 **** ! /**************************************************************************/ ! /* N I C E */ ! /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2003 */ ! /* */ ! /* This package is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU Lesser General Public License as */ ! /* published by the Free Software Foundation; either version 2 of the */ ! /* License, or (at your option) any later version. */ ! /* */ ! /**************************************************************************/ package nice.lang; --- 1,18 ---- ! /**************************************************************************** ! * N I C E * ! * A high-level object-oriented research language * ! * (c) Daniel Bonniot 2003 * ! * * ! * This package is free software; you can redistribute it and/or modify * ! * it under the terms of the GNU General Public License as published by * ! * Free Software Foundation; either version 2 of the License, or (at your * ! * option) any later version. * ! * * ! * As a special exception, the copyright holders of this library give you * ! * permission to link this library with independent modules to produce an * ! * executable, regardless of the license terms of these independent * ! * modules, and to copy and distribute the resulting executable under * ! * terms of your choice. * ! ****************************************************************************/ package nice.lang; |
From: <ar...@us...> - 2003-11-19 15:39:08
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang In directory sc8-pr-cvs1:/tmp/cvs-serv21714/F:/nice/stdlib/nice/lang Modified Files: java.nice Log Message: some java 1.4 retypings Index: java.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/java.nice,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** java.nice 19 Nov 2003 01:19:50 -0000 1.42 --- java.nice 19 Nov 2003 15:39:04 -0000 1.43 *************** *** 205,208 **** --- 205,216 ---- <K,V> HashMap<K,V> HashMap(int,float) = native new HashMap(int,float); <K,K0,V,V0 | K0 <: K, V0 <: V> HashMap<K,V> HashMap(Map<K0,V0>) = native new HashMap(Map); + <K,V> IdentityHashMap<K,V> IdentityHashMap() = native new IdentityHashMap(); + <K,V> IdentityHashMap<K,V> IdentityHashMap(int) = native new IdentityHashMap(int); + <K,K0,V,V0 | K0 <: K, V0 <: V> IdentityHashMap<K,V> IdentityHashMap(Map<K0,V0>) = native new IdentityHashMap(Map); + <K,V> LinkedHashMap<K,V> LinkedHashMap() = native new LinkedHashMap(); + <K,V> LinkedHashMap<K,V> LinkedHashMap(int) = native new LinkedHashMap(int); + <K,V> LinkedHashMap<K,V> LinkedHashMap(int,float) = native new LinkedHashMap(int,float); + <K,V> LinkedHashMap<K,V> LinkedHashMap(int,float,boolean) = native new LinkedHashMap(int,float,boolean); + <K,K0,V,V0 | K0 <: K, V0 <: V> LinkedHashMap<K,V> LinkedHashMap(Map<K0,V0>) = native new LinkedHashMap(Map); <K,V> Hashtable<K,V> Hashtable() = native new Hashtable(); <K,V> Hashtable<K,V> Hashtable(int) = native new Hashtable(int); *************** *** 237,242 **** --- 245,253 ---- class Dictionary<K,V> = native java.util.Dictionary; class HashMap<K,V> extends AbstractMap<K,V> = native java.util.HashMap; + class LinkedHashMap<K,V> extends AbstractMap<K,V> = native java.util.LinkedHashMap; class HashSet<T> extends AbstractSet<T> = native java.util.HashSet; + class LinkedHashSet<T> extends AbstractSet<T> = native java.util.LinkedHashSet; class Hashtable<K,V> implements Map<K,V> = native java.util.Hashtable; + class IdentityHashMap<K,V> extends AbstractMap<K,V> = native java.util.IdentityHashMap; class LinkedList<T> extends AbstractSequentialList<T> = native java.util.LinkedList; class Stack<T> extends Vector<T> = native java.util.Stack; *************** *** 338,341 **** --- 349,363 ---- <T> void sort(List<T>, Comparator<T>) = native void Collections.sort(List, Comparator); + <T> void swap(List<T>, int, int) = native void Collections.swap(List, int, int); + <T> void rotate(List<T>, int) = native void Collections.rotate(List, int); + <T,U | T <: U> boolean replaceAll(List<T>, U, T) = native boolean Collections.replaceAll(List, Object, Object); + <T,U | T <: U> int indexOfSubList(List<T>, List<U>) = native int Collections.indexOfSubList(List, List); + <T,U | T <: U> int lastIndexOfSubList(List<T>, List<U>) = native int Collections.lastIndexOfSubList(List, List); + + // static collections fields + <T> List<T> EMPTY_LIST() = native Collections.EMPTY_LIST; + <T> Set<T> EMPTY_SET() = native Collections.EMPTY_SET; + <K,V> Map<K,V> EMPTY_MAP() = native Collections.EMPTY_MAP; + // these 3 have a too large type because they can't use comparable yet. |
From: <bo...@us...> - 2003-11-19 15:25:40
|
Update of /cvsroot/nice/Nice/src/bossa/parser In directory sc8-pr-cvs1:/tmp/cvs-serv18853/src/bossa/parser Modified Files: Parser.jj Log Message: Fix comments, since field retypings work both for static and non-static fields. Index: Parser.jj =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v retrieving revision 1.213 retrieving revision 1.214 diff -C2 -d -r1.213 -r1.214 *** Parser.jj 15 Nov 2003 17:25:47 -0000 1.213 --- Parser.jj 19 Nov 2003 15:25:36 -0000 1.214 *************** *** 1337,1342 **** ) ! // if we stop here with a ";", it's a static field ! // else it's a method ( ";" --- 1337,1341 ---- ) ! // If we stop here with a ";", it's a field else it's a method. ( ";" |
From: <bo...@us...> - 2003-11-19 15:25:40
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv18853/src/bossa/syntax Modified Files: JavaFieldAccess.java Log Message: Fix comments, since field retypings work both for static and non-static fields. Index: JavaFieldAccess.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/JavaFieldAccess.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** JavaFieldAccess.java 31 Jul 2003 19:32:05 -0000 1.16 --- JavaFieldAccess.java 19 Nov 2003 15:25:35 -0000 1.17 *************** *** 24,31 **** /** ! A native java static field access. @version $Date$ ! @author Daniel Bonniot (d.b...@ma...) */ public class JavaFieldAccess extends FieldAccess --- 24,31 ---- /** ! A native java field access. @version $Date$ ! @author Daniel Bonniot (bo...@us...) */ public class JavaFieldAccess extends FieldAccess |
From: <bo...@us...> - 2003-11-19 15:22:49
|
Update of /cvsroot/nice/Nice/debian In directory sc8-pr-cvs1:/tmp/cvs-serv18334/debian Modified Files: changelog Log Message: Minor. Index: changelog =================================================================== RCS file: /cvsroot/nice/Nice/debian/changelog,v retrieving revision 1.224 retrieving revision 1.225 diff -C2 -d -r1.224 -r1.225 *** changelog 19 Nov 2003 13:19:10 -0000 1.224 --- changelog 19 Nov 2003 15:22:46 -0000 1.225 *************** *** 8,14 **** * Generate more efficient code for anonymous functions that do not capture the environment. This also avoids a memory leak. ! * Retypings of classes and methods that can't be found by the compiler will ! generate a warning now. (this makes it possible to add java 1.4 specific ! retypings without breaking anything when compiling with an older jvm.) * Bug fixes (error reporting for certain overloading by expected type, recompilation of overloaded methods with the same bytecode types). --- 8,14 ---- * Generate more efficient code for anonymous functions that do not capture the environment. This also avoids a memory leak. ! * Retypings of classes and methods that can't be found by the compiler only ! generate a warning now. This makes it possible to add JDK 1.4 specific ! retypings without failing when compiling with an older JDK. * Bug fixes (error reporting for certain overloading by expected type, recompilation of overloaded methods with the same bytecode types). |
From: <ar...@us...> - 2003-11-19 14:50:28
|
Update of /cvsroot/nice/Nice/testsuite/compiler/expressions/arrays In directory sc8-pr-cvs1:/tmp/cvs-serv10601/F:/nice/testsuite/compiler/expressions/arrays Modified Files: compilation.testsuite Log Message: testcases for bug #761629 Index: compilation.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/expressions/arrays/compilation.testsuite,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** compilation.testsuite 8 Oct 2003 16:19:04 -0000 1.5 --- compilation.testsuite 19 Nov 2003 14:50:25 -0000 1.6 *************** *** 67,68 **** --- 67,76 ---- arr[1] = "pqr"; assert x.equals("xyz") && arr[0].equals("xyz") && arr[1].equals("pqr"); + + /// PASS bug + List<List<int>> x = [[1,2,3]]; + int i = x[0][1]; + + /// PASS bug + (List<int>, String) x = ([1,2,3], "abc"); + (List<int> arr, String str) = x; |
From: <ar...@us...> - 2003-11-19 13:19:13
|
Update of /cvsroot/nice/Nice/debian In directory sc8-pr-cvs1:/tmp/cvs-serv27531/F:/nice/debian Modified Files: changelog Log Message: changelog entry for retypings change. Index: changelog =================================================================== RCS file: /cvsroot/nice/Nice/debian/changelog,v retrieving revision 1.223 retrieving revision 1.224 diff -C2 -d -r1.223 -r1.224 *** changelog 17 Nov 2003 20:26:25 -0000 1.223 --- changelog 19 Nov 2003 13:19:10 -0000 1.224 *************** *** 8,11 **** --- 8,14 ---- * Generate more efficient code for anonymous functions that do not capture the environment. This also avoids a memory leak. + * Retypings of classes and methods that can't be found by the compiler will + generate a warning now. (this makes it possible to add java 1.4 specific + retypings without breaking anything when compiling with an older jvm.) * Bug fixes (error reporting for certain overloading by expected type, recompilation of overloaded methods with the same bytecode types). |