nice-commit Mailing List for The Nice Programming Language (Page 9)
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: Artem Gr K. <ar...@us...> - 2005-04-03 03:05:23
|
Update of /cvsroot/nice/Nice/src/bossa/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6849/src/bossa/parser Modified Files: Parser.jj Log Message: Use short source path in automatic assertion message. Index: Parser.jj =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v retrieving revision 1.326 retrieving revision 1.327 diff -C2 -d -r1.326 -r1.327 *** Parser.jj 2 Apr 2005 11:47:03 -0000 1.326 --- Parser.jj 3 Apr 2005 03:05:14 -0000 1.327 *************** *** 2929,2933 **** { message = bossa.syntax.dispatch.createStringConstantExp(condition.toString() ! + " failed at " + condition.location().toString().replace('\\','/')); call = bossa.syntax.dispatch.createCallExp(symb(t), condition, message); } --- 2929,2933 ---- { message = bossa.syntax.dispatch.createStringConstantExp(condition.toString() ! + " failed at " + condition.location().toShortString()); call = bossa.syntax.dispatch.createCallExp(symb(t), condition, message); } |
From: Artem Gr K. <ar...@us...> - 2005-04-03 03:05:23
|
Update of /cvsroot/nice/Nice/src/bossa/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6849/src/bossa/util Modified Files: Location.java Log Message: Use short source path in automatic assertion message. Index: Location.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/util/Location.java,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** Location.java 20 Feb 2005 22:09:40 -0000 1.30 --- Location.java 3 Apr 2005 03:05:13 -0000 1.31 *************** *** 88,91 **** --- 88,96 ---- } + public String toShortString() + { + return toString(); + } + /**************************************************************** * Setting source location in the generated bytecode. *************** *** 133,136 **** --- 138,146 ---- } + public String toShortString() + { + return (file == null) ? "" : file.getName(); + } + public void write(gnu.expr.Expression exp) { *************** *** 194,197 **** --- 204,212 ---- } + public String toShortString() + { + return super.toShortString() + ":" + startLine; + } + public String uniqueIdentifier(String root) { |
From: Daniel B. <bo...@us...> - 2005-04-02 12:51:43
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1191/stdlib/nice/lang Modified Files: range.nice Log Message: Added missing List method implementation. Index: range.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/range.nice,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** range.nice 1 Apr 2005 16:02:21 -0000 1.5 --- range.nice 2 Apr 2005 12:51:19 -0000 1.6 *************** *** 63,66 **** --- 63,68 ---- removeAt(index) = throw new UnsupportedOperationException(); removeAll(elems) = throw new UnsupportedOperationException(); + + set(index, elem) = throw new UnsupportedOperationException(); } |
From: Artem Gr K. <ar...@us...> - 2005-04-02 12:10:01
|
Update of /cvsroot/nice/Nice/regtest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11566/regtest Modified Files: regtest Log Message: "echo -e" seems to be redundant and is not supported on FreeBSD... Index: regtest =================================================================== RCS file: /cvsroot/nice/Nice/regtest/regtest,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** regtest 1 Apr 2005 15:43:42 -0000 1.28 --- regtest 2 Apr 2005 12:09:51 -0000 1.29 *************** *** 18,22 **** echo() { ! /bin/echo -e "$@" } --- 18,22 ---- echo() { ! /bin/echo "$@" } |
From: Artem Gr K. <ar...@us...> - 2005-04-02 11:47:47
|
Update of /cvsroot/nice/Nice/src/bossa/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv339/src/bossa/parser Modified Files: Parser.jj Log Message: Replace "assert" with "?assert" in the parser (so that there are two assert idents instead of three). Index: Parser.jj =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v retrieving revision 1.325 retrieving revision 1.326 diff -C2 -d -r1.325 -r1.326 *** Parser.jj 2 Apr 2005 09:14:24 -0000 1.325 --- Parser.jj 2 Apr 2005 11:47:03 -0000 1.326 *************** *** 210,214 **** // Assertions ! | < ASSERT: "assert" > | < SUREASSERT: "!assert" > /* Nice specific */ | < MAYBEASSERT: "?assert" > /* Nice specific */ --- 210,214 ---- // Assertions ! | < ASSERT: "assert" > { matchedToken.image = "?assert"; } | < SUREASSERT: "!assert" > /* Nice specific */ | < MAYBEASSERT: "?assert" > /* Nice specific */ |
From: Artem Gr K. <ar...@us...> - 2005-04-02 11:47:30
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv339/src/bossa/syntax Modified Files: typecheck.nice analyse.nice Log Message: Replace "assert" with "?assert" in the parser (so that there are two assert idents instead of three). Index: analyse.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/analyse.nice,v retrieving revision 1.134 retrieving revision 1.135 diff -C2 -d -r1.134 -r1.135 *** analyse.nice 2 Apr 2005 10:55:01 -0000 1.134 --- analyse.nice 2 Apr 2005 11:47:04 -0000 1.135 *************** *** 377,381 **** boolean cannotReturn = e.isCallTo("throw") || ! e.isCallTo("assert") && args.size() > 0 && args.getExp(0).isFalse(); markAsCallFun(notNull(e.function), e.infix); --- 377,381 ---- boolean cannotReturn = e.isCallTo("throw") || ! (e.isCallTo("?assert") || e.isCallTo("!assert")) && args.size() > 0 && args.getExp(0).isFalse(); markAsCallFun(notNull(e.function), e.infix); Index: typecheck.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/typecheck.nice,v retrieving revision 1.130 retrieving revision 1.131 diff -C2 -d -r1.130 -r1.131 *** typecheck.nice 25 Mar 2005 16:40:00 -0000 1.130 --- typecheck.nice 2 Apr 2005 11:47:04 -0000 1.131 *************** *** 221,225 **** e.arguments.typecheckArgs(); ! if (e.isCallTo("assert") && 1 <= e.arguments.size() <= 2) { ?List<MonoSymbol> l = variablesNotNullIfTestSucceeds(e.arguments.getExp(0)); --- 221,225 ---- e.arguments.typecheckArgs(); ! if ((e.isCallTo("?assert") || e.isCallTo("!assert")) && 1 <= e.arguments.size() <= 2) { ?List<MonoSymbol> l = variablesNotNullIfTestSucceeds(e.arguments.getExp(0)); |
From: Artem Gr K. <ar...@us...> - 2005-04-02 11:47:11
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv339/stdlib/nice/lang Modified Files: assertions.nice Log Message: Replace "assert" with "?assert" in the parser (so that there are two assert idents instead of three). Index: assertions.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/assertions.nice,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** assertions.nice 2 Apr 2005 09:14:23 -0000 1.7 --- assertions.nice 2 Apr 2005 11:47:02 -0000 1.8 *************** *** 24,31 **** class AssertionFailed extends Error {} ! void `assert`(boolean condition) = inline nice.lang.inline.Assert(); ! void `assert`(boolean condition, String message) = inline nice.lang.inline.Assert(); --- 24,31 ---- class AssertionFailed extends Error {} ! void `?assert`(boolean condition) = inline nice.lang.inline.Assert(); ! void `?assert`(boolean condition, String message) = inline nice.lang.inline.Assert(); *************** *** 38,52 **** inline nice.lang.inline.Assert("contract"); ! void `?assert`(boolean condition) = inline nice.lang.inline.Assert(); ! ! void `?assert`(boolean condition, String message) = inline nice.lang.inline.Assert(); - - // Here for bootstrap compatibility. void `alwaysAssert`(boolean condition) = inline nice.lang.inline.Assert("contract"); - - // Here for bootstrap compatibility. void `alwaysAssert`(boolean condition, String message) = inline nice.lang.inline.Assert("contract"); --- 38,48 ---- inline nice.lang.inline.Assert("contract"); ! // Here for bootstrap compatibility. ! void `assert`(boolean condition) = inline nice.lang.inline.Assert(); ! void `assert`(boolean condition, String message) = inline nice.lang.inline.Assert(); void `alwaysAssert`(boolean condition) = inline nice.lang.inline.Assert("contract"); void `alwaysAssert`(boolean condition, String message) = inline nice.lang.inline.Assert("contract"); |
From: Artem Gr K. <ar...@us...> - 2005-04-02 11:43:29
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30582/src/bossa/syntax Modified Files: tools.nice Log Message: A fix for "Removed duplicate retyping for User.error". Index: tools.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/tools.nice,v retrieving revision 1.111 retrieving revision 1.112 diff -C2 -d -r1.111 -r1.112 *** tools.nice 2 Apr 2005 09:09:24 -0000 1.111 --- tools.nice 2 Apr 2005 11:43:00 -0000 1.112 *************** *** 96,100 **** // UserError tolerates null messagess. ! bossa.util.UserError User_error(?Located responsible, ?String message) = native bossa.util.UserError bossa.util.User.error(Located, String); --- 96,100 ---- // UserError tolerates null messagess. ! bossa.util.UserError error(?Located responsible, ?String message) = native bossa.util.UserError bossa.util.User.error(Located, String); |
From: Daniel B. <bo...@us...> - 2005-04-02 10:55:19
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6073/src/bossa/syntax Modified Files: analyse.nice Log Message: Removed duplicate retyping for User.error Index: analyse.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/analyse.nice,v retrieving revision 1.133 retrieving revision 1.134 diff -C2 -d -r1.133 -r1.134 *** analyse.nice 6 Mar 2005 01:34:26 -0000 1.133 --- analyse.nice 2 Apr 2005 10:55:01 -0000 1.134 *************** *** 930,941 **** } - /**************************************************************** - * Misc - ****************************************************************/ - - bossa.util.UserError error(?bossa.util.Located responsible, String message) = - native bossa.util.UserError bossa.util.User.error - (bossa.util.Located, String); - // Local Variables: // nice-xprogram: "../bin/nicec -d ../classes --sourcepath=../src" --- 930,933 ---- |
From: Artem Gr K. <ar...@us...> - 2005-04-02 09:32:55
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2012 Modified Files: NEWS Log Message: Forced assertions (RFE 1153220) and automatic assertion message. Index: NEWS =================================================================== RCS file: /cvsroot/nice/Nice/NEWS,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** NEWS 26 Mar 2005 15:33:02 -0000 1.74 --- NEWS 2 Apr 2005 09:32:29 -0000 1.75 *************** *** 50,53 **** --- 50,61 ---- uncaught exception. * Bug fixes (negative int hex literals, ...) + * Automatic message is generated for assertions, containing + the failed expression and location of the failed assertion + (which is useful when the code was stripped from debug symbols, + or printStackTraceWithSourceInfo wasn't used). + * Forced (always checked) assertions now are available. + !assert 0==1; // fails always + ?assert 0==1; // fails if assertions enabled + assert 0==1; // fails if assertions enabled -- |
From: Artem Gr K. <ar...@us...> - 2005-04-02 09:14:52
|
Update of /cvsroot/nice/Nice/testsuite/compiler/designByContract In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23393/testsuite/compiler/designByContract Modified Files: assert.testsuite Log Message: Forced assertions (RFE 1153220) and automatic assertion message. Index: assert.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/designByContract/assert.testsuite,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** assert.testsuite 7 Feb 2005 15:41:56 -0000 1.4 --- assert.testsuite 2 Apr 2005 09:14:24 -0000 1.5 *************** *** 69,70 **** --- 69,94 ---- } } + + /// PASS + // assertions have an automatic description + try{ + assert 0 == 1; + }catch(AssertionFailed afe){ + let message = afe.getMessage(); assert message != null; + assert message.indexOf( "==" ) != -1 : message; + assert message.indexOf( "main.nice" ) != -1 : message; + } + + /// PASS + // forced assertions syntax + try{ + !assert 0 == 1; + throw new Exception( "AssertionFailed not thrown." ); + }catch(AssertionFailed ok){} + + /// PASS + // optional assertions sytax + try{ + ?assert 0 == 1; + throw new Exception( "AssertionFailed not thrown." ); + }catch(AssertionFailed ok){} |
From: Artem Gr K. <ar...@us...> - 2005-04-02 09:14:52
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23393/stdlib/nice/lang Modified Files: assertions.nice Log Message: Forced assertions (RFE 1153220) and automatic assertion message. Index: assertions.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/assertions.nice,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** assertions.nice 19 Nov 2003 16:04:46 -0000 1.6 --- assertions.nice 2 Apr 2005 09:14:23 -0000 1.7 *************** *** 30,36 **** --- 30,52 ---- inline nice.lang.inline.Assert(); + /** Always checked assertion. */ + void `!assert`(boolean condition) = + inline nice.lang.inline.Assert("contract"); + + /** Always checked assertion. */ + void `!assert`(boolean condition, String message) = + inline nice.lang.inline.Assert("contract"); + + void `?assert`(boolean condition) = + inline nice.lang.inline.Assert(); + + void `?assert`(boolean condition, String message) = + inline nice.lang.inline.Assert(); + + // Here for bootstrap compatibility. void `alwaysAssert`(boolean condition) = inline nice.lang.inline.Assert("contract"); + // Here for bootstrap compatibility. void `alwaysAssert`(boolean condition, String message) = inline nice.lang.inline.Assert("contract"); |
From: Artem Gr K. <ar...@us...> - 2005-04-02 09:14:33
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23393/src/bossa/syntax Modified Files: contract.nice Log Message: Forced assertions (RFE 1153220) and automatic assertion message. Index: contract.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/contract.nice,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** contract.nice 4 Mar 2005 01:55:19 -0000 1.5 --- contract.nice 2 Apr 2005 09:14:24 -0000 1.6 *************** *** 29,33 **** public void addElement(Expression condition, ?Expression name, boolean precond) { ! let sym = createIdentExp(new LocatedString("alwaysAssert", condition.location())); Expression call; --- 29,33 ---- public void addElement(Expression condition, ?Expression name, boolean precond) { ! let sym = createIdentExp(new LocatedString("!assert", condition.location())); Expression call; |
From: Artem Gr K. <ar...@us...> - 2005-04-02 09:14:33
|
Update of /cvsroot/nice/Nice/src/bossa/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23393/src/bossa/parser Modified Files: Parser.jj Log Message: Forced assertions (RFE 1153220) and automatic assertion message. Index: Parser.jj =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v retrieving revision 1.324 retrieving revision 1.325 diff -C2 -d -r1.324 -r1.325 *** Parser.jj 28 Mar 2005 14:20:23 -0000 1.324 --- Parser.jj 2 Apr 2005 09:14:24 -0000 1.325 *************** *** 211,214 **** --- 211,216 ---- // Assertions | < ASSERT: "assert" > + | < SUREASSERT: "!assert" > /* Nice specific */ + | < MAYBEASSERT: "?assert" > /* Nice specific */ | < REQUIRE: "requires" > | < ENSURE: "ensures" > *************** *** 2920,2929 **** } { ! t = "assert" condition = SideEffectFreeExpression() ( ":" message = SideEffectFreeExpression() { call = bossa.syntax.dispatch.createCallExp(symb(t), condition, message); } | ! { call = bossa.syntax.dispatch.createCallExp(symb(t), condition); } ) { return bossa.syntax.dispatch.createExpressionStmt(call); } --- 2922,2935 ---- } { ! ( t = <ASSERT> | t = <SUREASSERT> | t = <MAYBEASSERT> ) condition = SideEffectFreeExpression() ( ":" message = SideEffectFreeExpression() { call = bossa.syntax.dispatch.createCallExp(symb(t), condition, message); } | ! { ! message = bossa.syntax.dispatch.createStringConstantExp(condition.toString() ! + " failed at " + condition.location().toString().replace('\\','/')); ! call = bossa.syntax.dispatch.createCallExp(symb(t), condition, message); ! } ) { return bossa.syntax.dispatch.createExpressionStmt(call); } |
From: Artem Gr K. <ar...@us...> - 2005-04-02 09:09:50
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20557/src/bossa/syntax Modified Files: javaMethod.nice tools.nice Log Message: ?String getMessage(Throwable) retyping. Index: tools.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/tools.nice,v retrieving revision 1.110 retrieving revision 1.111 diff -C2 -d -r1.110 -r1.111 *** tools.nice 1 Apr 2005 00:09:22 -0000 1.110 --- tools.nice 2 Apr 2005 09:09:24 -0000 1.111 *************** *** 95,98 **** --- 95,102 ---- } + // UserError tolerates null messagess. + bossa.util.UserError User_error(?Located responsible, ?String message) = + native bossa.util.UserError bossa.util.User.error(Located, String); + ?(MonoSymbol, mlsub.typing.Monotype) getInstanceof(CallExp condition) { Index: javaMethod.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/javaMethod.nice,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** javaMethod.nice 1 Apr 2005 16:05:53 -0000 1.14 --- javaMethod.nice 2 Apr 2005 09:09:08 -0000 1.15 *************** *** 248,252 **** } catch(NoClassDefFoundError e) { ! User.warning("Class " + e.getMessage().replace('/','.') + " was not found.\n" + "It is refered to in class " + classType.getName() + --- 248,252 ---- } catch(NoClassDefFoundError e) { ! User.warning("Class " + notNull(e.getMessage()).replace('/','.') + " was not found.\n" + "It is refered to in class " + classType.getName() + |
From: Artem Gr K. <ar...@us...> - 2005-04-02 09:09:34
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20557/stdlib/nice/lang Modified Files: java.nice Log Message: ?String getMessage(Throwable) retyping. Index: java.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/java.nice,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** java.nice 29 Mar 2005 10:28:02 -0000 1.61 --- java.nice 2 Apr 2005 09:09:25 -0000 1.62 *************** *** 77,80 **** --- 77,82 ---- ?Throwable getCause(Throwable) = native Throwable Throwable.getCause(); + ?String getMessage(Throwable) = native String Throwable.getMessage(); + ?String getLocalizedMessage(Throwable) = native String Throwable.getLocalizedMessage(); ?java.io.InputStream getResourceAsStream(ClassLoader, String name) = native java.io.InputStream ClassLoader.getResourceAsStream(String); |
From: Daniel B. <bo...@us...> - 2005-04-01 16:06:04
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10336/src/bossa/syntax Modified Files: javaMethod.nice Log Message: Use the java method name in the full name, not the nice one, to be fully independent of the retyping to identify the java method, in the rare case where those two names are different. Index: javaMethod.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/javaMethod.nice,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** javaMethod.nice 1 Apr 2005 00:09:23 -0000 1.13 --- javaMethod.nice 1 Apr 2005 16:05:53 -0000 1.14 *************** *** 34,40 **** getFullName() { ! return "JAVA:" + name + ':' + ! this.getReflectMethod().getDeclaringClass().getName() + '.' + ! this.getReflectMethod().getSignature(); } --- 34,41 ---- getFullName() { ! let reflectMethod = notNull(reflectMethod); ! return "JAVA:" + reflectMethod.getName() + ':' + ! reflectMethod.getDeclaringClass().getName() + '.' + ! reflectMethod.getSignature(); } |
From: Daniel B. <bo...@us...> - 2005-04-01 16:02:31
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8695/stdlib/nice/lang Modified Files: range.nice Log Message: Added missing List method implementations. Index: range.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/range.nice,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** range.nice 13 Aug 2004 12:44:04 -0000 1.4 --- range.nice 1 Apr 2005 16:02:21 -0000 1.5 *************** *** 50,53 **** --- 50,54 ---- add(elem) = throw new UnsupportedOperationException(); + add(index, elem) = throw new UnsupportedOperationException(); contains(elem) = begin.index <= cast(elem) <= end.index; *************** *** 60,63 **** --- 61,65 ---- remove(elem) = throw new UnsupportedOperationException(); + removeAt(index) = throw new UnsupportedOperationException(); removeAll(elems) = throw new UnsupportedOperationException(); } |
From: Artem Gr K. <ar...@us...> - 2005-04-01 15:44:07
|
Update of /cvsroot/nice/Nice/regtest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29621/regtest Modified Files: regtest Log Message: expr: use standard ":" instead of "match" (to run under FreeBSD). Index: regtest =================================================================== RCS file: /cvsroot/nice/Nice/regtest/regtest,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** regtest 20 Feb 2004 13:25:16 -0000 1.27 --- regtest 1 Apr 2005 15:43:42 -0000 1.28 *************** *** 6,10 **** # PWD return different values on different systems: # Nice/regtest with bash on Linux, Nice/ under sh on Digital Unix ! if expr match $NICE_TOP '.*regtest$' >/dev/null; then NICE_TOP=`dirname $NICE_TOP` fi --- 6,10 ---- # PWD return different values on different systems: # Nice/regtest with bash on Linux, Nice/ under sh on Digital Unix ! if expr $NICE_TOP : '.*regtest$' >/dev/null; then NICE_TOP=`dirname $NICE_TOP` fi |
From: Artem Gr K. <ar...@us...> - 2005-04-01 15:09:33
|
Update of /cvsroot/nice/tester In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9120 Modified Files: Project Regression.test Testsuite.test gcj.test run Log Message: Support Ant compilation undler FreeBSD toolchain. Index: Testsuite.test =================================================================== RCS file: /cvsroot/nice/tester/Testsuite.test,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Testsuite.test 7 May 2004 08:54:37 -0000 1.1 --- Testsuite.test 1 Apr 2005 15:09:15 -0000 1.2 *************** *** 3,7 **** cd Nice ! /usr/bin/time -o TIME make check > OUT RES=$? --- 3,11 ---- cd Nice ! if [ "$ANT_BOOTSTRAP" ]; then ! /usr/bin/time -o TIME ant check > OUT ! else ! /usr/bin/time -o TIME make check > OUT ! fi RES=$? *************** *** 11,15 **** NUM_PREFIX="number of testcases: " NUM=`tail -10 OUT | grep "$NUM_PREFIX"` ! NUM=`expr match "$NUM" "$NUM_PREFIX"'\(.*\)'` echo num_tests $NUM time `cat TIME` > ../METRICS --- 15,19 ---- NUM_PREFIX="number of testcases: " NUM=`tail -10 OUT | grep "$NUM_PREFIX"` ! NUM=`expr "$NUM" : "$NUM_PREFIX"'\(.*\)'` echo num_tests $NUM time `cat TIME` > ../METRICS Index: Regression.test =================================================================== RCS file: /cvsroot/nice/tester/Regression.test,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Regression.test 7 May 2004 08:54:37 -0000 1.1 --- Regression.test 1 Apr 2005 15:09:15 -0000 1.2 *************** *** 11,15 **** #NUM_PREFIX="number of testcases: " #NUM=`tail -10 OUT | grep "$NUM_PREFIX"` ! #NUM=`expr match "$NUM" "$NUM_PREFIX"'\(.*\)'` echo time `cat TIME` > ../METRICS --- 11,15 ---- #NUM_PREFIX="number of testcases: " #NUM=`tail -10 OUT | grep "$NUM_PREFIX"` ! #NUM=`expr "$NUM" : "$NUM_PREFIX"'\(.*\)'` echo time `cat TIME` > ../METRICS Index: Project =================================================================== RCS file: /cvsroot/nice/tester/Project,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Project 7 Sep 2004 12:19:29 -0000 1.11 --- Project 1 Apr 2005 15:09:15 -0000 1.12 *************** *** 9,12 **** --- 9,19 ---- fi + if [ "$ANT_BOOTSTRAP" ]; then + mkdir -p Nice/share/java + cp Nice/external/nice-bootstrap.jar Nice/share/java/nice.jar + cd Nice && ant jar + exit 0 + fi + # In benchmark mode, don't run the testsuite if [ "$CVS_DATE" ]; then Index: run =================================================================== RCS file: /cvsroot/nice/tester/run,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** run 31 Mar 2005 07:29:26 -0000 1.16 --- run 1 Apr 2005 15:09:16 -0000 1.17 *************** *** 52,56 **** for conffile in ../config.*; do ! name="`expr match $conffile '../config\.\(.*\)'`" # Blank the variable, so it does not keep the previous value if it --- 52,56 ---- for conffile in ../config.*; do ! name="`expr $conffile : '../config\.\(.*\)'`" # Blank the variable, so it does not keep the previous value if it *************** *** 80,84 **** for test in ../*.test; do ! testname="`expr match $test '../\(.*\)\.test'`" echo "<a name='$testname'>" echo "" --- 80,84 ---- for test in ../*.test; do ! testname="`expr $test : '../\(.*\)\.test'`" echo "<a name='$testname'>" echo "" Index: gcj.test =================================================================== RCS file: /cvsroot/nice/tester/gcj.test,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gcj.test 30 Mar 2005 21:02:41 -0000 1.3 --- gcj.test 1 Apr 2005 15:09:16 -0000 1.4 *************** *** 14,18 **** NUM_PREFIX=" regressions: " NUM=`tail -10 OUT | grep "$NUM_PREFIX"` ! NUM=`expr match "$NUM" "$NUM_PREFIX"'\(.*\)'` # Number of errors is encoded as 10+number (since smaller numbers have --- 14,18 ---- NUM_PREFIX=" regressions: " NUM=`tail -10 OUT | grep "$NUM_PREFIX"` ! NUM=`expr "$NUM" : "$NUM_PREFIX"'\(.*\)'` # Number of errors is encoded as 10+number (since smaller numbers have |
From: Artem Gr K. <ar...@us...> - 2005-04-01 15:08:35
|
Update of /cvsroot/nice/Nice/testsuite/compiler/overloading In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9544/testsuite/compiler/overloading Modified Files: fields.testsuite Log Message: Overloading bug found. Index: fields.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/overloading/fields.testsuite,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** fields.testsuite 12 Mar 2005 15:06:13 -0000 1.3 --- fields.testsuite 1 Apr 2005 15:07:54 -0000 1.4 *************** *** 1,4 **** --- 1,14 ---- /// COMMENT Special handling of class fields during overloading resolution. + /// PASS bug + /// Toplevel + class Bar { + Map<String,String> db; + } + class Foo { + Map<String,String> db; + Object dbLock() = db; + } + /// PASS let i = x; |
From: Daniel B. <bo...@us...> - 2005-04-01 12:53:46
|
Update of /cvsroot/nice/tester In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3941 Removed Files: config-bench Log Message: config-bench is a local config file only --- config-bench DELETED --- |
From: Arjan B. <ar...@us...> - 2005-04-01 12:12:19
|
Update of /cvsroot/nice/Nice/src/mlsub/typing/lowlevel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11982/F:/nice/src/mlsub/typing/lowlevel Modified Files: DomainVector.java K0.java Satisfier.java Log Message: Copy constructor for DomainVector. Index: K0.java =================================================================== RCS file: /cvsroot/nice/Nice/src/mlsub/typing/lowlevel/K0.java,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** K0.java 31 Mar 2005 09:26:39 -0000 1.29 --- K0.java 1 Apr 2005 12:12:04 -0000 1.30 *************** *** 1359,1363 **** this.savedGarbage = new BitVector(K0.this.garbage); ! this.savedDomains = (DomainVector)K0.this.domains.clone(); /* this.savedImplementors = new BitVector[K0.this.nInterfaces()]; --- 1359,1363 ---- this.savedGarbage = new BitVector(K0.this.garbage); ! this.savedDomains = new DomainVector(K0.this.domains); /* this.savedImplementors = new BitVector[K0.this.nInterfaces()]; *************** *** 1792,1796 **** if (!garbage.get(excludedA) && simplified.get(excludedA)) { int x; ! DomainVector savedDomains = (DomainVector)Sdomains.clone(); try { if (S.debugSimpl) { --- 1792,1796 ---- if (!garbage.get(excludedA) && simplified.get(excludedA)) { int x; ! DomainVector savedDomains = new DomainVector(Sdomains); try { if (S.debugSimpl) { Index: DomainVector.java =================================================================== RCS file: /cvsroot/nice/Nice/src/mlsub/typing/lowlevel/DomainVector.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DomainVector.java 31 Mar 2005 09:26:39 -0000 1.7 --- DomainVector.java 1 Apr 2005 12:12:04 -0000 1.8 *************** *** 15,18 **** --- 15,31 ---- int width; // size of domains + public DomainVector(DomainVector old) { + super(old.size()); + this.offset = old.offset; + this.width = old.width; + for (int i = 0; i < old.size(); i++) { + Domain d = ((Domain)old.get(i)); + if (d != null) + add(new Domain(d)); + else + add(null); + } + } + public DomainVector(int offset, int width) { this.offset = offset; *************** *** 97,111 **** } - public Object clone() { - DomainVector result = (DomainVector)super.clone(); - for (int i = 0; i < size(); i++) { - Domain d = ((Domain)get(i)); - if (d != null) { - result.set(i, new Domain(d)); - } - } - return result; - } - /*********************************************************************** * Fix-point computations --- 110,113 ---- Index: Satisfier.java =================================================================== RCS file: /cvsroot/nice/Nice/src/mlsub/typing/lowlevel/Satisfier.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Satisfier.java 30 Mar 2005 23:08:17 -0000 1.4 --- Satisfier.java 1 Apr 2005 12:12:05 -0000 1.5 *************** *** 49,53 **** a >= 0; a = dx.getNextBit(a)) { ! DomainVector domainsCopy = (DomainVector)domains.clone(); try { domainsCopy.getDomain(x).instantiate(a); --- 49,53 ---- a >= 0; a = dx.getNextBit(a)) { ! DomainVector domainsCopy = new DomainVector(domains); try { domainsCopy.getDomain(x).instantiate(a); *************** *** 94,98 **** a >= 0; a = dx.getNextBit(a)) { ! DomainVector domainsCopy = (DomainVector)domains.clone(); try { domainsCopy.getDomain(x).instantiate(a); --- 94,98 ---- a >= 0; a = dx.getNextBit(a)) { ! DomainVector domainsCopy = new DomainVector(domains); try { domainsCopy.getDomain(x).instantiate(a); |
From: Daniel B. <bo...@us...> - 2005-04-01 09:32:52
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20613/src/bossa/syntax Modified Files: retypedMethod.nice Log Message: Moved addToScope up to reflect pass order. Add test for nullness of reflectMethod since ignoredRetyping is not computed yet at that point. Index: retypedMethod.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/retypedMethod.nice,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** retypedMethod.nice 1 Apr 2005 00:09:23 -0000 1.12 --- retypedMethod.nice 1 Apr 2005 09:32:32 -0000 1.13 *************** *** 64,67 **** --- 64,75 ---- } + addToScope() + { + // Put the symbol in the java scope, so it's available globally, + // even to packages that don't import the current one. See testcase. + if (! ignoredRetyping && reflectMethod != null) + addJavaSymbol(notNull(reflectMethod), this); + } + doResolve() { *************** *** 79,90 **** } - addToScope() - { - // Put the symbol in the java scope, so it's available globally, - // even to packages that don't import the current one. See testcase. - if (! ignoredRetyping) - addJavaSymbol(notNull(reflectMethod), this); - } - isIgnored() = ignoredRetyping; --- 87,90 ---- |
From: Daniel B. <bo...@us...> - 2005-04-01 00:09:52
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21519/src/bossa/syntax Modified Files: tools.nice retypedMethod.nice new.nice methodbody.nice methodDeclaration.nice javaMethod.nice javaFieldAccess.nice ident.nice alternative.nice Log Message: Lazily load only those retypings that might be used in the program, based on the set of identifiers used in the program. Index: methodDeclaration.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/methodDeclaration.nice,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** methodDeclaration.nice 30 Mar 2005 11:43:02 -0000 1.8 --- methodDeclaration.nice 1 Apr 2005 00:09:23 -0000 1.9 *************** *** 244,247 **** --- 244,249 ---- } + boolean hasFullName(String name) = this.getFullName().equals(name); + public boolean specializesMethods() { *************** *** 317,321 **** } ! let char methodListSeparator = ';'; /** Whether typechecking is currently happening in the global context */ --- 319,323 ---- } ! let char methodListSeparator = '\n'; /** Whether typechecking is currently happening in the global context */ Index: retypedMethod.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/retypedMethod.nice,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** retypedMethod.nice 30 Mar 2005 08:02:08 -0000 1.11 --- retypedMethod.nice 1 Apr 2005 00:09:23 -0000 1.12 *************** *** 31,35 **** // We put this here, since we need 'module' to be computed // since it is used to open the imported packages. ! this.findReflectMethod(); super; --- 31,78 ---- // We put this here, since we need 'module' to be computed // since it is used to open the imported packages. ! if (this.needed()) ! this.findReflectMethod(); ! ! super; ! } ! ! private boolean needed() ! { ! // We only load the method eagerly if the retyping is being compiled ! // from source. ! // Otherwise, we do it lazily if the method name is actually used in the ! // program. ! if (! this.inInterfaceFile() ! // The nice name can differ from the original one, and both can be used ! // to refer to this method ! || usedIdentifiers.contains(methodName) ! || usedIdentifiers.contains(this.getName().toString())) ! return true; ! ! if (methodName.equals("<init>")) ! { ! // Since the package is compiled, we know className is qualified. ! ! let shortName = unqualifyName(className.toString()); ! ! if (usedIdentifiers.contains(className.toString()) ! || usedIdentifiers.contains(shortName)) ! return true; ! } ! ! return false; ! } ! ! doResolve() ! { ! if (ignoredRetyping) ! return; ! ! if (reflectMethod == null) ! // lazy loading, we are not needed ! { ! this.setIgnoredRetyping(this, "This method is not used"); ! return; ! } super; *************** *** 46,49 **** --- 89,94 ---- isIgnored() = ignoredRetyping; + hasFullName(String name) = ! ignoredRetyping && super; + private ?gnu.bytecode.Type type(LocatedString s) { *************** *** 131,134 **** --- 176,182 ---- } + if (bossa.util.Debug.javaTypes) + bossa.util.Debug.println("Loaded retyped method " + this); + // use the following, or the Type.flushTypeChanges() in SpecialTypes //reflectMethod.arg_types = javaArgType; *************** *** 224,227 **** --- 272,284 ---- return res + ")"; } + + toString() + { + // For debugging only + if (this.getType() == null) + return "retyped method "className"."methodName; + else + return super; + } } Index: javaMethod.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/javaMethod.nice,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** javaMethod.nice 30 Mar 2005 12:42:34 -0000 1.12 --- javaMethod.nice 1 Apr 2005 00:09:23 -0000 1.13 *************** *** 34,38 **** getFullName() { ! return "JAVA:" + name + ':' + this.getType(); } --- 34,40 ---- getFullName() { ! return "JAVA:" + name + ':' + ! this.getReflectMethod().getDeclaringClass().getName() + '.' + ! this.getReflectMethod().getSignature(); } *************** *** 115,118 **** --- 117,126 ---- void registerMethod(gnu.bytecode.Method m) { + if (usedIdentifiers.contains(m.getName())) + { + addJavaSymbol(m, makeJavaMethod(m, false)); + return; + } + ?List<gnu.bytecode.Method> methods = knownMethods.get(m.getName()); if (methods == null) *************** *** 122,125 **** --- 130,140 ---- } + let HashSet<String> usedIdentifiers = new HashSet(); + + void registerUsedIdentifier(String ident) + { + usedIdentifiers.add(ident); + } + /** Utility function for analyse.nice */ *************** *** 339,342 **** --- 354,358 ---- retyped.clear(); knownMethods.clear(); + usedIdentifiers.clear(); javaObjectConstructor = null; } Index: tools.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/tools.nice,v retrieving revision 1.109 retrieving revision 1.110 diff -C2 -d -r1.109 -r1.110 *** tools.nice 26 Mar 2005 00:48:09 -0000 1.109 --- tools.nice 1 Apr 2005 00:09:22 -0000 1.110 *************** *** 156,159 **** --- 156,168 ---- printStackTraceWithSourceInfo(t); + String unqualifyName(String qualified) + { + int end = qualified.lastIndexOf('.'); + if (end == -1) + return qualified; + else + return qualified.substring(end + 1); + } + /**************************************************************** * Temporary: this should be solved when AST classes are written Index: new.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/new.nice,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** new.nice 17 Jan 2005 18:26:18 -0000 1.11 --- new.nice 1 Apr 2005 00:09:23 -0000 1.12 *************** *** 23,26 **** --- 23,31 ---- private final TypeIdent ti; + { + // Used to decide which constructor retypings need to be loaded. + registerUsedIdentifier(ti.getName().toString()); + } + /** Can be null if the class instantiated is Object. */ ?mlsub.typing.TypeConstructor tc = null; Index: alternative.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/alternative.nice,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** alternative.nice 25 Mar 2005 16:39:59 -0000 1.12 --- alternative.nice 1 Apr 2005 00:09:23 -0000 1.13 *************** *** 445,449 **** MethodDeclaration md = notNull(sym.getMethodDeclaration()); ! if (md.getFullName().equals(fullName)) { cast(md).registerForDispatch(); --- 445,449 ---- MethodDeclaration md = notNull(sym.getMethodDeclaration()); ! if (md.hasFullName(fullName)) { cast(md).registerForDispatch(); Index: javaFieldAccess.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/javaFieldAccess.nice,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** javaFieldAccess.nice 25 Mar 2005 16:40:00 -0000 1.8 --- javaFieldAccess.nice 1 Apr 2005 00:09:23 -0000 1.9 *************** *** 39,42 **** --- 39,46 ---- super; + if (this.inInterfaceFile() && + ! usedIdentifiers.contains(this.getName().toString())) + return; + // We put this here, since we need 'module' to be computed // since it is used to open the imported packages. *************** *** 141,144 **** --- 145,151 ---- ?MethodDeclaration makeJavaFieldAccess(gnu.bytecode.Field f) { + if (! usedIdentifiers.contains(f.getName())) + return null; + try { mlsub.typing.Monotype[?] params; Index: ident.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/ident.nice,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ident.nice 14 Jan 2005 16:41:27 -0000 1.3 --- ident.nice 1 Apr 2005 00:09:23 -0000 1.4 *************** *** 23,26 **** --- 23,30 ---- final LocatedString ident; + { + registerUsedIdentifier(ident.toString()); + } + private boolean infix = false; /** Resolve to a ClassExp or a PackageExp if ident is not known. */ Index: methodbody.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/methodbody.nice,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** methodbody.nice 25 Mar 2005 16:40:00 -0000 1.16 --- methodbody.nice 1 Apr 2005 00:09:23 -0000 1.17 *************** *** 21,24 **** --- 21,28 ---- public class MethodBodyDefinition extends MethodImplementation { + { + registerUsedIdentifier(name.toString()); + } + ?Collection<LocatedString> binders; // Null if type parameters are not bound |