nice-commit Mailing List for The Nice Programming Language (Page 63)
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: <ar...@us...> - 2004-01-17 20:59:55
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1:/tmp/cvs-serv2306/nice Modified Files: NEWS Log Message: Fixed overloading resolving for function object symbols. Index: NEWS =================================================================== RCS file: /cvsroot/nice/Nice/NEWS,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** NEWS 17 Jan 2004 16:32:45 -0000 1.14 --- NEWS 17 Jan 2004 20:59:52 -0000 1.15 *************** *** 11,15 **** * Improved performance of arrays used as lists. * Bug fixes (checking of local variables in a call position, make it possible ! to use new Object() and dispatch on Object again, ... ) -- --- 11,16 ---- * Improved performance of arrays used as lists. * Bug fixes (checking of local variables in a call position, make it possible ! to use new Object() and dispatch on Object again, code generation of ! integer constants, overloading of function symbols, ... ) -- |
From: <ar...@us...> - 2004-01-17 20:59:55
|
Update of /cvsroot/nice/Nice/testsuite/compiler/overloading In directory sc8-pr-cvs1:/tmp/cvs-serv2306/F:/nice/testsuite/compiler/overloading Modified Files: specificity.testsuite Log Message: Fixed overloading resolving for function object symbols. Index: specificity.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/overloading/specificity.testsuite,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** specificity.testsuite 15 Jun 2003 10:01:43 -0000 1.3 --- specificity.testsuite 17 Jan 2004 20:59:51 -0000 1.4 *************** *** 103,104 **** --- 103,122 ---- foo(@B(A) ,x) {} foo(@B(B) ,x) {} + + /// PASS + B->boolean bar = foo; + assert bar(new B()); + /// Toplevel + class A {} + class B extends A {} + boolean foo(A x) = false; + boolean foo(B x) = true; + + /// FAIL + C->void bar = /* FAIL HERE */foo; + /// Toplevel + interface A {} + interface B {} + class C implements A,B {} + void foo(A x) {} + void foo(B x) {} |
From: <ar...@us...> - 2004-01-17 20:59:54
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv2306/F:/nice/src/bossa/syntax Modified Files: OverloadedSymbolExp.java Log Message: Fixed overloading resolving for function object symbols. Index: OverloadedSymbolExp.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/OverloadedSymbolExp.java,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** OverloadedSymbolExp.java 9 Dec 2003 15:21:05 -0000 1.62 --- OverloadedSymbolExp.java 17 Jan 2004 20:59:51 -0000 1.63 *************** *** 233,236 **** --- 233,254 ---- return res; + if (Types.domain(expectedType) != null) + { // in case of function objects symbols find the most precise match + List nonMin = removeNonMinimal(symbols); + if (symbols.size() == 1) + { + VarSymbol s = (VarSymbol) symbols.get(0); + Polytype symType = s.getClonedType(); + s.releaseClonedType(); + symbols = nonMin; + return uniqueExpression(s, symType); + } + else + symbols.addAll(nonMin); + } + + if (symbols.size() != 0) + throw new AmbiguityError(); + throw User.error(this, noMatchError(removed, expectedType)); } *************** *** 262,265 **** --- 280,286 ---- return res; + if (symbols.size() != 0) + throw new AmbiguityError(); + throw User.error(this, "No variable or field in this class has name " + ident); *************** *** 291,297 **** } - if (symbols.size() != 0) - throw new AmbiguityError(); - // There is no solution. return null; --- 312,315 ---- *************** *** 310,318 **** } ! static void removeNonMinimal(List symbols) { // optimization if(symbols.size()<2) ! return; int len = symbols.size(); --- 328,337 ---- } ! static List removeNonMinimal(List symbols) { + List removed = new ArrayList(); // optimization if(symbols.size()<2) ! return removed; int len = symbols.size(); *************** *** 361,366 **** --- 380,388 ---- Debug.println("Removing " + syms[i] + " since it is not minimal"); + removed.add(syms[i]); symbols.remove(syms[i]); } + + return removed; } |
From: <bo...@us...> - 2004-01-17 17:13:38
|
Update of /cvsroot/nice/Nice/src/gnu/expr In directory sc8-pr-cvs1:/tmp/cvs-serv12991/src/gnu/expr Modified Files: Compilation.java Log Message: Make sure byte and short object literals are represented as Integer (closes #871232). Index: Compilation.java =================================================================== RCS file: /cvsroot/nice/Nice/src/gnu/expr/Compilation.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Compilation.java 3 Nov 2003 18:32:07 -0000 1.20 --- Compilation.java 17 Jan 2004 17:13:36 -0000 1.21 *************** *** 339,343 **** } else ! literal = new Literal (value, Type.make(value.getClass()), this); } return literal; --- 339,349 ---- } else ! { ! Type literalType = Type.make(value.getClass()); ! if (literalType == Type.byte_ctype || ! literalType == Type.short_ctype) ! literalType = Type.int_ctype; ! literal = new Literal (value, literalType, this); ! } } return literal; |
From: <bo...@us...> - 2004-01-17 17:13:38
|
Update of /cvsroot/nice/Nice/testsuite/compiler/native In directory sc8-pr-cvs1:/tmp/cvs-serv12991/testsuite/compiler/native Modified Files: types.testsuite Log Message: Make sure byte and short object literals are represented as Integer (closes #871232). Index: types.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/native/types.testsuite,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** types.testsuite 9 Dec 2003 17:20:14 -0000 1.2 --- types.testsuite 17 Jan 2004 17:13:35 -0000 1.3 *************** *** 17,18 **** --- 17,45 ---- /// package b import a {} + + /// PASS + HashPropertyMap<int,double> h = new HashPropertyMap(); + + h.set(1, 2.5); + h.get(1); + + /// Toplevel + public class HashPropertyMap<K,V> + { + V get(K key); + void set(K key, V value); + + private HashMap<K,V> data = new HashMap(); + + set(key, value){ + data.put(key, value); + } + + get(key){ + let res = data[key]; + if (res == null) + throw new NoSuchElementException(); + + return res; + } + } |
From: <bo...@us...> - 2004-01-17 16:38:45
|
Update of /cvsroot/nice/Nice/regtest/basic In directory sc8-pr-cvs1:/tmp/cvs-serv4757/regtest/basic Modified Files: classes.nice arrays.nice Log Message: Do not use instantiations as expressions, since that is not accepted anymore. Index: classes.nice =================================================================== RCS file: /cvsroot/nice/Nice/regtest/basic/classes.nice,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** classes.nice 15 Jun 2003 12:58:30 -0000 1.13 --- classes.nice 17 Jan 2004 16:38:42 -0000 1.14 *************** *** 78,82 **** println(pt.toString()); ! new TestFieldInitializers(); } --- 78,82 ---- println(pt.toString()); ! let test = new TestFieldInitializers(); } Index: arrays.nice =================================================================== RCS file: /cvsroot/nice/Nice/regtest/basic/arrays.nice,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** arrays.nice 29 Aug 2003 14:07:39 -0000 1.23 --- arrays.nice 17 Jan 2004 16:38:42 -0000 1.24 *************** *** 158,163 **** // Calling native methods using arrays ! new String(['S', 'z', 'i', 'a']); ! new String(id(['S', 'z', 'i', 'a'])); } --- 158,163 ---- // Calling native methods using arrays ! let s1 = new String(['S', 'z', 'i', 'a']); ! let s2 = new String(id(['S', 'z', 'i', 'a'])); } |
From: <bo...@us...> - 2004-01-17 16:38:45
|
Update of /cvsroot/nice/Nice/regtest/multipkg In directory sc8-pr-cvs1:/tmp/cvs-serv4757/regtest/multipkg Modified Files: main.nice Log Message: Do not use instantiations as expressions, since that is not accepted anymore. Index: main.nice =================================================================== RCS file: /cvsroot/nice/Nice/regtest/multipkg/main.nice,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** main.nice 7 Sep 2002 19:07:08 -0000 1.7 --- main.nice 17 Jan 2004 16:38:42 -0000 1.8 *************** *** 24,32 **** // and access to symbols both with full qualified names and imported names. // The order was significant in a bug (false ambiguity). ! new regtest.multipkg.AA(); ! new AA(); ! new java.util.TreeSet(); ! new TreeSet(); test_import(); --- 24,32 ---- // and access to symbols both with full qualified names and imported names. // The order was significant in a bug (false ambiguity). ! let aa1 = new regtest.multipkg.AA(); ! let aa2 = new AA(); ! let TreeSet<String> ts1 = new java.util.TreeSet(); ! let TreeSet<String> ts2 = new TreeSet(); test_import(); |
From: <ar...@us...> - 2004-01-17 16:35:47
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang In directory sc8-pr-cvs1:/tmp/cvs-serv4224/F:/nice/stdlib/nice/lang Modified Files: array.nice ForInIters.nice Log Message: Commented out a few functions working on generic arrays because the list version is much faster. Index: array.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/array.nice,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** array.nice 19 Nov 2003 16:04:46 -0000 1.31 --- array.nice 17 Jan 2004 16:35:43 -0000 1.32 *************** *** 103,107 **** return resize(res, found); } ! <T> void foreach(T[] a, (T)->void f) { --- 103,107 ---- return resize(res, found); } ! /* <T> void foreach(T[] a, (T)->void f) { *************** *** 109,113 **** f(a[i]); } ! <T> ?T find(!T[] a, (!T)->boolean test) { --- 109,113 ---- f(a[i]); } ! */ <T> ?T find(!T[] a, (!T)->boolean test) { Index: ForInIters.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/ForInIters.nice,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ForInIters.nice 19 Nov 2003 16:04:46 -0000 1.6 --- ForInIters.nice 17 Jan 2004 16:35:43 -0000 1.7 *************** *** 22,26 **** <E> Iterator<E> forIterator(Collection<E> c) = c.iterator(); ! <E> Iterator<E> forIterator(E[] arr) = new ArrayForIterator(arr: arr); Iterator<char> forIterator(String s) = new StringForIterator(str: s); Iterator<char> forIterator(StringBuffer sb) = new StringBufferForIterator(strb: sb); --- 22,26 ---- <E> Iterator<E> forIterator(Collection<E> c) = c.iterator(); ! //<E> Iterator<E> forIterator(E[] arr) = new ArrayForIterator(arr: arr); Iterator<char> forIterator(String s) = new StringForIterator(str: s); Iterator<char> forIterator(StringBuffer sb) = new StringBufferForIterator(strb: sb); *************** *** 28,32 **** //The implementations of additional Iterators ! private class ArrayForIterator<E> implements Iterator<E> { E[] arr; --- 28,32 ---- //The implementations of additional Iterators ! /* private class ArrayForIterator<E> implements Iterator<E> { E[] arr; *************** *** 36,40 **** remove() { throw new UnsupportedOperationException(); } } ! private class StringForIterator<E | E <: char, char <: E> implements Iterator<E> { String str; --- 36,40 ---- remove() { throw new UnsupportedOperationException(); } } ! */ private class StringForIterator<E | E <: char, char <: E> implements Iterator<E> { String str; |
From: <ar...@us...> - 2004-01-17 16:32:48
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang In directory sc8-pr-cvs1:/tmp/cvs-serv3521/F:/nice/stdlib/nice/lang Modified Files: rawArray.java Added Files: rawBooleanArray.java rawByteArray.java rawCharArray.java rawDoubleArray.java rawFloatArray.java rawIntArray.java rawLongArray.java rawObjectArray.java rawShortArray.java Log Message: Added specialized versions of rawArray to improve performance. --- NEW FILE: rawBooleanArray.java --- /**************************************************************************** * N I C E * * A high-level object-oriented research language * * (c) Daniel Bonniot 2004 * * * * 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; /** Class used to wrap native boolean arrays when considered as part of the collection hierarchy. */ public final class rawBooleanArray extends rawArray { rawBooleanArray(boolean[] arr) { super(arr); this.arr = arr; } private final boolean[] arr; /**************************************************************** * Implementation of java.util.List ****************************************************************/ public final int size () { return arr.length; } public final Object get (int index) { return new Boolean(arr[index]); } public final Object set (int index, Object element) { boolean old = arr[index]; arr[index] = ((Boolean)element).booleanValue(); return new Boolean(old); } } --- NEW FILE: rawByteArray.java --- /**************************************************************************** * 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; /** Class used to wrap native byte arrays when considered as part of the collection hierarchy. */ public final class rawByteArray extends rawArray { rawByteArray(byte[] arr) { super(arr); this.arr = arr; } private final byte[] arr; /**************************************************************** * Implementation of java.util.List ****************************************************************/ public final int size () { return arr.length; } public final Object get (int index) { return new Byte(arr[index]); } public final Object set (int index, Object element) { byte old = arr[index]; arr[index] = ((Number)element).byteValue(); return new Byte(old); } } --- NEW FILE: rawCharArray.java --- /**************************************************************************** * 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; /** Class used to wrap native char arrays when considered as part of the collection hierarchy. */ public final class rawCharArray extends rawArray { rawCharArray(char[] arr) { super(arr); this.arr = arr; } private final char[] arr; /**************************************************************** * Implementation of java.util.List ****************************************************************/ public final int size () { return arr.length; } public final Object get (int index) { return new Character(arr[index]); } public final Object set (int index, Object element) { char old = arr[index]; arr[index] = ((Character)element).charValue(); return new Character(old); } } --- NEW FILE: rawDoubleArray.java --- /**************************************************************************** * N I C E * * A high-level object-oriented research language * * (c) Daniel Bonniot 2004 * * * * 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; /** Class used to wrap native double arrays when considered as part of the collection hierarchy. */ public final class rawDoubleArray extends rawArray { rawDoubleArray(double[] arr) { super(arr); this.arr = arr; } private final double[] arr; /**************************************************************** * Implementation of java.util.List ****************************************************************/ public final int size () { return arr.length; } public final Object get (int index) { return new Double(arr[index]); } public final Object set (int index, Object element) { double old = arr[index]; arr[index] = ((Number)element).doubleValue(); return new Double(old); } } --- NEW FILE: rawFloatArray.java --- /**************************************************************************** * N I C E * * A high-level object-oriented research language * * (c) Daniel Bonniot 2004 * * * * 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; /** Class used to wrap native float arrays when considered as part of the collection hierarchy. */ public final class rawFloatArray extends rawArray { rawFloatArray(float[] arr) { super(arr); this.arr = arr; } private final float[] arr; /**************************************************************** * Implementation of java.util.List ****************************************************************/ public final int size () { return arr.length; } public final Object get (int index) { return new Float(arr[index]); } public final Object set (int index, Object element) { float old = arr[index]; arr[index] = ((Number)element).floatValue(); return new Float(old); } } --- NEW FILE: rawIntArray.java --- /**************************************************************************** * N I C E * * A high-level object-oriented research language * * (c) Daniel Bonniot 2004 * * * * 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; /** Class used to wrap native int arrays when considered as part of the collection hierarchy. */ public final class rawIntArray extends rawArray { rawIntArray(int[] arr) { super(arr); this.arr = arr; } private final int[] arr; /**************************************************************** * Implementation of java.util.List ****************************************************************/ public final int size () { return arr.length; } public final Object get (int index) { return new Integer(arr[index]); } public final Object set (int index, Object element) { int old = arr[index]; arr[index] = ((Number)element).intValue(); return new Integer(old); } } --- NEW FILE: rawLongArray.java --- /**************************************************************************** * N I C E * * A high-level object-oriented research language * * (c) Daniel Bonniot 2004 * * * * 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; /** Class used to wrap native long arrays when considered as part of the collection hierarchy. */ public final class rawLongArray extends rawArray { rawLongArray(long[] arr) { super(arr); this.arr = arr; } private final long[] arr; /**************************************************************** * Implementation of java.util.List ****************************************************************/ public final int size () { return arr.length; } public final Object get (int index) { return new Long(arr[index]); } public final Object set (int index, Object element) { long old = arr[index]; arr[index] = ((Number)element).longValue(); return new Long(old); } } --- NEW FILE: rawObjectArray.java --- /**************************************************************************** * N I C E * * A high-level object-oriented research language * * (c) Daniel Bonniot 2004 * * * * 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; /** Class used to wrap native Object arrays when considered as part of the collection hierarchy. */ public final class rawObjectArray extends rawArray { rawObjectArray(Object[] arr) { super(arr); this.arr = arr; } private final Object[] arr; /**************************************************************** * Implementation of java.util.List ****************************************************************/ public final int size () { return arr.length; } public final Object get (int index) { return arr[index]; } public final Object set (int index, Object element) { Object old = arr[index]; arr[index] = element; return old; } } --- NEW FILE: rawShortArray.java --- /**************************************************************************** * N I C E * * A high-level object-oriented research language * * (c) Daniel Bonniot 2004 * * * * 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; /** Class used to wrap native short arrays when considered as part of the collection hierarchy. */ public final class rawShortArray extends rawArray { rawShortArray(short[] arr) { super(arr); this.arr = arr; } private final short[] arr; /**************************************************************** * Implementation of java.util.List ****************************************************************/ public final int size () { return arr.length; } public final Object get (int index) { return new Short(arr[index]); } public final Object set (int index, Object element) { short old = arr[index]; arr[index] = ((Number)element).shortValue(); return new Short(old); } } Index: rawArray.java =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/rawArray.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** rawArray.java 19 Nov 2003 16:04:45 -0000 1.11 --- rawArray.java 17 Jan 2004 16:32:45 -0000 1.12 *************** *** 2,6 **** * 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 * --- 2,6 ---- * N I C E * * A high-level object-oriented research language * ! * (c) Daniel Bonniot 2004 * * * * This package is free software; you can redistribute it and/or modify * *************** *** 28,39 **** @author Daniel Bonniot (d.b...@ma...) */ ! public final class rawArray extends java.util.AbstractList { ! private rawArray(Object value) { this.value = value; } ! public Object value; public Object value() { --- 28,39 ---- @author Daniel Bonniot (d.b...@ma...) */ ! public class rawArray extends java.util.AbstractList { ! protected rawArray(Object value) { this.value = value; } ! public final Object value; public Object value() { *************** *** 45,48 **** --- 45,76 ---- if (value == null) return null; + + if (value instanceof Object[]) + return new rawObjectArray((Object[])value); + + if (value instanceof int[]) + return new rawIntArray((int[])value); + + if (value instanceof byte[]) + return new rawByteArray((byte[])value); + + if (value instanceof long[]) + return new rawLongArray((long[])value); + + if (value instanceof char[]) + return new rawCharArray((char[])value); + + if (value instanceof boolean[]) + return new rawBooleanArray((boolean[])value); + + if (value instanceof double[]) + return new rawDoubleArray((double[])value); + + if (value instanceof float[]) + return new rawFloatArray((float[])value); + + if (value instanceof short[]) + return new rawShortArray((short[])value); + return new rawArray(value); } |
From: <ar...@us...> - 2004-01-17 16:32:48
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1:/tmp/cvs-serv3521/nice Modified Files: NEWS Log Message: Added specialized versions of rawArray to improve performance. Index: NEWS =================================================================== RCS file: /cvsroot/nice/Nice/NEWS,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** NEWS 16 Jan 2004 00:14:06 -0000 1.13 --- NEWS 17 Jan 2004 16:32:45 -0000 1.14 *************** *** 9,12 **** --- 9,13 ---- 'loop(5, () => { doSomeThing(); });' * Stricter parsing of expression used as statement. + * Improved performance of arrays used as lists. * Bug fixes (checking of local variables in a call position, make it possible to use new Object() and dispatch on Object again, ... ) |
From: <bo...@us...> - 2004-01-16 16:49:01
|
Update of /cvsroot/nice/Nice/web In directory sc8-pr-cvs1:/tmp/cvs-serv13018 Modified Files: visitor.html safety.xml Log Message: Update by Isaac to the new dispatch syntax. Index: visitor.html =================================================================== RCS file: /cvsroot/nice/Nice/web/visitor.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** visitor.html 5 Jun 2003 09:11:51 -0000 1.3 --- visitor.html 16 Jan 2004 16:48:48 -0000 1.4 *************** *** 160,169 **** <FONT COLOR="#b7860b">void</FONT> <FONT COLOR="#cd0000">prettyPrint</FONT>(<FONT COLOR="#b7860b">Expression </FONT>e); ! <FONT COLOR="#cd0000">prettyPrint</FONT>(e<FONT COLOR="#0000ee">@</FONT><FONT COLOR="#b7860b">IntExp</FONT>) { <FONT COLOR="#b7860b">System</FONT>.out.print(e.value); } ! <FONT COLOR="#cd0000">prettyPrint</FONT>(e<FONT COLOR="#0000ee">@</FONT><FONT COLOR="#b7860b">AddExp</FONT>) { prettyPrint(e.e1); --- 160,169 ---- <FONT COLOR="#b7860b">void</FONT> <FONT COLOR="#cd0000">prettyPrint</FONT>(<FONT COLOR="#b7860b">Expression </FONT>e); ! <FONT COLOR="#cd0000">prettyPrint</FONT>(<FONT COLOR="#b7860b">IntExp</FONT> e) { <FONT COLOR="#b7860b">System</FONT>.out.print(e.value); } ! <FONT COLOR="#cd0000">prettyPrint</FONT>(<FONT COLOR="#b7860b">AddExp</FONT> e) { prettyPrint(e.e1); Index: safety.xml =================================================================== RCS file: /cvsroot/nice/Nice/web/safety.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** safety.xml 19 Nov 2003 23:17:43 -0000 1.7 --- safety.xml 16 Jan 2004 16:48:55 -0000 1.8 *************** *** 278,282 **** int age; ! boolean equals(that@Person) { return --- 278,282 ---- int age; ! boolean equals(Person that) { return *************** *** 329,334 **** private ?List<Component> children(Component); ! children(c@Component) = null; ! children(c@ContainerComponent) = c.getChildren(); </programlisting> </para> --- 329,334 ---- private ?List<Component> children(Component); ! children(Component c) = null; ! children(ContainerComponent c) = c.getChildren(); </programlisting> </para> |
From: <ar...@us...> - 2004-01-16 00:14:10
|
Update of /cvsroot/nice/Nice/testsuite/compiler/enums In directory sc8-pr-cvs1:/tmp/cvs-serv28036/F:/nice/testsuite/compiler/enums Modified Files: enum.testsuite Log Message: Enums can implement interfaces now. Index: enum.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/enums/enum.testsuite,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** enum.testsuite 15 Dec 2003 00:04:49 -0000 1.6 --- enum.testsuite 16 Jan 2004 00:14:07 -0000 1.7 *************** *** 99,100 **** --- 99,114 ---- assert dime.value == 10; assert quarter.value == 25; + + /// PASS + /// package a + /// Toplevel + enum Coin(int value) implements Bar + {penny(1), nickel(5), dime(10), quarter(25)} + interface Bar {} + int foo(Bar x); + foo(Coin x) = x.value; + /// package b import a + assert penny.value == penny.foo(); + assert nickel.value == nickel.foo(); + assert dime.value == dime.foo(); + assert quarter.value == quarter.foo(); |
From: <ar...@us...> - 2004-01-16 00:14:10
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv28036/F:/nice/src/bossa/syntax Modified Files: EnumDefinition.java Log Message: Enums can implement interfaces now. Index: EnumDefinition.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/EnumDefinition.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** EnumDefinition.java 15 Dec 2003 14:04:13 -0000 1.8 --- EnumDefinition.java 16 Jan 2004 00:14:07 -0000 1.9 *************** *** 28,32 **** public EnumDefinition(LocatedString name, List/*LocatedString*/ elements, List/*MonoSymbol*/ fields, List/*List<Expression>*/ argsList, ! List globalDefs) { super(name, Node.global); --- 28,32 ---- public EnumDefinition(LocatedString name, List/*LocatedString*/ elements, List/*MonoSymbol*/ fields, List/*List<Expression>*/ argsList, ! List globalDefs, List/*TypeIdent*/ interfaces) { super(name, Node.global); *************** *** 35,39 **** (name,true,false, null, new ArrayList(0), new TypeIdent(new LocatedString("nice.lang.Enum",name.location())), ! null,null); NiceClass impl = new NiceClass(classDef); int fieldsCount = fields.size(); --- 35,39 ---- (name,true,false, null, new ArrayList(0), new TypeIdent(new LocatedString("nice.lang.Enum",name.location())), ! interfaces,null); NiceClass impl = new NiceClass(classDef); int fieldsCount = fields.size(); *************** *** 73,77 **** this.fields = fields; this.elementsArgs = argsList; ! symbols = new LinkedList(); for (int ord = 0; ord<elements.size(); ord++ ) --- 73,78 ---- this.fields = fields; this.elementsArgs = argsList; ! this.interfaces = interfaces; ! symbols = new LinkedList(); for (int ord = 0; ord<elements.size(); ord++ ) *************** *** 203,207 **** return "enum " + shortName + Util.map(" {", " , ", " }", elements); ! String res = "enum " + shortName + Util.map("(", ", ", ")", fields) + " {"; for (int i = 0; i < elements.size(); i++) { --- 204,212 ---- return "enum " + shortName + Util.map(" {", " , ", " }", elements); ! String res = "enum " + shortName + Util.map("(", ", ", ")", fields); ! if (interfaces != null) ! res += " implements " + Util.map(""," , ","", interfaces); ! ! res += " {"; for (int i = 0; i < elements.size(); i++) { *************** *** 221,223 **** --- 226,229 ---- List fields; List elementsArgs; + List interfaces; } |
From: <ar...@us...> - 2004-01-16 00:14:09
|
Update of /cvsroot/nice/Nice/src/bossa/parser In directory sc8-pr-cvs1:/tmp/cvs-serv28036/F:/nice/src/bossa/parser Modified Files: Parser.jj Log Message: Enums can implement interfaces now. Index: Parser.jj =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v retrieving revision 1.231 retrieving revision 1.232 diff -C2 -d -r1.231 -r1.232 *** Parser.jj 15 Jan 2004 21:39:18 -0000 1.231 --- Parser.jj 16 Jan 2004 00:14:06 -0000 1.232 *************** *** 1196,1199 **** --- 1196,1200 ---- MonoSymbol field; List argsList = new LinkedList(); + List imp = null; } { *************** *** 1203,1210 **** ( "," field=monoSymbol() { fields.add(field); } )* ")" ] "{" enumElement(elements, argsList) ( "," enumElement(elements, argsList) )+ "}" ! { return new EnumDefinition(name, elements, fields, argsList, definitions); } } --- 1204,1214 ---- ( "," field=monoSymbol() { fields.add(field); } )* ")" ] + [ + "implements" imp=interfaces() + ] "{" enumElement(elements, argsList) ( "," enumElement(elements, argsList) )+ "}" ! { return new EnumDefinition(name, elements, fields, argsList, definitions, imp); } } |
From: <ar...@us...> - 2004-01-16 00:14:09
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1:/tmp/cvs-serv28036/nice Modified Files: NEWS Log Message: Enums can implement interfaces now. Index: NEWS =================================================================== RCS file: /cvsroot/nice/Nice/NEWS,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** NEWS 15 Jan 2004 21:39:19 -0000 1.12 --- NEWS 16 Jan 2004 00:14:06 -0000 1.13 *************** *** 1,6 **** nice (0.9.6) ! * Additional fields can be defined for enums, example: ! enum Coin(int value) {penny(1), nickel(5), dime(10), quarter(25)} * Alternative syntax for calling methods that takes an closure with no arguments. For example 'loop(5) { doSomeThing(); }' is shorthand for --- 1,8 ---- nice (0.9.6) ! * Additional fields can be defined for enums and enums can implement ! interfaces, example: ! enum Coin(int value) implements Currency ! {penny(1), nickel(5), dime(10), quarter(25)} * Alternative syntax for calling methods that takes an closure with no arguments. For example 'loop(5) { doSomeThing(); }' is shorthand for |
From: <ar...@us...> - 2004-01-15 21:39:23
|
Update of /cvsroot/nice/Nice/testsuite/lib/java/util In directory sc8-pr-cvs1:/tmp/cvs-serv24986/F:/nice/testsuite/lib/java/util Modified Files: collections.testsuite Log Message: Stricter parsing of expressions used as statement. Index: collections.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/lib/java/util/collections.testsuite,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** collections.testsuite 11 Sep 2003 20:12:58 -0000 1.12 --- collections.testsuite 15 Jan 2004 21:39:20 -0000 1.13 *************** *** 1,4 **** /// PASS ! new Flowlet(); /// Toplevel class Flowlet { --- 1,4 ---- /// PASS ! let dummy = new Flowlet(); /// Toplevel class Flowlet { |
From: <ar...@us...> - 2004-01-15 21:39:23
|
Update of /cvsroot/nice/Nice/testsuite/compiler/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv24986/F:/nice/testsuite/compiler/syntax Modified Files: blockcall.testsuite Log Message: Stricter parsing of expressions used as statement. Index: blockcall.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/syntax/blockcall.testsuite,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** blockcall.testsuite 12 Dec 2003 20:34:46 -0000 1.1 --- blockcall.testsuite 15 Jan 2004 21:39:19 -0000 1.2 *************** *** 12,14 **** /// FAIL int x; ! /* ///FAIL HERE */(x = 0) { print("abc"); } --- 12,14 ---- /// FAIL int x; ! (x = 0)/* ///FAIL HERE */{ print("abc"); } |
From: <ar...@us...> - 2004-01-15 21:39:23
|
Update of /cvsroot/nice/Nice/testsuite/compiler/classes/constructors In directory sc8-pr-cvs1:/tmp/cvs-serv24986/F:/nice/testsuite/compiler/classes/constructors Modified Files: compilation.testsuite native.testsuite Log Message: Stricter parsing of expressions used as statement. Index: compilation.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/classes/constructors/compilation.testsuite,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** compilation.testsuite 30 Nov 2003 14:24:35 -0000 1.7 --- compilation.testsuite 15 Jan 2004 21:39:19 -0000 1.8 *************** *** 1,5 **** /// PASS if (false) ! new A(); /// Toplevel class A {} --- 1,7 ---- /// PASS if (false) ! { ! let dummy = new A(); ! } /// Toplevel class A {} *************** *** 11,19 **** /// package b import a ! new A(); /// PASS /// package b import a ! new A(); /// package a import b --- 13,21 ---- /// package b import a ! let dummy = new A(); /// PASS /// package b import a ! let dummy = new A(); /// package a import b *************** *** 80,82 **** {} /// package d import a,c ! new AA(x:null); --- 82,84 ---- {} /// package d import a,c ! AA<?String> dummy = new AA(x:null); Index: native.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/classes/constructors/native.testsuite,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** native.testsuite 2 Sep 2002 12:24:42 -0000 1.1 --- native.testsuite 15 Jan 2004 21:39:19 -0000 1.2 *************** *** 1,13 **** /// PASS ! new MyEx(); ! new MyEx("Super!"); /// Toplevel class MyEx extends Exception {} /// PASS ! new MyEx(); ! new MyEx("Super!"); ! new MyEx(i: 1); ! new MyEx("Super!", i: 2); /// Toplevel class MyEx extends Exception { int i = 0; } --- 1,13 ---- /// PASS ! let dummy1 = new MyEx(); ! let dummy2 = new MyEx("Super!"); /// Toplevel class MyEx extends Exception {} /// PASS ! let dummy1 = new MyEx(); ! let dummy2 = new MyEx("Super!"); ! let dummy3 = new MyEx(i: 1); ! let dummy4 = new MyEx("Super!", i: 2); /// Toplevel class MyEx extends Exception { int i = 0; } |
From: <ar...@us...> - 2004-01-15 21:39:23
|
Update of /cvsroot/nice/Nice/testsuite/compiler/classes In directory sc8-pr-cvs1:/tmp/cvs-serv24986/F:/nice/testsuite/compiler/classes Modified Files: fields.testsuite initializer.testsuite this.testsuite typeParameters.testsuite Log Message: Stricter parsing of expressions used as statement. Index: fields.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/classes/fields.testsuite,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** fields.testsuite 23 Nov 2003 16:25:17 -0000 1.13 --- fields.testsuite 15 Jan 2004 21:39:19 -0000 1.14 *************** *** 7,11 **** /// PASS ! new A(); /// TOPLEVEL class A --- 7,11 ---- /// PASS ! let dummy = new A(); /// TOPLEVEL class A *************** *** 52,56 **** /// PASS ! new A(); /// Toplevel class A --- 52,56 ---- /// PASS ! let dummy = new A(); /// Toplevel class A *************** *** 72,76 **** /// Toplevel ! void doSomething(String s) { new Martin(); } class Martin --- 72,76 ---- /// Toplevel ! void doSomething(String s) { let dummy = new Martin(); } class Martin *************** *** 81,85 **** /// PASS /// Toplevel ! void g() { new Martin(); } class Martin --- 81,85 ---- /// PASS /// Toplevel ! void g() { let dummy = new Martin(); } class Martin Index: initializer.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/classes/initializer.testsuite,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** initializer.testsuite 30 Nov 2003 14:24:35 -0000 1.13 --- initializer.testsuite 15 Jan 2004 21:39:19 -0000 1.14 *************** *** 1,4 **** /// PASS ! new A(i: cst); /// Toplevel let int cst = 42; --- 1,4 ---- /// PASS ! let dummy = new A(i: cst); /// Toplevel let int cst = 42; *************** *** 25,29 **** boolean ok = false; try { ! new A(); } catch(Error e) { ok = true; } --- 25,29 ---- boolean ok = false; try { ! let dummy = new A(); } catch(Error e) { ok = true; } *************** *** 40,44 **** boolean ok = false; try { ! new B(); } catch(Error e) { ok = true; } --- 40,44 ---- boolean ok = false; try { ! let dummy = new B(); } catch(Error e) { ok = true; } *************** *** 58,62 **** /// PASS bug // Initializers should be executed after all the instance variables are set ! new B(); /// Toplevel --- 58,62 ---- /// PASS bug // Initializers should be executed after all the instance variables are set ! let dummy = new B(); /// Toplevel *************** *** 189,193 **** /// PASS // Capture of 'this' inside an initializer ! new TestA(a: "ABC").b.equals("ABC"); /// Toplevel class TestA --- 189,193 ---- /// PASS // Capture of 'this' inside an initializer ! let dummy = new TestA(a: "ABC").b.equals("ABC"); /// Toplevel class TestA Index: this.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/classes/this.testsuite,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** this.testsuite 28 Dec 2002 11:17:11 -0000 1.5 --- this.testsuite 15 Jan 2004 21:39:19 -0000 1.6 *************** *** 63,67 **** class A{ String _field; ! void f() { _field; } } --- 63,67 ---- class A{ String _field; ! void f() { let s = _field; } } Index: typeParameters.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/classes/typeParameters.testsuite,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** typeParameters.testsuite 15 Nov 2003 13:02:14 -0000 1.14 --- typeParameters.testsuite 15 Jan 2004 21:39:19 -0000 1.15 *************** *** 28,32 **** /// FAIL ! new Coord(p: ""); /// Toplevel class Point { int x; } --- 28,32 ---- /// FAIL ! Coord<Point> dummy = new Coord(p: ""); /// Toplevel class Point { int x; } *************** *** 132,136 **** } /// package b import a ! new Elem(data: ""); /// FAIL --- 132,136 ---- } /// package b import a ! Elem<String> dummy = new Elem(data: ""); /// FAIL *************** *** 141,145 **** } /// package b import a ! /* /// FAIL HERE */ new Elem(data: null); /// PASS --- 141,145 ---- } /// package b import a ! Elem<String> dummy = /* /// FAIL HERE */ new Elem(data: null); /// PASS *************** *** 156,160 **** } /// package b import a ! new Elem(data: ""); /// PASS --- 156,160 ---- } /// package b import a ! Elem<List<Sting>> dummy = new Elem(data: ""); /// PASS *************** *** 252,256 **** /// PASS ! new B(); /// Toplevel class A<T> { T->T f = T x => { T tmp = x; return tmp; }; } --- 252,256 ---- /// PASS ! let B<String> dummy = new B(); /// Toplevel class A<T> { T->T f = T x => { T tmp = x; return tmp; }; } *************** *** 278,282 **** /// FAIL bug ! new AWrapper(); /// Toplevel class A<T> {} --- 278,282 ---- /// FAIL bug ! new AWrapper().getClass(); /// Toplevel class A<T> {} |
From: <ar...@us...> - 2004-01-15 21:39:23
|
Update of /cvsroot/nice/Nice/testsuite/compiler/null In directory sc8-pr-cvs1:/tmp/cvs-serv24986/F:/nice/testsuite/compiler/null Modified Files: export.testsuite Log Message: Stricter parsing of expressions used as statement. Index: export.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/null/export.testsuite,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** export.testsuite 24 Jul 2002 17:29:49 -0000 1.2 --- export.testsuite 15 Jan 2004 21:39:19 -0000 1.3 *************** *** 28,32 **** class A { ?int[?] f; } /// package b import a ! new A(f: null); /// PASS --- 28,32 ---- class A { ?int[?] f; } /// package b import a ! let dummy = new A(f: null); /// PASS *************** *** 35,37 **** class A { int?->int f; } /// package b import a ! new A(f: null); --- 35,37 ---- class A { int?->int f; } /// package b import a ! let dummy = new A(f: null); |
From: <ar...@us...> - 2004-01-15 21:39:23
|
Update of /cvsroot/nice/Nice/testsuite/compiler/native In directory sc8-pr-cvs1:/tmp/cvs-serv24986/F:/nice/testsuite/compiler/native Modified Files: constructors.testsuite Log Message: Stricter parsing of expressions used as statement. Index: constructors.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/native/constructors.testsuite,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** constructors.testsuite 3 Dec 2003 21:50:40 -0000 1.2 --- constructors.testsuite 15 Jan 2004 21:39:19 -0000 1.3 *************** *** 14,18 **** /// PASS ! new Nice(s: ""); /// Toplevel class Nice { String s; } --- 14,18 ---- /// PASS ! let dummy = new Nice(s: ""); /// Toplevel class Nice { String s; } |
From: <ar...@us...> - 2004-01-15 21:39:23
|
Update of /cvsroot/nice/Nice/testsuite/compiler/expressions/arrays In directory sc8-pr-cvs1:/tmp/cvs-serv24986/F:/nice/testsuite/compiler/expressions/arrays Modified Files: literal.testsuite Log Message: Stricter parsing of expressions used as statement. Index: literal.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/expressions/arrays/literal.testsuite,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** literal.testsuite 20 Feb 2003 00:21:44 -0000 1.8 --- literal.testsuite 15 Jan 2004 21:39:19 -0000 1.9 *************** *** 1,4 **** /// PASS ! [ 0 ]; /// PASS --- 1,4 ---- /// PASS ! int[] arr = [ 0 ]; /// PASS |
From: <ar...@us...> - 2004-01-15 21:39:23
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1:/tmp/cvs-serv24986/nice Modified Files: NEWS Log Message: Stricter parsing of expressions used as statement. Index: NEWS =================================================================== RCS file: /cvsroot/nice/Nice/NEWS,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** NEWS 23 Dec 2003 11:47:02 -0000 1.11 --- NEWS 15 Jan 2004 21:39:19 -0000 1.12 *************** *** 6,9 **** --- 6,10 ---- arguments. For example 'loop(5) { doSomeThing(); }' is shorthand for 'loop(5, () => { doSomeThing(); });' + * Stricter parsing of expression used as statement. * Bug fixes (checking of local variables in a call position, make it possible to use new Object() and dispatch on Object again, ... ) |
From: <ar...@us...> - 2004-01-15 21:39:23
|
Update of /cvsroot/nice/Nice/testsuite/compiler/abstractInterfaces In directory sc8-pr-cvs1:/tmp/cvs-serv24986/F:/nice/testsuite/compiler/abstractInterfaces Modified Files: existingClass.testsuite Log Message: Stricter parsing of expressions used as statement. Index: existingClass.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/abstractInterfaces/existingClass.testsuite,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** existingClass.testsuite 3 Dec 2003 21:50:41 -0000 1.5 --- existingClass.testsuite 15 Jan 2004 21:39:19 -0000 1.6 *************** *** 12,16 **** class java.lang.String implements I; /// package b import a ! true; /// FAIL --- 12,16 ---- class java.lang.String implements I; /// package b import a ! {} /// FAIL |
From: <ar...@us...> - 2004-01-15 21:39:22
|
Update of /cvsroot/nice/Nice/src/bossa/parser In directory sc8-pr-cvs1:/tmp/cvs-serv24986/F:/nice/src/bossa/parser Modified Files: Parser.jj Log Message: Stricter parsing of expressions used as statement. Index: Parser.jj =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v retrieving revision 1.230 retrieving revision 1.231 diff -C2 -d -r1.230 -r1.231 *** Parser.jj 22 Dec 2003 20:28:10 -0000 1.230 --- Parser.jj 15 Jan 2004 21:39:18 -0000 1.231 *************** *** 2132,2136 **** { res=PrimaryPrefix() ! ( LOOKAHEAD(2) res=PrimarySuffix(res) )* { res.setLocation(Location.make(first, getToken(0))); return res; } --- 2132,2136 ---- { res=PrimaryPrefix() ! ( res=PrimarySuffix(res) )* { res.setLocation(Location.make(first, getToken(0))); return res; } *************** *** 2506,2514 **** e1=Pre_crementExpression() ";" | ! e1=PrimaryExpression() ! ( ! PostfixBlocks(e1) | ! e1=PostfixStatementExpression(e1, first) ";" ) ) --- 2506,2525 ---- e1=Pre_crementExpression() ";" | ! ( LOOKAHEAD( "super" ) ! "super" ";" { e1 = new SuperExp(); } | ! e1=PrimaryPrefix() ! ( ! e1=PostfixStatementExpression(e1, first) ";" ! | ! ( e1=PrimarySuffix(e1) )+ ! ( ! ";" ! | ! PostfixBlocks(e1) ! | ! e1=PostfixStatementExpression(e1, first) ";" ! ) ! ) ) ) *************** *** 2527,2535 **** e1=Pre_crementExpression() | ! e1=PrimaryExpression() ! ( ! PostfixBlocks(e1) | ! e1=PostfixStatementExpression(e1, first) ) ) --- 2538,2555 ---- e1=Pre_crementExpression() | ! ( LOOKAHEAD( "super" ) ! "super" { e1 = new SuperExp(); } | ! e1=PrimaryPrefix() ! ( ! e1=PostfixStatementExpression(e1, first) ! | ! ( e1=PrimarySuffix(e1) )+ ! [ ! PostfixBlocks(e1) ! | ! e1=PostfixStatementExpression(e1, first) ! ] ! ) ) ) *************** *** 2545,2549 **** {} { ! [ "++" { e1=new IncrementExp(e1, false, true); } | --- 2565,2569 ---- {} { ! ( "++" { e1=new IncrementExp(e1, false, true); } | *************** *** 2561,2565 **** e1=AssignExp.create(e1,e2); } ! ] { return e1; } } --- 2581,2585 ---- e1=AssignExp.create(e1,e2); } ! ) { return e1; } } |