Re: [cp-patches] [generics] RFC : implementation of jjava.lang.instrument package

2005-12-02 Thread Nicolas Geoffray

Hi Mark,

Mark Wielaard wrote:



My idea was even that a VM might only want to have one redefine
prepare/apply cycle running at the same time. Then it can easily cleanup
anything not used. But this might be optimizing for an unusual case. We
can probably assume that transformers will actually transform correctly.

 


You're deleting all shared code I came up with :) I switched
to your idea because it reduces the number of native methods.


Aha. Sorry I missed the dual nature of the
ClassFileTransFormer.transform() method. I see you documented this in
your original patch. In that case I really do think we should move these
to vm/reference/java/lang and make this method package private.

 


Which method? callTransformers? It's a method from the
InstrumentationImpl class, therefore it's in
gnu/java/lang/instrument. Would you like InstrumentationImpl
to be in vm/reference/java/lang/InsutrumentationImpl? This sounds
weird. We could also make the callTransformers method public.


Right, I see we need to break the VM interface for this :{
Probably best not to do that for the first release (0.20) but lets
suggest how we would like to change the interface for 0.21 so runtime
implementers can prepare and scream about it. On the other hand this is
the generics branch only, not very many VMs depend on it yet. But not
very urgent I guess before we have this working with at least one VM.

 


I'm working on it (the jnjvm can now execute with the generics branch,
yeah :)). OK for making suggestions, where should it be written?


Just make a new paragraph for Instrumentation. Then mention that it
currently only is on the generics branch since it uses some new language
features.

   


OK then.

Cheers,
Nicolas



___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] Patch: Implementing non-abstract members on abstract X509Certificate and correcting GeneralName OtherName parsing

2005-12-02 Thread Mark Wielaard
Hi,

On Thu, 2005-12-01 at 21:18 -0800, Casey Marshall wrote:
 This patch looks good to me. Do you have a copyright assignment on  
 file for Classpath?

No, I'll sent Rafael the request forms. Most of this is small/obvious
and can be applied when we change it to our coding style though. But for
larger/more substantial changes we should have paperwork on file.

Cheers,

Mark


signature.asc
Description: This is a digitally signed message part
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] FYI: Fixes in org.omg.CORBA.Object._is_equivalent.

2005-12-02 Thread Mark Wielaard
Hi Audrius,

Going through some older patches.

On Sun, 2005-11-06 at 14:24 +0100, Meskauskas Audrius wrote:
 +  /**
 +   * Get the hashcode of this IOR.
 +   */
 +  public int hashCode()
 +  {
 +Adler32 adler = new Adler32();
 +if (key != null)
 +  adler.update(key);
 +if (Internet != null  Internet.host != null)
 +  adler.update(Internet.host.getBytes());
 +
 +return (int) adler.getValue();
}

You often use the result of an Adler32 checksum as hashCode() value.
Wouldn't it be more efficient to just simply xor the relevant fields? In
the followup patch you also correctly add the port number so in this
case it would be:

public int hashCode()
{
  int hash = 0;
  if (key != null)
for (int i = 0; i  key.length; i++)
  hash ^= key[i];
  if (Internet != null  Internet.host != null)
{
  byte[] bs = Internet.host.getBytes();
  for (int i = 0; i  bs.length; i++)
hash ^= bs[i];
  hash ^= Internet.port;
}
  return hash;
}

Which seems more efficient. But maybe that isn't a good enough hash
function in this case and maybe using Adler32 isn't that much overhead.
Just wondering why you use it.

Cheers,

Mark


signature.asc
Description: This is a digitally signed message part
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] Patch: More JFormattedTextField implementations and fixes

2005-12-02 Thread Anthony Balkissoon
This is the last big part of JFormattedTextField I was working on.  It
implements all the parts that were throwing InternalError (not
implemented) and fixes a lot of bugs with how we were generating
formatters and formatter factories.  It also implements missing parts of
JFormattedTextField.AbstractFormatter.

I added 3 more tests to
gnu.testlet.javax.swing.JFormattedTextField.JFormattedTextFieldTests
that this patch makes us pass.

2005-12-02  Anthony Balkissoon  [EMAIL PROTECTED]

* javax/swing/JFormattedTextField.java: Added docs all over.
(AbstractFormatter.clone): Implemented.
(AbstractFormatter.getActions): Implemented.
(AbstractFormatter.getDocumentFilter): Implemented.
(AbstractFormatter.getNavigationFilter): Implemented.
(AbstractFormatter.install): Install the DocumentFilter and 
NavigationFilter.  Properly catch ParseException.  Added FIXME to add
custom Actions to the JFormattedTextField.
(AbstractFormatter.uninstall): Remove the DocumentFilter and 
NavigationFilter.  Added FIXME to remove the custom Actions.
(JFormattedTextField(AbstractFormatter)): Call the single argument
constructor that takes in an AbstractFormatterFactory.  This avoids a 
call to setValue that shouldn't occur.
(JFormattedTextField(AbstractFormatterFactory): Call 
setFormatterFactory instead of calling the 2-argument constructor which
would also make an unwanted call to setValue.
(JFormattedTextField(AbstractFormatterFactory, Object)): Switch the 
order of the calls to setValue and setFormatterFactory.  This ensures
that the passed in factory is actually the one used, not one generated
by setValue.
(commitEdit): Implemented.
(setFormatter): Removed incorrect early escape if the parameter is the 
same as the current formatter.  
(setFormatterFactory): If formatterFactory is null set the formatter to
null as well.
(setValue): Don't set the text here, this is done when we call 
setFormatter and it calls AbstractFormatter.install.  Create a 
formatter factory if one doesn't exist already. Call setFormatter to
get an appropriate formatter from the factory.
(createFormatter): Changed this to createFormatterFactory because we
should return a factory, not just a formatter.
(createFormatterFactory): New method adapted from createFormatter.

--Tony
Index: javax/swing/JFormattedTextField.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/JFormattedTextField.java,v
retrieving revision 1.18
diff -u -r1.18 JFormattedTextField.java
--- javax/swing/JFormattedTextField.java	30 Nov 2005 23:02:37 -	1.18
+++ javax/swing/JFormattedTextField.java	2 Dec 2005 16:11:22 -
@@ -46,6 +46,7 @@
 import java.text.ParseException;
 import java.util.Date;
 
+import javax.swing.text.AbstractDocument;
 import javax.swing.text.DateFormatter;
 import javax.swing.text.DefaultFormatter;
 import javax.swing.text.DefaultFormatterFactory;
@@ -67,6 +68,7 @@
  * formatting of the value of the JFormattedTextField.
  *
  * @author Michael Koch
+ * @author Anthony Balkissoon abalkiss at redhat dot com
  *
  * @since 1.4
  */
@@ -90,70 +92,184 @@
   //Do nothing here.
 }
 
+/**
+ * Clones the AbstractFormatter and removes the association to any 
+ * particular JFormattedTextField.
+ * 
+ * @return a clone of this formatter with no association to any particular
+ * JFormattedTextField
+ * @throws CloneNotSupportedException if the Object's class doesn't support
+ * the [EMAIL PROTECTED] Cloneable} interface
+ */
 protected Object clone ()
   throws CloneNotSupportedException
 {
-  throw new InternalError (not implemented);
+  // Clone this formatter.
+  AbstractFormatter newFormatter = (AbstractFormatter)super.clone();
+  
+  // And remove the association to the JFormattedTextField.
+  newFormatter.textField = null;
+  return newFormatter;
 }
 
+/**
+ * Returns a custom set of Actions that this formatter supports.  Should
+ * be subclassed by formatters that have a custom set of Actions.
+ * 
+ * @return codenull/code.  Should be subclassed by formatters that want
+ * to install custom Actions on the JFormattedTextField.
+ */
 protected Action[] getActions ()
 {
-  return textField.getActions();
+  return null;
 }
 
+/**
+ * Gets the DocumentFilter for this formatter.  Should be subclassed
+ * by formatters wishing to install a filter that oversees Document
+ * mutations.
+ * 
+ * @return codenull/code.  Should be subclassed by formatters
+ * that want to restrict Document mutations.
+ */
 protected DocumentFilter getDocumentFilter ()
 {
-  throw new InternalError 

Re: [cp-patches] [generics] RFC : implementation of jjava.lang.instrument package

2005-12-02 Thread Mark Wielaard
Hi Nicolas,

On Fri, 2005-12-02 at 12:22 +0100, Nicolas Geoffray wrote:
 Aha. Sorry I missed the dual nature of the
 ClassFileTransFormer.transform() method. I see you documented this in
 your original patch. In that case I really do think we should move these
 to vm/reference/java/lang and make this method package private.
 
 Which method? callTransformers? It's a method from the
 InstrumentationImpl class, therefore it's in
 gnu/java/lang/instrument. Would you like InstrumentationImpl
 to be in vm/reference/java/lang/InsutrumentationImpl? This sounds
 weird. We could also make the callTransformers method public.

Yes, but it makes it easier to share code with ClassLoader and
VMClassLoader if we do this. Then callTransformers doesn't have to be
public, but can just be package private. Then we don't have to worry
about whether or not someone can get insecure access to a
IntrumentationImpl (although I admit that is not very likely). It just
seems more natural to me to have all implementation classes in the same
package because they seem very related.

 I'm working on it (the jnjvm can now execute with the generics branch,
 yeah :)). OK for making suggestions, where should it be written?

In the VM Integration Guide of course and in the NEWS file. And when we
have a first implementation of all this checked in it might make sense
to explicitly ask on the main classpath list to get the attention of
those runtime implementors that don't follow the patches list that
closely.

Cheers,

Mark



___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] [generics] RFC : implementation of jjava.lang.instrument package

2005-12-02 Thread Nicolas Geoffray

Mark Wielaard wrote:


Yes, but it makes it easier to share code with ClassLoader and
VMClassLoader if we do this. Then callTransformers doesn't have to be
public, but can just be package private. Then we don't have to worry
about whether or not someone can get insecure access to a
IntrumentationImpl (although I admit that is not very likely). It just
seems more natural to me to have all implementation classes in the same
package because they seem very related.

 


Allright then, VMInstrumentationImpl and InstrumentationImpl
are in vm/reference/java/lang

Last RFC, and I'm commiting this in

2005-12-02 Nicolas Geoffray [EMAIL PROTECTED]
   
   * java/lang/instrument: New directory.

   * java/lang/instrument/ClassDefinition.java:
   New file.
   * java/lang/instrument/ClassFileTransformer.java:
   New file.
   * java/lang/instrument/IllegalClassFormatException.java:
   New file.
   * java/lang/instrument/Instrumentation.java:
   New file.
   * java/lang/instrument/UnmodifiableClassException.java:
   New file.
   * vm/reference/java/lang/InstrumentationImpl.java:
   New file.
   * vm/reference/java/lang/VMInstrumentationImpl.java:
   New file.




instrument.tar.gz
Description: GNU Zip compressed data
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [Fwd: Re: [cp-patches] Comparable in java.util.Calendar]

2005-12-02 Thread Mark Wielaard
Hi Kendall,
 On Tue, 2005-11-22 at 09:55 -0600, Kendall Bell wrote:
  2005-11-21  Kendall Bell  [EMAIL PROTECTED]
  
  * java/util/Calendar.java:
  Implemented Comparable.
  (compareTo) Method added.
 
 Thanks. Could you also email that to the classpath-patches list so
 others can review? Also Tom said that there was another implementation
 on the generics branch (he is in Brazil and can apparently not sent
 email). Could you compare that implementation with your implementation?
 http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/util/Calendar.java?only_with_tag=generics-branch

I see your paperwork has gone through and the mailinglist seems to
function again. Have you had time to compare the two implementations?

Thanks,

Mark


signature.asc
Description: This is a digitally signed message part
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] Re: Patch: fix alsa configury for systems with multilibs

2005-12-02 Thread Tom Tromey
 Anthony == Anthony Green [EMAIL PROTECTED] writes:

Anthony It's not enough to test that the alsa headers exist.  We also
Anthony need to make sure the libraries are there.  This was a
Anthony problem for x86-64 linux.
Anthony Ok for everywhere?

We talked on irc, but just for the record -- yes please, especially
the 4.1 branch.

Tom


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches



[cp-patches] FYI: InternationalFormatter fixlet

2005-12-02 Thread Anthony Balkissoon
Small fixlet for InternationalFormatter.

2005-12-02  Anthony Balkissoon  [EMAIL PROTECTED]

* javax/swing/text/InternationalFormatter.java:
(valueToString): If argument is null return empty String.

--Tony
Index: javax/swing/text/InternationalFormatter.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/text/InternationalFormatter.java,v
retrieving revision 1.6
diff -u -r1.6 InternationalFormatter.java
--- javax/swing/text/InternationalFormatter.java	24 Nov 2005 17:58:52 -	1.6
+++ javax/swing/text/InternationalFormatter.java	2 Dec 2005 20:10:42 -
@@ -228,6 +228,8 @@
   public String valueToString(Object value)
 throws ParseException
   {
+if (value == null)
+  return ;
 if (format != null)
   return format.format(value);
 else
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] [generics] Patch: FYI: javax.naming generics cleanups

2005-12-02 Thread Tom Tromey
I'm checking this in on the generics branch.

The 1.5 japi results seem to lag cvs by a couple of days.
I found these missing genericizations when looking through the
results today.  Unfortunately due to the lag it is kind of hard to
tell what is really unfinished; some of the things it claims are
wrong actually are not.

Tom

2005-12-02  Tom Tromey  [EMAIL PROTECTED]

* javax/naming/directory/InitialDirContext.java (search): Genericized.
* javax/naming/directory/BasicAttributes.java (getAll): Genericized.
(getIDs): Likewise.
* javax/naming/directory/BasicAttribute.java (getAll): Fixed return
type.
* javax/naming/InitialContext.java: Genericized.
(list): Likewise.
(listBindings): Likewise.
* javax/naming/CompoundName.java (getAll): Genericized.
* javax/naming/CompositeName.java (getAll): Genericized.

Index: javax/naming/CompositeName.java
===
RCS file: /cvsroot/classpath/classpath/javax/naming/CompositeName.java,v
retrieving revision 1.2.2.3
diff -u -r1.2.2.3 CompositeName.java
--- javax/naming/CompositeName.java 27 Nov 2005 18:28:17 -  1.2.2.3
+++ javax/naming/CompositeName.java 2 Dec 2005 22:30:30 -
@@ -224,7 +224,7 @@
 return (String) elts.get (posn);
   }
 
-  public Enumeration getAll ()
+  public EnumerationString getAll ()
   {
 return elts.elements ();
   }
Index: javax/naming/CompoundName.java
===
RCS file: /cvsroot/classpath/classpath/javax/naming/CompoundName.java,v
retrieving revision 1.6.2.5
diff -u -r1.6.2.5 CompoundName.java
--- javax/naming/CompoundName.java  27 Nov 2005 18:28:17 -  1.6.2.5
+++ javax/naming/CompoundName.java  2 Dec 2005 22:30:30 -
@@ -285,7 +285,7 @@
 return (String) elts.get (posn);
   }
 
-  public Enumeration getAll ()
+  public EnumerationString getAll ()
   {
 return elts.elements ();
   }
Index: javax/naming/InitialContext.java
===
RCS file: /cvsroot/classpath/classpath/javax/naming/InitialContext.java,v
retrieving revision 1.7.2.2
diff -u -r1.7.2.2 InitialContext.java
--- javax/naming/InitialContext.java27 Nov 2005 18:28:17 -  1.7.2.2
+++ javax/naming/InitialContext.java2 Dec 2005 22:30:30 -
@@ -293,22 +293,26 @@
 getURLOrDefaultInitCtx (oldName).rename (oldName, newName);
   }
 
-  public NamingEnumeration list (Name name) throws NamingException
+  public NamingEnumerationNameClassPair list (Name name)
+throws NamingException
   {
 return getURLOrDefaultInitCtx (name).list (name);
   }
 
-  public NamingEnumeration list (String name) throws NamingException
+  public NamingEnumerationNameClassPair list (String name)
+throws NamingException
   {
 return getURLOrDefaultInitCtx (name).list (name);
   }
 
-  public NamingEnumeration listBindings (Name name) throws NamingException
+  public NamingEnumerationBinding listBindings (Name name)
+   throws NamingException
   {
 return getURLOrDefaultInitCtx (name).listBindings (name);
   }
 
-  public NamingEnumeration listBindings (String name) throws NamingException
+  public NamingEnumerationBinding listBindings (String name)
+throws NamingException
   {
 return getURLOrDefaultInitCtx (name).listBindings (name);
   }
@@ -375,7 +379,7 @@
 return myProps.remove (propName);
   }
 
-  public Hashtable getEnvironment () throws NamingException
+  public Hashtable?, ? getEnvironment () throws NamingException
   {
 return myProps;
   }
Index: javax/naming/directory/BasicAttribute.java
===
RCS file: 
/cvsroot/classpath/classpath/javax/naming/directory/BasicAttribute.java,v
retrieving revision 1.2.2.3
diff -u -r1.2.2.3 BasicAttribute.java
--- javax/naming/directory/BasicAttribute.java  27 Nov 2005 18:28:18 -  
1.2.2.3
+++ javax/naming/directory/BasicAttribute.java  2 Dec 2005 22:30:30 -
@@ -178,7 +178,7 @@
 return values.get (index);
   }
 
-  public NamingEnumerationAttribute getAll ()
+  public NamingEnumeration? getAll ()
 throws NamingException
   {
 return new BasicAttributeEnumeration ();
Index: javax/naming/directory/BasicAttributes.java
===
RCS file: 
/cvsroot/classpath/classpath/javax/naming/directory/BasicAttributes.java,v
retrieving revision 1.2.2.4
diff -u -r1.2.2.4 BasicAttributes.java
--- javax/naming/directory/BasicAttributes.java 2 Aug 2005 20:12:35 -   
1.2.2.4
+++ javax/naming/directory/BasicAttributes.java 2 Dec 2005 22:30:30 -
@@ -123,12 +123,12 @@
 return null;
   }
 
-  public NamingEnumeration getAll ()
+  public NamingEnumerationAttribute getAll ()
   {
 return new BasicAttributesEnumeration (false);
   }
 
-  public NamingEnumeration getIDs ()
+  public 

[cp-patches] [generics] Patch: FYI: generics -vs- javax.sound.sampled

2005-12-02 Thread Tom Tromey
I'm checking this in on the generics branch.

javax.sound.sampled was merged to the generics branch after my last
round of genericization.  This patch fixes it up.

Tom

2005-12-02  Tom Tromey  [EMAIL PROTECTED]

* javax/sound/sampled/Port.java (Info): Genericized.
* javax/sound/sampled/Line.java (Info): Genericized.
(getLineClass): Likewise.
* javax/sound/sampled/DataLine.java (Info): Genericized.
* javax/sound/sampled/AudioFormat.java (AudioFormat): Genericized.
(properties): Likewise.
* javax/sound/sampled/AudioFileFormat.java (AudioFileFormat):
Genericized.
(properties): Likewise.

Index: javax/sound/sampled/AudioFileFormat.java
===
RCS file: 
/cvsroot/classpath/classpath/javax/sound/sampled/AudioFileFormat.java,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 AudioFileFormat.java
--- javax/sound/sampled/AudioFileFormat.java27 Nov 2005 21:00:37 -  
1.1.2.1
+++ javax/sound/sampled/AudioFileFormat.java2 Dec 2005 22:38:48 -
@@ -153,7 +153,7 @@
* @param properties the properties
*/
   public AudioFileFormat(Type type, AudioFormat fmt, int frameLen,
-Map properties)
+MapString, Object properties)
   {
 this.byteLength = AudioSystem.NOT_SPECIFIED;
 this.format = fmt;
@@ -226,7 +226,7 @@
* Return the properties associated with this format, as a Map.
* The returned Map is unmodifiable.
*/
-  public Map properties()
+  public MapString, Object properties()
   {
 return properties;
   }
Index: javax/sound/sampled/AudioFormat.java
===
RCS file: /cvsroot/classpath/classpath/javax/sound/sampled/AudioFormat.java,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 AudioFormat.java
--- javax/sound/sampled/AudioFormat.java27 Nov 2005 21:00:37 -  
1.1.2.1
+++ javax/sound/sampled/AudioFormat.java2 Dec 2005 22:38:48 -
@@ -177,7 +177,7 @@
*/
   public AudioFormat(Encoding encoding, float sampleRate, int sampleSizeInBits,
 int channels, int frameSize, float frameRate,
-boolean bigEndian, Map properties)
+boolean bigEndian, MapString, Object properties)
   {
 this.encoding = encoding;
 this.sampleRate = sampleRate;
@@ -319,7 +319,7 @@
* Return a read-only Map holding the properties associated with 
* this format.
*/
-  public Map properties()
+  public MapString, Object properties()
   {
 return properties;
   }
Index: javax/sound/sampled/DataLine.java
===
RCS file: /cvsroot/classpath/classpath/javax/sound/sampled/DataLine.java,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 DataLine.java
--- javax/sound/sampled/DataLine.java   27 Nov 2005 21:00:37 -  1.1.2.1
+++ javax/sound/sampled/DataLine.java   2 Dec 2005 22:38:48 -
@@ -64,7 +64,7 @@
  * @param klass the class of the line
  * @param fmt the supported format
  */
-public Info(Class klass, AudioFormat fmt)
+public Info(Class? klass, AudioFormat fmt)
 {
   super(klass);
   this.minBufferSize = AudioSystem.NOT_SPECIFIED;
@@ -80,7 +80,7 @@
  * @param minSize the minimum buffer size
  * @param maxSize the maximum buffer size
  */
-public Info(Class klass, AudioFormat[] fmts, int minSize, int maxSize)
+public Info(Class? klass, AudioFormat[] fmts, int minSize, int maxSize)
 {
   super(klass);
   this.minBufferSize = minSize;
@@ -96,7 +96,7 @@
  * @param fmt the supported format
  * @param size the buffer size
  */
-public Info(Class klass, AudioFormat fmt, int size)
+public Info(Class? klass, AudioFormat fmt, int size)
 {
   super(klass);
   this.minBufferSize = size;
Index: javax/sound/sampled/Line.java
===
RCS file: /cvsroot/classpath/classpath/javax/sound/sampled/Line.java,v
retrieving revision 1.2.2.1
diff -u -r1.2.2.1 Line.java
--- javax/sound/sampled/Line.java   27 Nov 2005 21:00:37 -  1.2.2.1
+++ javax/sound/sampled/Line.java   2 Dec 2005 22:38:48 -
@@ -57,7 +57,7 @@
  * for instance TargetDataLine.class.
  * @param klass the class of the line
  */
-public Info(Class klass)
+public Info(Class? klass)
 {
   this.klass = klass;
 }
@@ -65,7 +65,7 @@
 /**
  * Return the line's class.
  */
-public Class getLineClass()
+public Class? getLineClass()
 {
   return klass;
 }
Index: javax/sound/sampled/Port.java
===
RCS file: /cvsroot/classpath/classpath/javax/sound/sampled/Port.java,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 Port.java
--- javax/sound/sampled/Port.java   27 Nov 2005 21:00:37 

Re: [Fwd: [cp-patches] [RFC, Concept proposal]: Easing target dependency]

2005-12-02 Thread Mark Wielaard
Hi Guilhem,

 On Wed, 2005-11-30 at 20:31 +0100, Guilhem Lavaux wrote:
  So I am proposing to keep the 
  basic skeleton of the target layer but put the real code not in macro 
  but in real C functions. That way we will be able to add autoconf macros 
  without bothering the java interface and if some persons still want to 
  use the TARGET layer it is possible by simply using the macro inside the 
  C functions.

Everything that replaces the macros with real functions has my vote. I
have had to debug my way through the macros and it was a pain.

  So here is a patch which shows what I want to do. An idealistic 
  situation would be to put all these functions which are using syscalls 
  into a libjavasyscalls which will be implemented by VM writers (and of 
  course we will propose a default implementation).

My preference would be for one cp_io.c, cp_net.c file per core package.

  This is not the definite patch. So don't complain about missing 
  ChangeLog and so on ... I ask whether people agree on using that concept.

This makes the source much more readable for me so I am happy. The only
thing I would like to see changed is to explicitly start all functions
with cp_ ,to make clear that these symbols are part of the GNU Classpath
library (we have the same naming scheme with the gtk+ awt peer native
implementation).

Thanks,

Mark


signature.asc
Description: This is a digitally signed message part
___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


Re: StatCVS reports for GNU Classpath and Mauve

2005-12-02 Thread Dalibor Topic
David Gilbert wrote:
 I updated the StatCVS reports for GNU Classpath and Mauve:
 
 http://www.object-refinery.com/classpath/statcvs/index.html
 
 http://www.object-refinery.com/classpath/mauve/statcvs/index.html
 
 2005 has been a good year!
 

thanks David, and thanks to all involved writing the code, reporting
bugs and fixing them, this is ... amazing prograss within a single year.

cheers,
dalibor topic


___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


Re: Strange failure [Fwd: Mail delivery failed: returning message to sender]

2005-12-02 Thread Meskauskas Audrius

Hello, Mark,

XOR maybe also would be good enough, but the hashcode method is called 
very seldom for this class. It is not involved into the main 
functionality and is only needed in some very specific cases like 
verifying the client identity. Hence the execution speed may not matter 
very much; I have chosed Adler as more reliable.


Mark Wielaard wrote:


Hi Audrius,

Just tried to sent this message, but it bounced. Trying from my other
email address now. Any idea why this is happening?

Cheers,

Mark
 





Subject:
Mail delivery failed: returning message to sender
From:
Mail Delivery System [EMAIL PROTECTED]
Date:
Fri, 02 Dec 2005 15:10:20 +0100
To:
[EMAIL PROTECTED]

To:
[EMAIL PROTECTED]


This message was created automatically by mail delivery software (Exim).

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

 [EMAIL PROTECTED]
   SMTP error from remote mailer after RCPT TO:[EMAIL PROTECTED]:
   host mxbw.bluewin.ch [195.186.18.144]: 550 RCPT TO:[EMAIL PROTECTED] 
Relaying not allowed

-- This is a copy of the message, including all the headers. --

Return-path: [EMAIL PROTECTED]
Received: from elsschot.wildebeest.org ([192.168.1.26])
by gnu.wildebeest.org with esmtp (Exim 3.36 #1 (Debian))
id 1EiBbn-0008L9-00; Fri, 02 Dec 2005 15:09:55 +0100
Subject: Re: [cp-patches] FYI: Fixes in org.omg.CORBA.Object._is_equivalent.
From: Mark Wielaard [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: _ PATCHES classpath-patches@gnu.org classpath-patches@gnu.org
In-Reply-To: [EMAIL PROTECTED]
References: [EMAIL PROTECTED]
Content-Type: multipart/signed; micalg=pgp-sha1; protocol=application/pgp-signature; 
boundary==-UM7aozFctzAkjF67KfYe
Date: Fri, 02 Dec 2005 15:11:18 +0100
Message-Id: [EMAIL PROTECTED]
Mime-Version: 1.0
X-Mailer: Evolution 2.2.3 



--=-UM7aozFctzAkjF67KfYe
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hi Audrius,

Going through some older patches.

On Sun, 2005-11-06 at 14:24 +0100, Meskauskas Audrius wrote:
 


+  /**
+   * Get the hashcode of this IOR.
+   */
+  public int hashCode()
+  {
+Adler32 adler =3D new Adler32();
+if (key !=3D null)
+  adler.update(key);
+if (Internet !=3D null  Internet.host !=3D null)
+  adler.update(Internet.host.getBytes());
+
+return (int) adler.getValue();
  }
   



You often use the result of an Adler32 checksum as hashCode() value.
Wouldn't it be more efficient to just simply xor the relevant fields? In
the followup patch you also correctly add the port number so in this
case it would be:

public int hashCode()
{
 int hash =3D 0;
 if (key !=3D null)
   for (int i =3D 0; i  key.length; i++)
 hash ^=3D key[i];
 if (Internet !=3D null  Internet.host !=3D null)
   {
 byte[] bs =3D Internet.host.getBytes();
 for (int i =3D 0; i  bs.length; i++)
   hash ^=3D bs[i];
 hash ^=3D Internet.port;
   }
 return hash;
}

Which seems more efficient. But maybe that isn't a good enough hash
function in this case and maybe using Adler32 isn't that much overhead.
Just wondering why you use it.

Cheers,

Mark

--=-UM7aozFctzAkjF67KfYe
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQBDkFYGxVhZCJWr9QwRArLPAKCMfJbPTKy4tXFDruQ2mLAedTnKoQCfXeqv
NbZH7UqgoLhglO1GCqo3+Fo=
=8d4R
-END PGP SIGNATURE-

--=-UM7aozFctzAkjF67KfYe--



 





___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


Re: StatCVS reports for GNU Classpath and Mauve

2005-12-02 Thread Casey Marshall

On Nov 30, 2005, at 2:59 PM, David Gilbert wrote:


I updated the StatCVS reports for GNU Classpath and Mauve:

http://www.object-refinery.com/classpath/statcvs/index.html

http://www.object-refinery.com/classpath/mauve/statcvs/index.html

2005 has been a good year!



I see I've fallen out of the top ten; must mean I need to write more  
code... :-)



___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


[commit-cp] classpath ChangeLog configure.ac

2005-12-02 Thread Anthony Green
CVSROOT:/cvsroot/classpath
Module name:classpath
Branch: 
Changes by: Anthony Green [EMAIL PROTECTED]   05/12/02 13:57:44

Modified files:
.  : ChangeLog configure.ac 

Log message:
2005-12-01  Anthony Green  [EMAIL PROTECTED]

PR bootstrap/25207
* configure.ac: Make sure we have an alsa library in addition to
the headers.  This extra test is required for systems with
multilibs.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5756tr2=1.5757r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/configure.ac.diff?tr1=1.119tr2=1.120r1=textr2=text





[commit-cp] classpath ./ChangeLog javax/swing/text/Internat...

2005-12-02 Thread Anthony Balkissoon
CVSROOT:/cvsroot/classpath
Module name:classpath
Branch: 
Changes by: Anthony Balkissoon [EMAIL PROTECTED]  05/12/02 20:16:05

Modified files:
.  : ChangeLog 
javax/swing/text: InternationalFormatter.java 

Log message:
2005-12-02  Anthony Balkissoon  [EMAIL PROTECTED]

* javax/swing/text/InternationalFormatter.java:
(valueToString): If argument is null return empty String.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5758tr2=1.5759r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/text/InternationalFormatter.java.diff?tr1=1.6tr2=1.7r1=textr2=text





[commit-cp] classpath javax/naming/InitialContext.java java... [generics-branch]

2005-12-02 Thread Tom Tromey
CVSROOT:/cvsroot/classpath
Module name:classpath
Branch: generics-branch
Changes by: Tom Tromey [EMAIL PROTECTED]  05/12/02 22:34:16

Modified files:
javax/naming   : InitialContext.java CompoundName.java 
 CompositeName.java 
.  : ChangeLog 
javax/naming/directory: InitialDirContext.java 
BasicAttributes.java BasicAttribute.java 

Log message:
* javax/naming/directory/InitialDirContext.java (search): Genericized.
* javax/naming/directory/BasicAttributes.java (getAll): Genericized.
(getIDs): Likewise.
* javax/naming/directory/BasicAttribute.java (getAll): Fixed return
type.
* javax/naming/InitialContext.java: Genericized.
(list): Likewise.
(listBindings): Likewise.
* javax/naming/CompoundName.java (getAll): Genericized.
* javax/naming/CompositeName.java (getAll): Genericized.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/naming/InitialContext.java.diff?only_with_tag=generics-branchtr1=1.7.2.2tr2=1.7.2.3r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/naming/CompoundName.java.diff?only_with_tag=generics-branchtr1=1.6.2.5tr2=1.6.2.6r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/naming/CompositeName.java.diff?only_with_tag=generics-branchtr1=1.2.2.3tr2=1.2.2.4r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?only_with_tag=generics-branchtr1=1.2386.2.182tr2=1.2386.2.183r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/naming/directory/InitialDirContext.java.diff?only_with_tag=generics-branchtr1=1.2.2.3tr2=1.2.2.4r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/naming/directory/BasicAttributes.java.diff?only_with_tag=generics-branchtr1=1.2.2.4tr2=1.2.2.5r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/naming/directory/BasicAttribute.java.diff?only_with_tag=generics-branchtr1=1.2.2.3tr2=1.2.2.4r1=textr2=text





[commit-cp] classpath javax/sound/sampled/AudioFileFormat.j... [generics-branch]

2005-12-02 Thread Tom Tromey
CVSROOT:/cvsroot/classpath
Module name:classpath
Branch: generics-branch
Changes by: Tom Tromey [EMAIL PROTECTED]  05/12/02 22:48:55

Modified files:
javax/sound/sampled: AudioFileFormat.java Line.java Port.java 
 AudioFormat.java DataLine.java 
.  : ChangeLog 

Log message:
* javax/sound/sampled/Port.java (Info): Genericized.
* javax/sound/sampled/Line.java (Info): Genericized.
(getLineClass): Likewise.
* javax/sound/sampled/DataLine.java (Info): Genericized.
* javax/sound/sampled/AudioFormat.java (AudioFormat): Genericized.
(properties): Likewise.
* javax/sound/sampled/AudioFileFormat.java (AudioFileFormat):
Genericized.
(properties): Likewise.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/sound/sampled/AudioFileFormat.java.diff?only_with_tag=generics-branchtr1=1.1.2.1tr2=1.1.2.2r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/sound/sampled/Line.java.diff?only_with_tag=generics-branchtr1=1.2.2.1tr2=1.2.2.2r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/sound/sampled/Port.java.diff?only_with_tag=generics-branchtr1=1.1.2.1tr2=1.1.2.2r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/sound/sampled/AudioFormat.java.diff?only_with_tag=generics-branchtr1=1.1.2.1tr2=1.1.2.2r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/sound/sampled/DataLine.java.diff?only_with_tag=generics-branchtr1=1.1.2.1tr2=1.1.2.2r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?only_with_tag=generics-branchtr1=1.2386.2.183tr2=1.2386.2.184r1=textr2=text