Re: [really patch] Re: HashMap putAll/putAllInternal bug

2003-10-12 Thread Stephen Crawley

"David Holmes" <[EMAIL PROTECTED]> wrote:
> If you can't provide a valid implementation for any concrete method
> that you are supposed to implement, then it seems quite unreasonable
> of you to expect any inherited methods to work for you. I think it
> quite reasonable for a method like putAll to expect to be able to use
> any of the non-optional methods of Map/Set/Iterator to do its job -
> even if it doesn't document exactly which methods it uses.

The corollary is that if you can't provide a valid (and sufficiently
efficient for your purposes) implementation for an abstract method in
AbstractMap, then you should NOT be extending AbstractMap.  Rather you
should be implementing the Map interface from scratch.

-- Steve



___
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath


RE: [really patch] Re: HashMap putAll/putAllInternal bug

2003-10-12 Thread David Holmes
Stuart Ballard wrote:
> My requirement is for a map which holds references to two
> other maps, "front" and "back". The keySet() of my map is the union
of
> front.keySet() and back.keySet(). The value corresponding
> to a given key is 'front.containsKey(key) ? front.get(key) :
> back.get(key)'. Both front and back can be accessed directly through
> other code and may change in any way without my map being notified.
> How can I implement size() without a full iteration?

If you extend AbstractMap (why on earth would you with this
specialised implementation?) then size is defined as
entrySet().size(). From what you wrote it would appear that
entrySet().size() in your case will be a function of the size of the
front and back entrysets. Even if these are modified outside of the
main map, as long as it's not concurrent (in which case you're on your
own), then you should still be able to calculate the map size if the
front and back maps maintain their size correctly.

If you can't provide a valid implementation for any concrete method
that you are supposed to implement, then it seems quite unreasonable
of you to expect any inherited methods to work for you. I think it
quite reasonable for a method like putAll to expect to be able to use
any of the non-optional methods of Map/Set/Iterator to do its job -
even if it doesn't document exactly which methods it uses.

David Holmes



___
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath


Re: Where to stay in Saarbruecken

2003-10-12 Thread Dalibor Topic
Chris Gray wrote:
On Wednesday 08 October 2003 17:59, Dalibor Topic wrote:


In any case, if you're coming down, send me a private e-mail, and I'll
send you my contact details, so you can get in touch with me on my
mobile, etc. And in any case, we should all meet on monday evening for a
couple of drinks ;)


Dalibor,

if you're organising a meal on Tuesday evening then count me in.  Same goes 
for drinks tommorow (Monday) - send me an SMS on the number below. (I'll be 
leaving home sometime around noon, so email won't reach me after then).

No worries. I'll be doing some chili cooking & drinking with Mark 
Wielaard at my place first (details below), and we may decide to finish 
the evening in one of the surrounding bars. Join us anytime.

So come to Martin-Luther-Strasse 6a, and ring the bell for with Topic on 
it, that's me ;) The place is quite easy to find, Mark got lost in 
Saarbruecken, and popped out right at my door this afternoon. So the 
simplest way to find it walking from the train station is to turn left 
when you get out, and follow the city train tracks till you arrive at a 
church, Johanneskirche. standing at the church? Good, walk down the 
street between the church's garden and the buildings left to it (if you 
came down from the train station). From there you just keep going 
straight down that street across the Nauwieser quarter, till you get to 
a bus stop, that says LVA on it. If you're taking a taxi, you want to go 
to 'LVA' or 'el-fauh-ah' as Germans pronounce that. You're basically 
there: a few meters down the road is a red 'TOTAL' gas station, and a 
'Crown' gambling place. My door is next to the gaming place, 6a.

If you miss it, don't hesitate to call me: +49 681 3799246 or my mobile 
at +49 177 2664192. Oh, and if you need a place to stay, or help 
locating a hotel, give me a call as well. I could provide a sleeping bag 
for one, and room to crash for another person or two.

I assume we'll organize the dinner on tuesday on the spot, depending how 
many of us there are, and any plans Sascha has (who lived in 
Saarbruecken for some time, too).

have a good trip,
dalibor topic
Martin Luther Strasse 6a
Saarbruecken
+49 681 3799246
+49 177 2664192


___
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath


Re: Where to stay in Saarbruecken

2003-10-12 Thread Chris Gray
On Wednesday 08 October 2003 17:59, Dalibor Topic wrote:

> In any case, if you're coming down, send me a private e-mail, and I'll
> send you my contact details, so you can get in touch with me on my
> mobile, etc. And in any case, we should all meet on monday evening for a
> couple of drinks ;)

Dalibor,

if you're organising a meal on Tuesday evening then count me in.  Same goes 
for drinks tommorow (Monday) - send me an SMS on the number below. (I'll be 
leaving home sometime around noon, so email won't reach me after then).

-- 
Chris Gray/k/ Embedded Java Solutions
Embedded & Mobile Java, OSGi  http://www.kiffer.be/k/
[EMAIL PROTECTED]  +32 477 599 703


___
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath


OSX port of classpath

2003-10-12 Thread Chris Hoffmann
I've been working on an OSX port of JikesRVM 
(http://oss.software.ibm.com/developerworks/oss/jikesrvm/?origin=jikes),
which uses classpath 0.06. Is there an official port of classpath to OSX?

If not, I've attached a patch file showing the changes I had to make to 
get classpath working on OSX. By "working" I mean working well enough to 
pass the JikesRVM regression tests that I use, not that the port could 
pass the classpath regresssion tests! And the changes were done by hand; 
if I knew more about configure I would perhaps have done them differently.

Any chance these can be folded into classpath 0.07?

Enjoy,
Chris
--
Chris Hoffmann -- Dept. of Computer Science/UMass at Amherst
http://www-ali.cs.umass.edu/~hoffmann
diff -ur 
/exp/dodo/ali/home/naren/rvm-cvs-mos/classpath/classpath/native/fdlibm/ieeefp.h 
classpath/native/fdlibm/ieeefp.h
--- /exp/dodo/ali/home/naren/rvm-cvs-mos/classpath/classpath/native/fdlibm/ieeefp.h
 Fri Jan 10 11:49:15 2003
+++ classpath/native/fdlibm/ieeefp.hFri Oct  3 11:17:44 2003
@@ -113,6 +113,11 @@
 #endif
 #endif
 
+#if (defined( __BIG_ENDIAN__) && defined( __APPLE__ ))
+#define __IEEE_BIG_ENDIAN
+#endif 
+
+
 #ifdef __fr30__
 #define __IEEE_BIG_ENDIAN
 #endif
diff -ur 
/exp/dodo/ali/home/naren/rvm-cvs-mos/classpath/classpath/native/jni/java-io/FileDescriptor.c
 classpath/native/jni/java-io/FileDescriptor.c
--- 
/exp/dodo/ali/home/naren/rvm-cvs-mos/classpath/classpath/native/jni/java-io/FileDescriptor.c
Wed Jul 30 06:11:34 2003
+++ classpath/native/jni/java-io/FileDescriptor.c   Fri Oct  3 11:19:16 2003
@@ -121,9 +121,9 @@
   if ((*env)->ExceptionOccurred (env))  \
 return;
 
-  INIT_FIELD ("in", 0);
-  INIT_FIELD ("out", 1);
-  INIT_FIELD ("err", 2);
+  INIT_FIELD ("in", ((long long)0));
+  INIT_FIELD ("out", ((long long)1));
+  INIT_FIELD ("err", ((long long)2));
 
 #undef INIT_FIELD
 }
@@ -174,6 +174,10 @@
   permissions = TARGET_NATIVE_FILE_FILEPERMISSION_NORMAL;
 }
 
+#ifndef O_SYNC
+#undef TARGET_NATIVE_FILE_FILEFLAG_SYNC
+#define TARGET_NATIVE_FILE_FILEFLAG_SYNC O_FSYNC
+#endif
   if ((jflags & FILEDESCRIPTOR_FILEOPEN_FLAG_SYNC))
 {
   flags |= TARGET_NATIVE_FILE_FILEFLAG_SYNC;
@@ -183,10 +187,12 @@
 {
   flags |= TARGET_NATIVE_FILE_FILEFLAG_DSYNC;
 }
+
 #ifdef O_BINARY
   flags |= TARGET_NATIVE_FILE_FILEFLAG_BINARY;
 #endif
 
+
   TARGET_NATIVE_FILE_OPEN(filename,native_fd,flags,permissions,result);
   (*env)->ReleaseStringUTFChars(env, name, filename);
 
@@ -199,6 +205,7 @@
   return TARGET_NATIVE_MATH_INT_INT64_CONST_MINUS_1;
 }
 
+
   return CONVERT_INT_TO_JLONG(native_fd);
 }
 
diff -ur 
/exp/dodo/ali/home/naren/rvm-cvs-mos/classpath/classpath/native/target/generic/target_generic_network.h
 classpath/native/target/generic/target_generic_network.h
--- 
/exp/dodo/ali/home/naren/rvm-cvs-mos/classpath/classpath/native/target/generic/target_generic_network.h
 Tue Aug 19 05:07:19 2003
+++ classpath/native/target/generic/target_generic_network.hFri Oct  3 11:19:55 
2003
@@ -66,6 +66,9 @@
 /* Variables ***/
 
 /** Macros */
+#ifdef __MACH__
+typedef intsocklen_t;   
+#endif
 
 /***\
 * Name   : TARGET_NATIVE_NETWORK_IPADDRESS_BYTES_TO_INT
___
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath


Re: dotnet platform support / gnu config.sub (long)

2003-10-12 Thread Guido Draheim


Jim Pick wrote:
Anyways, the config.sub name is just going to be used to define a
"target" - so it makes sense to call the target "Java", since it's only
going to be used by tools generating Java byte code, which will run on
Sun's JVM.  Of course it will still run on other virtual machines that
can't use the Java trademark, but that shouldn't be of any concern to
the tools generating the code, IMHO.
Yes, in the java world it is pretty strict what there is as names for the
machine and language. My original mail was asking for a similar thing
in the dotnet world where microsoft has used "il" internally for its vm,
it was submitted as "cil" to ecma, the binaries get executed with "ilrun",
the class platform is now named "dotnet", and the language is not strictly
specified but "csharp" being new to the flock and sent in for standard in
in the dotnet world as well.
While java does have mostly its own toolchain from .java to .jar parts,
there are tools in the ilvm world that convert .c/.cpp to an ilrun .exe,
including free tools. That spawned the idea to make the platform be
recognized as a crosscompile build target by the usual gnu build tools
that also handle .c/.cpp input sources, and with config.sub heading off
and trying to get a canonic form of whatever of the dozen of names is given
on the commandline.
We could as well clean out the java canonicalization from the patch that
I would like to see put into gnu config, - yet as far as the discussion
has shown the current scheme would still be good and usable around and
in free projects as well. In consequence, the proposed scheme to identify
vm-type platforms would be better supported by its examples living in
config.sub from there on, calling them a *vm-* something $host. That
would be great.
BJE, what do you get from the discussion?   Revised patch attached.
cheers,
-- guido  http://google.de/search?q=guidod
GCS/E/S/P C++/$ ULHS L++w- N++@ d(+-) s+a- r+@>+++ y++ 5++X- (geekcode)
Index: config.sub
===
RCS file: /cvsroot/config/config/config.sub,v
retrieving revision 1.289
diff -u -r1.289 config.sub
--- config.sub  3 Oct 2003 00:17:36 -   1.289
+++ config.sub  3 Oct 2003 11:05:04 -
@@ -3,7 +3,7 @@
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
 #   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 
-timestamp='2003-08-18'
+timestamp='2003-10-03'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -218,6 +218,8 @@
basic_machine=m68k-atari
os=-mint
;;
+-jdk | -j2*)
+os="-java$os"
 esac
 
 # Decode aliases for certain CPU-COMPANY combinations.
@@ -602,6 +604,22 @@
basic_machine=i386-unknown
os=-vsta
;;
+cil | ilvm | ilrun)
+basic_machine=ilvm-pc
+os=`echo "-ilrun$os" | sed -e 's/ilrun-ilrun/ilrun/'`
+;;
+cil32 | ilvm32 | ilrun32)
+basic_machine=ilvm32-pc
+os=`echo "-ilrun$os" | sed -e 's/ilrun-ilrun/ilrun/'`
+;;
+cil-* | ilvm-* | ilrun-*)
+basic_machine=`echo "$basic_machine" | sed -e 's/^[^-]*/ilvm/'`
+os=`echo "-ilrun$os" | sed -e 's/ilrun-ilrun/ilrun/'`
+;;
+cil32-* | ilvm32-* | ilrun32-*)
+basic_machine=`echo "$basic_machine" | sed -e 's/^[^-]*/ilvm32/'`
+os=`echo "-ilrun$os" | sed -e 's/ilrun-ilrun/ilrun/'`
+;;
iris | iris4d)
basic_machine=mips-sgi
case $os in
@@ -616,6 +634,14 @@
basic_machine=m68k-isi
os=-sysv
;;
+jvm | java | jvm-java)
+   basic_machine=jvm-unknown
+os=`echo "-java$os" | sed -e 's/java-java/java/'`
+;;
+jvm-* | java-*)
+basic_machine=`echo "$basic_machine" | sed -e 's/^java/jvm/'`
+os=`echo "-java$os" | sed -e 's/java-java/java/'`
+;;
m88k-omron*)
basic_machine=m88k-omron
;;
@@ -824,6 +850,14 @@
basic_machine=i586-unknown
os=-pw32
;;
+pyvm | python)
+   basic_machine=pyvm-unknown
+os=`echo "-python$os" | sed -e 's/python-python/python/'`
+;;
+pyvm-* | python-*)
+   basic_machine=`echo "$basic_machine" | sed -e 's/^python/pyvm/'`
+os=`echo "-python$os" | sed -e 's/python-python/python/'`
+;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
@@ -1143,7 +1177,8 @@
  | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
  | -os2* | -vos* |