nice-commit Mailing List for The Nice Programming Language (Page 111)
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-05-07 09:50:54
|
Update of /cvsroot/nice/tester
In directory sc8-pr-cvs1:/tmp/cvs-serv23640
Modified Files:
Project
Log Message:
Stop early in case of error.
Only download the bootstrap compiler when needed.
Index: Project
===================================================================
RCS file: /cvsroot/nice/tester/Project,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Project 26 Apr 2003 23:32:09 -0000 1.4
--- Project 7 May 2003 09:50:51 -0000 1.5
***************
*** 1,8 ****
#! /bin/sh
if [ ! -r Nice ]; then
cvs -d:pserver:anonymous@$CVS_SOURCEFORGE:/cvsroot/nice export -rHEAD Nice
fi
- wget -O Nice/external/nice-bootstrap.jar http://nice.sf.net/nice.jar
cd Nice && make world
--- 1,11 ----
#! /bin/sh
+ # Stop on errors
+ set -e
+
if [ ! -r Nice ]; then
cvs -d:pserver:anonymous@$CVS_SOURCEFORGE:/cvsroot/nice export -rHEAD Nice
+ wget -O Nice/external/nice-bootstrap.jar http://nice.sf.net/nice.jar
fi
cd Nice && make world
|
|
From: <bo...@us...> - 2003-05-07 08:26:17
|
Update of /cvsroot/nice/Nice/src/bossa/syntax
In directory sc8-pr-cvs1:/tmp/cvs-serv1025/src/bossa/syntax
Modified Files:
Monotype.java FunType.java
Log Message:
Fix class methods with void -> T arguments.
Index: Monotype.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Monotype.java,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** Monotype.java 17 Feb 2003 14:09:55 -0000 1.31
--- Monotype.java 7 May 2003 08:26:12 -0000 1.32
***************
*** 36,40 ****
}
! static Monotype[] array0 = new Monotype[0];
/****************************************************************
--- 36,40 ----
}
! static final Monotype[] array0 = new Monotype[0];
/****************************************************************
Index: FunType.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/FunType.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** FunType.java 17 Jun 2002 22:17:01 -0000 1.27
--- FunType.java 7 May 2003 08:26:12 -0000 1.28
***************
*** 36,40 ****
public FunType(bossa.syntax.Monotype[] in, bossa.syntax.Monotype out)
{
! this.in = in;
this.out = out;
}
--- 36,40 ----
public FunType(bossa.syntax.Monotype[] in, bossa.syntax.Monotype out)
{
! this.in = (in != null ? in : bossa.syntax.Monotype.array0);
this.out = out;
}
|
|
From: <bo...@us...> - 2003-05-07 08:26:15
|
Update of /cvsroot/nice/Nice/testsuite/compiler/classes
In directory sc8-pr-cvs1:/tmp/cvs-serv1025/testsuite/compiler/classes
Modified Files:
methods.testsuite
Log Message:
Fix class methods with void -> T arguments.
Index: methods.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/classes/methods.testsuite,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** methods.testsuite 6 Dec 2002 13:18:52 -0000 1.1
--- methods.testsuite 7 May 2003 08:26:11 -0000 1.2
***************
*** 10,11 ****
--- 10,19 ----
/*/// FAIL HERE */ methodA() {}
}
+
+ /// PASS
+ /// Toplevel
+ class A {
+ <Any T> T local(void -> T f) {
+ return f();
+ }
+ }
|
|
From: <bo...@us...> - 2003-05-06 13:27:46
|
Update of /cvsroot/nice/Nice/distrib In directory sc8-pr-cvs1:/tmp/cvs-serv31949/distrib Modified Files: .cvsignore Log Message: Build non-native debian packages. The CVS repository is now tagged with version_x_y_z for version x.y.z. A self-contained .tar.gz source archive is now produced, which allows a clean bootstrap, without depending on an already installed version of Nice. That archive constitutes the official release of Nice. For instance, the debian source package can now be defined as a diff with that archive. Index: .cvsignore =================================================================== RCS file: /cvsroot/nice/Nice/distrib/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 16 Jul 2002 16:09:49 -0000 1.1 --- .cvsignore 6 May 2003 13:27:41 -0000 1.2 *************** *** 1,4 **** --- 1,14 ---- Nice-*-windows.zip Nice-*.tar + *.tar.gz + + # Debian + *.dsc + *.deb + *.diff.gz + *.changes + + # Temp directories tmp tmp-deb + nice-* |
|
From: <bo...@us...> - 2003-05-06 13:27:18
|
Update of /cvsroot/nice/Nice/distrib In directory sc8-pr-cvs1:/tmp/cvs-serv31796/distrib Removed Files: prepare-bootstrap Log Message: Build non-native debian packages. The CVS repository is now tagged with version_x_y_z for version x.y.z. A self-contained .tar.gz source archive is now produced, which allows a clean bootstrap, without depending on an already installed version of Nice. That archive constitutes the official release of Nice. For instance, the debian source package can now be defined as a diff with that archive. --- prepare-bootstrap DELETED --- |
|
From: <bo...@us...> - 2003-05-06 13:25:19
|
Update of /cvsroot/nice/Nice/distrib
In directory sc8-pr-cvs1:/tmp/cvs-serv30983/distrib
Modified Files:
Makefile
Log Message:
Build non-native debian packages.
The CVS repository is now tagged with version_x_y_z for version x.y.z.
A self-contained .tar.gz source archive is now produced, which allows a clean
bootstrap, without depending on an already installed version of Nice.
That archive constitutes the official release of Nice. For instance, the
debian source package can now be defined as a diff with that archive.
Index: Makefile
===================================================================
RCS file: /cvsroot/nice/Nice/distrib/Makefile,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Makefile 19 Apr 2003 15:04:01 -0000 1.4
--- Makefile 6 May 2003 13:25:12 -0000 1.5
***************
*** 1,28 ****
# Get the version from the debian changelog.
VERSION = ${shell expr "`head -1 ../debian/changelog`" : '.*(\(.*\))'}
DEB = nice_${VERSION}_all.deb
! TARFILE = Nice-${VERSION}.tar
ZIPFILE = Nice-${VERSION}-windows.zip
- CVSBUILDDIR = ${CURDIR}/tmp-deb
- BUILDROOT = ${CVSBUILDDIR}/nice-${VERSION}
ZIP_ROOT = tmp/Nice
RPMTMP = tmp/Nice-${VERSION}
RPMDIR = ${CURDIR}/tmp/noarch
RPMFILE = Nice-${VERSION}-1.noarch.rpm
clean-tmp = rm -rf tmp && mkdir tmp
all: deb tar zip rpm
! deb $(CVSBUILDDIR)/$(DEB):
@echo Creating Debian package version ${VERSION}
! cd .. && env CVSROOT=:pserver:ano...@cv...:/cvsroot/nice cvs-buildpackage -MNice -W${CVSBUILDDIR} -H${PWD}/prepare-bootstrap -us -uc -rfakeroot -F
.PHONY: tar
! tar ${TARFILE}: $(CVSBUILDDIR)/$(DEB)
${clean-tmp}
! cd $(CVSBUILDDIR)/nice-$(VERSION) && $(MAKE) install PREFIX=${CURDIR}/tmp
! cd tmp && tar -cf ../${TARFILE} . --owner=0 --group=0
.PHONY: rpm
--- 1,47 ----
# Get the version from the debian changelog.
VERSION = ${shell expr "`head -1 ../debian/changelog`" : '.*(\(.*\))'}
+ TAG = $(shell echo -n "version_$(VERSION)" | tr -c -- "-_a-zA-Z0-9" "_")
+
+ DEBVERSION = ${shell expr "$(VERSION)" : '.*-\([0-9]\)'}
DEB = nice_${VERSION}_all.deb
!
! BUILDROOT = ${CURDIR}/nice-$(VERSION)
!
! BUILTSOURCEFILE = nice_$(VERSION).orig.tar.gz
! TARFILE = Nice-${VERSION}-unix.tar.gz
! SOURCEFILE = Nice-${VERSION}-source.tar.gz
!
ZIPFILE = Nice-${VERSION}-windows.zip
ZIP_ROOT = tmp/Nice
+
RPMTMP = tmp/Nice-${VERSION}
RPMDIR = ${CURDIR}/tmp/noarch
RPMFILE = Nice-${VERSION}-1.noarch.rpm
+ CVSROOT=:pserver:ano...@cv...:/cvsroot/nice
+
clean-tmp = rm -rf tmp && mkdir tmp
all: deb tar zip rpm
! deb $(DEB):
@echo Creating Debian package version ${VERSION}
! rm -rf $(BUILDROOT) $(BUILDROOT).orig
! cd .. && cvs tag -F $(TAG)
! CVSROOT=$(CVSROOT) cvs export -d $(BUILDROOT).orig -r $(TAG) Nice
! mv -f $(BUILDROOT).orig/debian $(BUILDROOT).orig-debian
! find $(BUILDROOT).orig -name '.cvsignore' | xargs rm
! cp ../share/java/nice.jar $(BUILDROOT).orig/external/nice-bootstrap.jar
! tar zcvf $(BUILTSOURCEFILE) $(BUILDROOT).orig
! mv $(BUILDROOT).orig-debian $(BUILDROOT).orig/debian
! mv $(BUILDROOT).orig $(BUILDROOT)
! cd $(BUILDROOT) && dpkg-buildpackage -us -uc -rfakeroot -sa
.PHONY: tar
! tar ${TARFILE}: $(DEB)
${clean-tmp}
! cd $(BUILDROOT) && $(MAKE) install PREFIX=${CURDIR}/tmp
! cd tmp && tar -czf ../${TARFILE} . --owner=0 --group=0
.PHONY: rpm
***************
*** 32,36 ****
mkdir -p ${RPMTMP}/usr
mkdir -p tmp/BUILD
! cd ${RPMTMP}/usr && tar xvf ${CURDIR}/${TARFILE}
cd tmp && tar zcvf ${CURDIR}/tmp/Nice-${VERSION}.tar.gz Nice-${VERSION}
sed "s/VERSION/${VERSION}/" Nice.spec > tmp/Nice-${VERSION}.spec
--- 51,55 ----
mkdir -p ${RPMTMP}/usr
mkdir -p tmp/BUILD
! cd ${RPMTMP}/usr && tar xzf ${CURDIR}/${TARFILE}
cd tmp && tar zcvf ${CURDIR}/tmp/Nice-${VERSION}.tar.gz Nice-${VERSION}
sed "s/VERSION/${VERSION}/" Nice.spec > tmp/Nice-${VERSION}.spec
***************
*** 39,43 ****
.PHONY: zip
! zip ${ZIPFILE}: $(CVSBUILDDIR)/$(DEB)
${clean-tmp}
mkdir ${ZIP_ROOT}
--- 58,62 ----
.PHONY: zip
! zip ${ZIPFILE}: $(DEB)
${clean-tmp}
mkdir ${ZIP_ROOT}
***************
*** 55,59 ****
echo binary; echo cd incoming; \
echo put ${TARFILE}; echo put ${ZIPFILE}; \
! echo lcd ${CVSBUILDDIR}; echo put ${DEB}; \
echo lcd ${RPMDIR}; echo put ${RPMFILE} \
)\
--- 74,78 ----
echo binary; echo cd incoming; \
echo put ${TARFILE}; echo put ${ZIPFILE}; \
! echo put ${DEB}; echo put ${BUILTSOURCEFILE} ${SOURCEFILE}; \
echo lcd ${RPMDIR}; echo put ${RPMFILE} \
)\
|
|
From: <ar...@us...> - 2003-05-06 08:18:59
|
Update of /cvsroot/nice/Nice/src/bossa/parser
In directory sc8-pr-cvs1:/tmp/cvs-serv4783/F:/nice/src/bossa/parser
Modified Files:
Parser.jj
Log Message:
Fix lookahead of funexp so the body of the funxep doesn't get looked ahead because that can cause really too big errormessages.
Index: Parser.jj
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v
retrieving revision 1.168
retrieving revision 1.169
diff -C2 -d -r1.168 -r1.169
*** Parser.jj 5 May 2003 14:08:12 -0000 1.168
--- Parser.jj 6 May 2003 08:18:56 -0000 1.169
***************
*** 1426,1430 ****
[ "="
(
! LOOKAHEAD(funExp()) value=funExp()
|
value=SideEffectFreeExpression()
--- 1426,1430 ----
[ "="
(
! LOOKAHEAD(funExpLookahead()) value=funExp()
|
value=SideEffectFreeExpression()
***************
*** 1435,1439 ****
t=monotype() name=ident() "="
(
! LOOKAHEAD(funExp()) value=funExp()
|
value=SideEffectFreeExpression()
--- 1435,1439 ----
t=monotype() name=ident() "="
(
! LOOKAHEAD(funExpLookahead()) value=funExp()
|
value=SideEffectFreeExpression()
***************
*** 1595,1598 ****
--- 1595,1611 ----
}
+ FunExp funExpLookahead():
+ {}
+ {
+ (
+ LOOKAHEAD ( ["fun"] constraint() "(" monoSymbols() ")" )
+ ["fun"] constraint() "(" monoSymbols() ")"
+ |
+ monoSymbol()
+ )
+ "=>"
+ { return null; }
+ }
+
FunExp funExp():
{
***************
*** 1777,1781 ****
(
! LOOKAHEAD(funExp()) e1=funExp()
| e1=ClassicExpression()
)
--- 1790,1794 ----
(
! LOOKAHEAD(funExpLookahead()) e1=funExp()
| e1=ClassicExpression()
)
|
|
From: <bo...@us...> - 2003-05-05 16:39:48
|
Update of /cvsroot/nice/Nice/debian
In directory sc8-pr-cvs1:/tmp/cvs-serv9760/debian
Modified Files:
changelog
Log Message:
When a constraint implies by minimality that a rigid element is below
another rigid element, fail fast, instead of modifying destructively
the rigid constraint.
Index: changelog
===================================================================
RCS file: /cvsroot/nice/Nice/debian/changelog,v
retrieving revision 1.158
retrieving revision 1.159
diff -C2 -d -r1.158 -r1.159
*** changelog 3 May 2003 17:41:05 -0000 1.158
--- changelog 5 May 2003 16:39:45 -0000 1.159
***************
*** 56,60 ****
* Improved error messages for possibly null values in assignments (Daniel),
and for incorrect calls to constructors (Bryn Keller).
! * Bugfix (overloaded symbols used inside && or || expressions).
-- Daniel Bonniot <bo...@us...> Sat, 19 Apr 2003 10:40:02 +0200
--- 56,60 ----
* Improved error messages for possibly null values in assignments (Daniel),
and for incorrect calls to constructors (Bryn Keller).
! * Bugfix (overloaded symbols used inside && or || expressions, ...).
-- Daniel Bonniot <bo...@us...> Sat, 19 Apr 2003 10:40:02 +0200
|
|
From: <bo...@us...> - 2003-05-05 16:39:47
|
Update of /cvsroot/nice/Nice/src/mlsub/typing/lowlevel
In directory sc8-pr-cvs1:/tmp/cvs-serv9760/src/mlsub/typing/lowlevel
Modified Files:
K0.java
Log Message:
When a constraint implies by minimality that a rigid element is below
another rigid element, fail fast, instead of modifying destructively
the rigid constraint.
Index: K0.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/mlsub/typing/lowlevel/K0.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** K0.java 5 Apr 2003 11:13:18 -0000 1.15
--- K0.java 5 May 2003 16:39:44 -0000 1.16
***************
*** 871,874 ****
--- 871,877 ----
}
if (x != y && !C.get(y, x)) {
+ // If x is a rigid variable, this is a clash.
+ if (x < m0)
+ throw new LowlevelRigidClash(indexToString(x), indexToString(y));
// set y < x
C.set(y, x);
|
|
From: <bo...@us...> - 2003-05-05 16:39:47
|
Update of /cvsroot/nice/Nice/testsuite/compiler/overloading
In directory sc8-pr-cvs1:/tmp/cvs-serv9760/testsuite/compiler/overloading
Modified Files:
complex.testsuite
Log Message:
When a constraint implies by minimality that a rigid element is below
another rigid element, fail fast, instead of modifying destructively
the rigid constraint.
Index: complex.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/overloading/complex.testsuite,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** complex.testsuite 5 May 2003 09:29:33 -0000 1.1
--- complex.testsuite 5 May 2003 16:39:44 -0000 1.2
***************
*** 1,3 ****
! /// PASS bug
String[] oa2 = ["abc"];
System.out.println(""+equals([null], oa2));
--- 1,3 ----
! /// PASS
String[] oa2 = ["abc"];
System.out.println(""+equals([null], oa2));
***************
*** 5,9 ****
<T,U,V | U <: T, V <: T> boolean equals(U[], V[]) = native boolean Arrays.equals(Object[],Object[]);
! /// PASS bug
String[] sa1 = ["xyz"];
eq2(sa1, [null]);
--- 5,9 ----
<T,U,V | U <: T, V <: T> boolean equals(U[], V[]) = native boolean Arrays.equals(Object[],Object[]);
! /// PASS
String[] sa1 = ["xyz"];
eq2(sa1, [null]);
***************
*** 13,17 ****
<Any T> boolean eq2(?T, ?T) = false;
! /// PASS bug
List<String> list1 = new ArrayList();
List<int> list2 = new ArrayList();
--- 13,17 ----
<Any T> boolean eq2(?T, ?T) = false;
! /// PASS
List<String> list1 = new ArrayList();
List<int> list2 = new ArrayList();
|
|
From: <bo...@us...> - 2003-05-05 14:08:15
|
Update of /cvsroot/nice/Nice/src/bossa/parser
In directory sc8-pr-cvs1:/tmp/cvs-serv28548/src/bossa/parser
Modified Files:
Parser.jj
Log Message:
Make sure that a class named Array in the local package is not used
for the syntax Type[].
Index: Parser.jj
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v
retrieving revision 1.167
retrieving revision 1.168
diff -C2 -d -r1.167 -r1.168
*** Parser.jj 1 May 2003 11:02:17 -0000 1.167
--- Parser.jj 5 May 2003 14:08:12 -0000 1.168
***************
*** 799,803 ****
Location loc = res.location().englobe(new Location(end));
res = new MonotypeConstructor
! (new TypeIdent(new LocatedString("Array", loc)),
new TypeParameters(tp),
loc);
--- 799,803 ----
Location loc = res.location().englobe(new Location(end));
res = new MonotypeConstructor
! (new TypeIdent(new LocatedString("nice.lang.Array", loc)),
new TypeParameters(tp),
loc);
|
|
From: <bo...@us...> - 2003-05-05 14:08:15
|
Update of /cvsroot/nice/Nice/testsuite/lib/nice/lang
In directory sc8-pr-cvs1:/tmp/cvs-serv28548/testsuite/lib/nice/lang
Modified Files:
arrays.testsuite
Log Message:
Make sure that a class named Array in the local package is not used
for the syntax Type[].
Index: arrays.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/lib/nice/lang/arrays.testsuite,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** arrays.testsuite 12 Feb 2003 13:37:17 -0000 1.1
--- arrays.testsuite 5 May 2003 14:08:12 -0000 1.2
***************
*** 8,9 ****
--- 8,20 ----
// Concatenation can be covariant.
float[] f = concat([0], [128]);
+
+ /// PASS
+ var l = new int[1].length;
+ /// Toplevel
+ class Array {}
+
+ /// PASS
+ int[] a = new int[1];
+ var l = a.length;
+ /// Toplevel
+ class Array<T> {}
|
|
From: <ar...@us...> - 2003-05-05 09:29:35
|
Update of /cvsroot/nice/Nice/testsuite/compiler/overloading
In directory sc8-pr-cvs1:/tmp/cvs-serv1302/F:/nice/testsuite/compiler/overloading
Added Files:
complex.testsuite
Log Message:
Bug testcases of overloading.
--- NEW FILE: complex.testsuite ---
/// PASS bug
String[] oa2 = ["abc"];
System.out.println(""+equals([null], oa2));
/// Toplevel
<T,U,V | U <: T, V <: T> boolean equals(U[], V[]) = native boolean Arrays.equals(Object[],Object[]);
/// PASS bug
String[] sa1 = ["xyz"];
eq2(sa1, [null]);
/// Toplevel
<T,U,V | U <: T, V <: T> boolean eq2(U[] u, V[] v) = false;
<Any T> boolean eq2(!T,!T) = true;
<Any T> boolean eq2(?T, ?T) = false;
/// PASS bug
List<String> list1 = new ArrayList();
List<int> list2 = new ArrayList();
test(list1,list2);
/// Toplevel
<T,U> boolean test(List<T> , List<U>) = false;
<Any T> boolean test(!T,!T) = true;
<Any T> boolean test(?T, ?T) = false;
|
|
From: <bo...@us...> - 2003-05-04 16:51:30
|
Update of /cvsroot/nice/Nice/src/bossa/syntax
In directory sc8-pr-cvs1:/tmp/cvs-serv32619/src/bossa/syntax
Modified Files:
typecheck.nice analyse.nice
Log Message:
Upgraded source to use new syntax 'let' instead of 'final'.
Index: typecheck.nice
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/typecheck.nice,v
retrieving revision 1.64
retrieving revision 1.65
diff -C2 -d -r1.64 -r1.65
*** typecheck.nice 30 Apr 2003 17:56:30 -0000 1.64
--- typecheck.nice 4 May 2003 16:51:27 -0000 1.65
***************
*** 50,54 ****
try
{
! final unsureType = makeUnsure(variable.type);
e.value = checkAssignment(new mlsub.typing.Polytype(unsureType), notNull(e.value));
--- 50,54 ----
try
{
! let unsureType = makeUnsure(variable.type);
e.value = checkAssignment(new mlsub.typing.Polytype(unsureType), notNull(e.value));
Index: analyse.nice
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/analyse.nice,v
retrieving revision 1.63
retrieving revision 1.64
diff -C2 -d -r1.63 -r1.64
*** analyse.nice 29 Apr 2003 11:14:27 -0000 1.63
--- analyse.nice 4 May 2003 16:51:27 -0000 1.64
***************
*** 33,37 ****
buildInfo(varScope, typeScope)
{
! final SymbolTable<TypeSymbol> t = new SymbolTable();
return new Info(vars: new SymbolTable(), typeVars: t,
outerVarScope: varScope, outerTypeScope: typeScope,
--- 33,37 ----
buildInfo(varScope, typeScope)
{
! let SymbolTable<TypeSymbol> t = new SymbolTable();
return new Info(vars: new SymbolTable(), typeVars: t,
outerVarScope: varScope, outerTypeScope: typeScope,
|
|
From: <bo...@us...> - 2003-05-04 16:49:41
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang
In directory sc8-pr-cvs1:/tmp/cvs-serv32043/stdlib/nice/lang
Modified Files:
collections.nice array.nice
Log Message:
Upgraded source to use new syntax for type parameters in method
implementations.
Index: collections.nice
===================================================================
RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/collections.nice,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** collections.nice 3 Mar 2003 16:42:45 -0000 1.46
--- collections.nice 4 May 2003 16:49:38 -0000 1.47
***************
*** 102,106 ****
Default implementation, using an Iterator.
*/
! foreach<T>(c...@ja..., f)
{
for (java.util.Iterator<T> i = c.iterator(); i.hasNext();)
--- 102,106 ----
Default implementation, using an Iterator.
*/
! <T> foreach(c...@ja..., f)
{
for (java.util.Iterator<T> i = c.iterator(); i.hasNext();)
***************
*** 117,121 ****
}
! map<C,T,U>(c, f)
{
C<U> res = c.similarEmptyCollection();
--- 117,121 ----
}
! <C,T,U> map(c, f)
{
C<U> res = c.similarEmptyCollection();
***************
*** 124,128 ****
}
! filter<C,T>(c, test)
{
C<T> res = c.similarEmptyCollection();
--- 124,128 ----
}
! <C,T> filter(c, test)
{
C<T> res = c.similarEmptyCollection();
***************
*** 136,162 ****
}
! similarEmptyCollection<C,T,U>(c#ArrayList)
! {
! ArrayList<U> res = new ArrayList(c.size());
! return res;
! }
! similarEmptyCollection<C,T,U>(c#LinkedList)
! {
! LinkedList<U> res = new LinkedList();
! return res;
! }
! similarEmptyCollection<C,T,U>(c#java.util.Vector)
! {
! java.util.Vector<U> res = new java.util.Vector(c.size());
! return res;
! }
! similarEmptyCollection<C,T,U>(c#java.util.Stack)
! {
! java.util.Stack<U> res = new java.util.Stack();
! return res;
! }
/****************************************************************
--- 136,146 ----
}
! similarEmptyCollection(c#ArrayList) = new ArrayList(c.size());
! similarEmptyCollection(c#LinkedList) = new LinkedList();
! similarEmptyCollection(c#Vector) = new Vector(c.size());
! similarEmptyCollection(c#Stack) = new Stack();
/****************************************************************
Index: array.nice
===================================================================
RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/array.nice,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** array.nice 27 Mar 2003 23:01:00 -0000 1.22
--- array.nice 4 May 2003 16:49:38 -0000 1.23
***************
*** 89,95 ****
// Define collection methods
! map<C,T,U>(a@Array, f) = fill(new U[a.length], int i => f(a[i]));
! filter<C, T>(a@Array, test) = a.filter(test);
// Specialized versions for arrays.
--- 89,95 ----
// Define collection methods
! <C,T,U> map(a@Array, f) = fill(new U[a.length], int i => f(a[i]));
! <C,T> filter(a@Array, test) = a.filter(test);
// Specialized versions for arrays.
|
|
From: <bo...@us...> - 2003-05-04 16:49:41
|
Update of /cvsroot/nice/Nice/src/nice/tools/ast
In directory sc8-pr-cvs1:/tmp/cvs-serv32043/src/nice/tools/ast
Modified Files:
SymbolTable.nice
Log Message:
Upgraded source to use new syntax for type parameters in method
implementations.
Index: SymbolTable.nice
===================================================================
RCS file: /cvsroot/nice/Nice/src/nice/tools/ast/SymbolTable.nice,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** SymbolTable.nice 13 Dec 2002 11:19:15 -0000 1.6
--- SymbolTable.nice 4 May 2003 16:49:38 -0000 1.7
***************
*** 19,23 ****
// Interface
! <Any Sym> SymbolTable<Sym> symbolTable();
class SymbolTable<Sym>
--- 19,23 ----
// Interface
! <Sym> SymbolTable<Sym> symbolTable();
class SymbolTable<Sym>
***************
*** 36,40 ****
}
! <Any Sym> ?Sym get(SymbolTable<!Sym>, String name);
class Binder<Sym>
--- 36,40 ----
}
! <Sym> ?Sym get(SymbolTable<!Sym>, String name);
class Binder<Sym>
***************
*** 46,52 ****
}
! symbolTable<Sym>() = new SymbolTable();
! get<Sym>(t@SymbolTable, name)
{
?Binder<!Sym> binder = t.symbols.get(name);
--- 46,52 ----
}
! symbolTable() = new SymbolTable();
! <Sym> get(t@SymbolTable, name)
{
?Binder<!Sym> binder = t.symbols.get(name);
***************
*** 57,61 ****
}
! set<Sym>(t@SymbolTable, name, sym)
{
Binder<Sym> binder = new Binder(value: sym, name: name,
--- 57,61 ----
}
! <Sym> set(t@SymbolTable, name, sym)
{
Binder<Sym> binder = new Binder(value: sym, name: name,
***************
*** 66,70 ****
}
! begin<Sym>(t@SymbolTable)
{
Binder<Sym> mark = new Binder(value: cast(null), name: null, nextBinder: t.topBinder, oldBinding: t.marks);
--- 66,70 ----
}
! <Sym> begin(t@SymbolTable)
{
Binder<Sym> mark = new Binder(value: cast(null), name: null, nextBinder: t.topBinder, oldBinding: t.marks);
***************
*** 73,77 ****
}
! end<Sym>(t@SymbolTable)
{
?Binder<Sym> top = t.topBinder;
--- 73,77 ----
}
! <Sym> end(t@SymbolTable)
{
?Binder<Sym> top = t.topBinder;
|
|
From: <bo...@us...> - 2003-05-04 16:45:32
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang
In directory sc8-pr-cvs1:/tmp/cvs-serv30764/stdlib/nice/lang
Modified Files:
java.nice
Log Message:
Added retyping for java.util.Arrays.equals.
Index: java.nice
===================================================================
RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/java.nice,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** java.nice 1 May 2003 18:50:57 -0000 1.21
--- java.nice 4 May 2003 16:45:28 -0000 1.22
***************
*** 168,171 ****
--- 168,175 ----
native boolean java.util.Dictionary.isEmpty();
+
+ <T,U,V | U <: T, V <: T> boolean Arrays_equals(U[], V[]) =
+ native boolean Arrays.equals(Object[],Object[]);
+
/* StringTokenizer inherits from Enumeration, which makes it
wrongly parameterized. We ignore that inheritance.
|
|
From: <bo...@us...> - 2003-05-04 16:45:32
|
Update of /cvsroot/nice/Nice/testsuite/lib/java/util In directory sc8-pr-cvs1:/tmp/cvs-serv30764/testsuite/lib/java/util Added Files: arrays.testsuite Log Message: Added retyping for java.util.Arrays.equals. --- NEW FILE: arrays.testsuite --- /// PASS let o1 = "s"; let ?String o2 = null; let ?String[] oa1 = [o1, o2]; let ?String[] oa2 = [o1, o2]; assert Arrays.equals(oa1, oa2); /// PASS let ArrayList<String> o1 = new ArrayList(); let ?ArrayList<String> o2 = null; let ?ArrayList<String>[] oa1 = [o1, o2]; let ?List<String>[] oa2 = [o1, o2]; assert Arrays.equals(oa1, oa2); |
|
From: <bo...@us...> - 2003-05-03 17:41:08
|
Update of /cvsroot/nice/Nice/debian
In directory sc8-pr-cvs1:/tmp/cvs-serv1217/debian
Modified Files:
changelog
Log Message:
Removed tabs, as they seem to pose problem to parsechangelog.
Index: changelog
===================================================================
RCS file: /cvsroot/nice/Nice/debian/changelog,v
retrieving revision 1.157
retrieving revision 1.158
diff -C2 -d -r1.157 -r1.158
*** changelog 30 Apr 2003 21:24:32 -0000 1.157
--- changelog 3 May 2003 17:41:05 -0000 1.158
***************
*** 1,3 ****
! nice (0.7.9-1) unstable; urgency=low
* Allow implementations of methods declared in Java to dispatch on
--- 1,3 ----
! nice (0.7.9) unstable; urgency=low
* Allow implementations of methods declared in Java to dispatch on
***************
*** 18,25 ****
{
L<U> res = similarEmptyCollection(l);
! res.add(f(l[0]));
! // Now we use the fact the res is a list.
! // Therefore, it would be impossible to declare its type as C<U>.
res.add(res[0]);
--- 18,25 ----
{
L<U> res = similarEmptyCollection(l);
! res.add(f(l[0]));
! // Now we use the fact the res is a list.
! // Therefore, it would be impossible to declare its type as C<U>.
res.add(res[0]);
***************
*** 41,45 ****
list.addAll(arr);
for(let iter = list.iterator(); iter.hasNext();) {
! let String s;
var i = iter.next();
if (i % 2 == 0) { s = "even"; }
--- 41,45 ----
list.addAll(arr);
for(let iter = list.iterator(); iter.hasNext();) {
! let String s;
var i = iter.next();
if (i % 2 == 0) { s = "even"; }
|
|
From: <bo...@us...> - 2003-05-03 15:37:56
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang
In directory sc8-pr-cvs1:/tmp/cvs-serv20032/stdlib/nice/lang
Modified Files:
prelude.nice
Log Message:
Made 'equals' accept null arguments. The Java version is an overloaded
version, that optimizes the null test out when it is statically possible.
'eq' has no sense anymore, since 'equals' can be fully overriden in Nice.
Index: prelude.nice
===================================================================
RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/prelude.nice,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** prelude.nice 27 Mar 2003 23:01:02 -0000 1.27
--- prelude.nice 3 May 2003 15:37:53 -0000 1.28
***************
*** 90,99 ****
! <Any T> boolean equals(T,T) = native boolean Object.equals(Object);
! <T> int hashCode(!T) = native int Object.hashCode();
! // can be overriden in nice
! <Any T> boolean eq(T,T);
! eq(o1, o2) = equals(o1, o2);
<Any T> String toString(!T) = native String Object.toString();
--- 90,105 ----
! <Any T> boolean equals(!T,!T) = native boolean Object.equals(Object);
! <Any T> boolean equals(?T a, ?T b)
! {
! if (a != null && b != null)
! return a.equals(b);
! else
! return a==b; // true iff both null
! }
!
!
! <T> int hashCode(!T) = native int Object.hashCode();
<Any T> String toString(!T) = native String Object.toString();
|
|
From: <bo...@us...> - 2003-05-01 22:43:37
|
Update of /cvsroot/nice/Nice/src/gnu/expr
In directory sc8-pr-cvs1:/tmp/cvs-serv26188/src/gnu/expr
Modified Files:
Declaration.java
Log Message:
Fix for storing in static fields, that was also found upstream.
Index: Declaration.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/gnu/expr/Declaration.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Declaration.java 6 Mar 2003 01:47:18 -0000 1.9
--- Declaration.java 1 May 2003 22:43:34 -0000 1.10
***************
*** 154,159 ****
loadOwningObject(comp);
code.emitSwap();
}
! code.emitPutField(field);
}
}
--- 154,161 ----
loadOwningObject(comp);
code.emitSwap();
+ code.emitPutField(field);
}
! else
! code.emitPutStatic(field);
}
}
|
|
From: <bo...@us...> - 2003-05-01 22:42:29
|
Update of /cvsroot/nice/Nice/src/nice/tools/code
In directory sc8-pr-cvs1:/tmp/cvs-serv25622/src/nice/tools/code
Modified Files:
GetFieldProc.java Gen.java
Log Message:
Implemented bit write access on class fields and global variables.
Index: GetFieldProc.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/nice/tools/code/GetFieldProc.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** GetFieldProc.java 12 Feb 2003 13:04:56 -0000 1.5
--- GetFieldProc.java 1 May 2003 22:42:18 -0000 1.6
***************
*** 36,39 ****
--- 36,41 ----
private Declaration fieldDecl;
+ Field getField() { return fieldDecl.field; }
+
public void compile (ApplyExp exp, Compilation comp, Target target)
{
Index: Gen.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/nice/tools/code/Gen.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** Gen.java 18 Apr 2003 14:50:18 -0000 1.11
--- Gen.java 1 May 2003 22:42:18 -0000 1.12
***************
*** 266,268 ****
--- 266,290 ----
return Inline.inline(nice.lang.inline.Return.instance, value);
}
+
+ public static void store(Compilation comp, Expression destination,
+ Target target)
+ {
+ if (destination instanceof ReferenceExp)
+ {
+ ((ReferenceExp) destination).getBinding().compileStore(comp);
+ return;
+ }
+
+ // Destination must be a field.
+ gnu.bytecode.CodeAttr code = comp.getCode();
+
+ ApplyExp apply = (ApplyExp) destination;
+ GetFieldProc fieldProc = (GetFieldProc)
+ ((QuoteExp) apply.getFunction()).getValue();
+ Field field = fieldProc.getField();
+
+ apply.getArgs()[0].compile(comp, field.getDeclaringClass());
+ code.emitSwap();
+ code.emitPutField(field);
+ }
}
|
|
From: <bo...@us...> - 2003-05-01 22:42:27
|
Update of /cvsroot/nice/Nice/testsuite/lib/nice/lang
In directory sc8-pr-cvs1:/tmp/cvs-serv25622/testsuite/lib/nice/lang
Modified Files:
numeric.testsuite
Log Message:
Implemented bit write access on class fields and global variables.
Index: numeric.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/lib/nice/lang/numeric.testsuite,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** numeric.testsuite 30 Apr 2003 19:05:40 -0000 1.2
--- numeric.testsuite 1 May 2003 22:42:17 -0000 1.3
***************
*** 79,83 ****
--- 79,101 ----
i[0] = false;
+ /// FAIL
+ i[0] = false;
+ /// Toplevel
+ let int i = 1;
+
/// COMMENT Using the result polymorphically
/// PASS
String s = 20[1].toString();
+
+ /// PASS
+ let a = new A();
+ a.x[1] = true;
+ assert a.x == 2;
+ /// Toplevel
+ class A { int x = 0; }
+
+ /// PASS
+ x[1] = true;
+ assert x == 2;
+ /// Toplevel
+ var int x = 0;
|
|
From: <bo...@us...> - 2003-05-01 22:42:27
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang/inline
In directory sc8-pr-cvs1:/tmp/cvs-serv25622/stdlib/nice/lang/inline
Modified Files:
BitOp.java
Log Message:
Implemented bit write access on class fields and global variables.
Index: BitOp.java
===================================================================
RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/inline/BitOp.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** BitOp.java 30 Apr 2003 19:05:41 -0000 1.2
--- BitOp.java 1 May 2003 22:42:18 -0000 1.3
***************
*** 146,150 ****
t0.compileFromStack(comp, isLong ? Type.long_type : Type.int_type);
! ((ReferenceExp) args[0]).getBinding().compileStore(comp);
}
--- 146,150 ----
t0.compileFromStack(comp, isLong ? Type.long_type : Type.int_type);
! nice.tools.code.Gen.store(comp, args[0], target);
}
|
|
From: <ar...@us...> - 2003-05-01 18:51:01
|
Update of /cvsroot/nice/Nice/testsuite/lib/java/util
In directory sc8-pr-cvs1:/tmp/cvs-serv23396/F:/nice/testsuite/lib/java/util
Modified Files:
collections.testsuite
Log Message:
Made containsAll, removeAll and retainAll bivariant or something like that.
Index: collections.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/lib/java/util/collections.testsuite,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** collections.testsuite 28 Apr 2003 20:57:51 -0000 1.10
--- collections.testsuite 1 May 2003 18:50:58 -0000 1.11
***************
*** 71,72 ****
--- 71,82 ----
return res;
}
+
+ /// PASS
+ List<A> listA = new ArrayList();
+ List<B> listB = new ArrayList();
+ listB.add(new B());
+ listA.addAll(listB);
+ assert listA.containsAll(listB);
+ /// Toplevel
+ class A{}
+ class B extends A{}
|