This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Import GNU Classpath (libgcj-import-20070727)


A new classpath merge from classpath CVS libgcj-import-20070727 can be
found in the branches/gcj/classpath-20070727-import-branch branch [1]

The changes for the non-classpath and not autogenerated files are
attached [B].

 - The current gstreamer work is experimental; I disabled the gstreamer
   files in scripts/makemake.tcl.

 - sun/misc/Unsafe.java: Did not merge this yet. See [A] for the diff.

 - gnu/awt/xlib: Just added new stubs, so that the class files can be
   generated.

The libjava testsuite passes without regressions on i686-linux, The
mauve testsuite results (without awt and swing tests) show three more
passes:

   TEST RESULTS:
  -110 of 1140 tests failed.  134747 total calls to harness.check() failed.
  +107 of 1140 tests failed.  122328 total calls to harness.check() failed.

Test results can be found at [2] and [3].

  Matthias


[1] http://gcc.gnu.org/viewcvs/branches/gcj/classpath-20070727-import-branch/
[2] http://people.ubuntu.com/~doko/tmp/log-branch-mauve.gz
[3] http://people.ubuntu.com/~doko/tmp/log-trunk-mauve.gz

[A]
Index: sun/misc/Unsafe.java
===================================================================
--- sun/misc/Unsafe.java        (revision 127016)
+++ sun/misc/Unsafe.java        (working copy)
@@ -305,7 +305,7 @@
    *
    * @param thread the thread to unblock.
    */
-  public native void unpark(Thread thread);
+  public native void unpark(Object thread);
 
   /**
    * Blocks the thread until a matching 


[B]

2007-07-29  Matthias Klose  <doko@ubuntu.com>

        Import GNU Classpath (libgcj-import-20070727).

        * Regenerate class and header files.
        * Regenerate auto* files.

        * include/jvm.h:
        * jni-libjvm.cc (Jv_JNI_InvokeFunctions): Rename type.
        * jni.cc (_Jv_JNIFunctions, _Jv_JNI_InvokeFunctions): Likewise.
        * jni.cc (_Jv_JNI_CallAnyMethodA, _Jv_JNI_CallAnyVoidMethodA,
        _Jv_JNI_CallMethodA, _Jv_JNI_CallVoidMethodA,
        _Jv_JNI_CallStaticMethodA, _Jv_JNI_CallStaticVoidMethodA,
        _Jv_JNI_NewObjectA, _Jv_JNI_SetPrimitiveArrayRegion): Constify
        jvalue parameter.
        * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Likewise.

        * java/lang/VMFloat.java (toString, parseFloat): New.

        * gnu/awt/xlib/XToolkit.java (setAlwaysOnTop, isModalityTypeSupported,
        isModalExclusionTypeSupported): New (stub only).
        * gnu/awt/xlib/XCanvasPeer.java (requestFocus): Likewise.
        * gnu/awt/xlib/XFramePeer.java (updateMinimumSize, updateIconImages,
        updateFocusableWindowState, setModalBlocked, getBoundsPrivate,
        setAlwaysOnTop): Likewise.
        * gnu/awt/xlib/XFontPeer.java (canDisplay): Update signature.

        * scripts/makemake.tcl: Ignore gnu/javax/sound/sampled/gstreamer,
        ignore javax.sound.sampled.spi.MixerProvider, ignore .in files.

        * HACKING: Mention --enable-gstreamer-peer, removal of generated files.

Index: include/jvm.h
===================================================================
--- include/jvm.h	(revision 127016)
+++ include/jvm.h	(working copy)
@@ -548,7 +548,7 @@
 				jboolean is_constructor,
 				jboolean is_virtual_call,
 				JArray<jclass> *parameter_types,
-				jvalue *args,
+				const jvalue *args,
 				jvalue *result,
 				jboolean is_jni_call = true,
 				jclass iface = NULL);
Index: jni-libjvm.cc
===================================================================
--- jni-libjvm.cc	(revision 127016)
+++ jni-libjvm.cc	(working copy)
@@ -17,7 +17,7 @@
 using namespace gcj;
 
 // Forward declarations.
-extern struct JNIInvokeInterface _Jv_JNI_InvokeFunctions;
+extern struct JNIInvokeInterface_ _Jv_JNI_InvokeFunctions;
 extern jint JNICALL _Jv_JNI_AttachCurrentThread (JavaVM *vm,
                                                  void **penv, void *args);
 extern JavaVM *_Jv_the_vm;
Index: jni.cc
===================================================================
--- jni.cc	(revision 127016)
+++ jni.cc	(working copy)
@@ -69,8 +69,8 @@
 };
 
 // Forward declarations.
-extern struct JNINativeInterface _Jv_JNIFunctions;
-extern struct JNIInvokeInterface _Jv_JNI_InvokeFunctions;
+extern struct JNINativeInterface_ _Jv_JNIFunctions;
+extern struct JNIInvokeInterface_ _Jv_JNI_InvokeFunctions;
 
 // Number of slots in the default frame.  The VM must allow at least
 // 16.
@@ -870,7 +870,7 @@
 template<typename T, invocation_type style>
 static T JNICALL
 _Jv_JNI_CallAnyMethodA (JNIEnv *env, jobject obj, jclass klass,
-			jmethodID id, jvalue *args)
+			jmethodID id, const jvalue *args)
 {
   obj = unwrap (obj);
   klass = unwrap (klass);
@@ -967,7 +967,7 @@
 template<invocation_type style>
 static void JNICALL
 _Jv_JNI_CallAnyVoidMethodA (JNIEnv *env, jobject obj, jclass klass,
-			    jmethodID id, jvalue *args)
+			    jmethodID id, const jvalue *args)
 {
   jclass decl_class = klass ? klass : obj->getClass ();
   JvAssert (decl_class != NULL);
@@ -1032,7 +1032,7 @@
 template<typename T>
 static T JNICALL
 _Jv_JNI_CallMethodA (JNIEnv *env, jobject obj, 
-		     jmethodID id, jvalue *args)
+		     jmethodID id, const jvalue *args)
 {
   return _Jv_JNI_CallAnyMethodA<T, normal> (env, obj, NULL, id, args);
 }
@@ -1056,7 +1056,7 @@
 
 static void JNICALL
 _Jv_JNI_CallVoidMethodA (JNIEnv *env, jobject obj, 
-			 jmethodID id, jvalue *args)
+			 jmethodID id, const jvalue *args)
 {
   _Jv_JNI_CallAnyVoidMethodA<normal> (env, obj, NULL, id, args);
 }
@@ -1100,7 +1100,7 @@
 template<typename T>
 static T JNICALL
 _Jv_JNI_CallStaticMethodA (JNIEnv *env, jclass klass, jmethodID id,
-			   jvalue *args)
+			   const jvalue *args)
 {
   JvAssert (((id->accflags) & java::lang::reflect::Modifier::STATIC));
   JvAssert (java::lang::Class::class$.isInstance (unwrap (klass)));
@@ -1128,7 +1128,7 @@
 
 static void JNICALL
 _Jv_JNI_CallStaticVoidMethodA (JNIEnv *env, jclass klass, 
-			       jmethodID id, jvalue *args)
+			       jmethodID id, const jvalue *args)
 {
   _Jv_JNI_CallAnyVoidMethodA<static_type> (env, NULL, klass, id, args);
 }
@@ -1171,7 +1171,7 @@
 
 static jobject JNICALL
 _Jv_JNI_NewObjectA (JNIEnv *env, jclass klass, jmethodID id,
-		    jvalue *args)
+		    const jvalue *args)
 {
   JvAssert (klass && ! klass->isArray ());
   JvAssert (! strcmp (id->name->chars(), "<init>")
@@ -1574,7 +1574,7 @@
 template<typename T, jclass K>
 static void JNICALL
 _Jv_JNI_SetPrimitiveArrayRegion (JNIEnv *env, JArray<T> *array,
-				 jsize start, jsize len, T *buf)
+				 jsize start, jsize len, const T *buf)
 {
   array = unwrap (array);
   if (! _Jv_JNI_check_types (env, array, K))
@@ -2588,7 +2588,7 @@
 
 #define RESERVED NULL
 
-struct JNINativeInterface _Jv_JNIFunctions =
+struct JNINativeInterface_ _Jv_JNIFunctions =
 {
   RESERVED,
   RESERVED,
@@ -2871,7 +2871,7 @@
   _Jv_JNI_GetDirectBufferCapacity	    // GetDirectBufferCapacity
 };
 
-struct JNIInvokeInterface _Jv_JNI_InvokeFunctions =
+struct JNIInvokeInterface_ _Jv_JNI_InvokeFunctions =
 {
   RESERVED,
   RESERVED,
Index: java/lang/reflect/natMethod.cc
===================================================================
--- java/lang/reflect/natMethod.cc	(revision 127016)
+++ java/lang/reflect/natMethod.cc	(working copy)
@@ -359,7 +359,7 @@
 		    jboolean is_constructor,
 		    jboolean is_virtual_call,
 		    JArray<jclass> *parameter_types,
-		    jvalue *args,
+		    const jvalue *args,
 		    jvalue *result,
 		    jboolean is_jni_call,
 		    jclass iface)
Index: java/lang/VMFloat.java
===================================================================
--- java/lang/VMFloat.java	(revision 127016)
+++ java/lang/VMFloat.java	(working copy)
@@ -96,4 +96,26 @@
    */
   static native float intBitsToFloat(int bits);
 
+  /**
+   * @param f the <code>float</code> to convert
+   * @return the <code>String</code> representing the <code>float</code>
+   */
+  static String toString(float f)
+  {
+    return VMDouble.toString(f, true);
+  }
+
+  /**
+   * @param str the <code>String</code> to convert
+   * @return the <code>float</code> value of <code>s</code>
+   * @throws NumberFormatException if <code>str</code> cannot be parsed as a
+   *         <code>float</code>
+   * @throws NullPointerException if <code>str</code> is null
+   */
+  static float parseFloat(String str)
+  {
+    // XXX Rounding parseDouble() causes some errors greater than 1 ulp from
+    // the infinitely precise decimal.
+    return (float) Double.parseDouble(str);
+  }
 } // class VMFloat
Index: gnu/awt/xlib/XToolkit.java
===================================================================
--- gnu/awt/xlib/XToolkit.java	(revision 127016)
+++ gnu/awt/xlib/XToolkit.java	(working copy)
@@ -480,5 +480,23 @@
         // InterruptedException intentionally ignored
       }
     }
-  }; 
+  }
+
+  public void setAlwaysOnTop(boolean b)
+  {
+    // TODO: Implement properly.
+  }
+
+  public boolean isModalExclusionTypeSupported
+    (Dialog.ModalExclusionType modalExclusionType)
+  {
+    // TODO: Implement properly.
+    return false;
+  }
+
+  public boolean isModalityTypeSupported(Dialog.ModalityType modalityType)
+  {
+    // TODO: Implement properly.
+    return false;
+  }
 }
Index: gnu/awt/xlib/XCanvasPeer.java
===================================================================
--- gnu/awt/xlib/XCanvasPeer.java	(revision 127016)
+++ gnu/awt/xlib/XCanvasPeer.java	(working copy)
@@ -44,6 +44,8 @@
 
 import gnu.awt.j2d.*;
 
+import sun.awt.CausedFocusEvent;
+
 public class XCanvasPeer implements CanvasPeer
 {
   static final Dimension MIN_SIZE = new Dimension(1, 1);
@@ -469,6 +471,13 @@
     return false;
   }
 
+  public boolean requestFocus (Component source, boolean b1, 
+                               boolean b2, long x,
+			       CausedFocusEvent.Cause cause)
+  {
+    return false;
+  }
+
   public boolean isObscured ()
   {
     return false;
Index: gnu/awt/xlib/XFramePeer.java
===================================================================
--- gnu/awt/xlib/XFramePeer.java	(revision 127016)
+++ gnu/awt/xlib/XFramePeer.java	(working copy)
@@ -196,8 +196,16 @@
    */
   public void setBoundsPrivate (int x, int y, int width, int height)
   {
+    // TODO: Implement this.
+    throw new UnsupportedOperationException("Not yet implemented.");
   }
 
+  public Rectangle getBoundsPrivate()
+  {
+    // TODO: Implement this.
+    throw new UnsupportedOperationException("Not yet implemented.");
+  }
+
   /**
    * @since 1.5
    */
@@ -212,4 +220,29 @@
   {
     return false;
   }
+
+  public void setAlwaysOnTop(boolean alwaysOnTop)
+  {
+    throw new UnsupportedOperationException("not implemented yet");	
+  }
+
+  public void updateFocusableWindowState()
+  {
+    throw new UnsupportedOperationException("not implemented yet");	
+  }
+
+  public void setModalBlocked(Dialog blocker, boolean blocked)
+  {
+    throw new UnsupportedOperationException("not implemented yet");	
+  }
+
+  public void updateMinimumSize()
+  {
+    throw new UnsupportedOperationException("not implemented yet");	
+  }
+
+  public void updateIconImages()
+  {
+    throw new UnsupportedOperationException("not implemented yet");	
+  }
 }
Index: gnu/awt/xlib/XFontPeer.java
===================================================================
--- gnu/awt/xlib/XFontPeer.java	(revision 127016)
+++ gnu/awt/xlib/XFontPeer.java	(working copy)
@@ -38,7 +38,7 @@
    * useful if you are sharing peers between Font objects. Otherwise it may
    * be ignored.
    */
-  public boolean canDisplay (Font font, char c)
+  public boolean canDisplay (Font font, int c)
   {
     throw new UnsupportedOperationException ();
   }
Index: scripts/makemake.tcl
===================================================================
--- scripts/makemake.tcl	(revision 127016)
+++ scripts/makemake.tcl	(working copy)
@@ -68,6 +68,7 @@
 set package_map(gnu/java/awt/peer/x) bc
 set package_map(gnu/java/util/prefs/gconf) bc
 set package_map(gnu/javax/sound/midi) bc
+set package_map(gnu/javax/sound/sampled/gstreamer) ignore
 set package_map(org/xml) bc
 set package_map(org/w3c) bc
 set package_map(org/relaxng) bc
@@ -131,6 +132,9 @@
 set properties_map(META-INF/services/org.relaxng.datatype.DatatypeLibraryFactory) _
 set properties_map(META-INF/services/org.w3c.dom.DOMImplementationSourceList) _
 set properties_map(META-INF/services/org.xml.sax.driver) _
+set properties_map(META-INF/services/javax.sound.sampled.spi.AudioFileReader.in) ignore
+set properties_map(META-INF/services/javax.sound.sampled.spi.MixerProvider) ignore
+set properties_map(META-INF/services/javax.sound.sampled.spi.MixerProvider.in) ignore
 
 # List of all properties files.
 set properties_files {}
Index: HACKING
===================================================================
--- HACKING	(revision 127016)
+++ HACKING	(working copy)
@@ -88,17 +88,27 @@
   cd ..
   scripts/makemake.tcl > sources.am
   automake
+- Remove the generated class and header files:
+  find classpath -name '*.class' xargs -r rm -f
+  find gnu java javax org sun -name '*.h' \
+    | xargs -r grep -Fl 'DO NOT EDIT THIS FILE - it is machine generated' \
+    | xargs -r rm -f
 - Build, fix, till everything works.
   Be sure to build all peers (--enable-java-awt=gtk,xlib,qt
-  --enable-gconf-peer)
+  --enable-gconf-peer --enable-gstreamer-peer)
   Be sure to update gnu/classpath/Configuration.java to reflect
     the new version
   Possibly update the gcj/javaprims.h file with scripts/classes.pl
   (See below, it can only be done after the first source->bytecode
    pass has finished.)
-  You will need to configure with --enable-maintainer-mode and you
+  You will need to configure with --enable-java-maintainer-mode and you
   will need to update the .class files and generated CNI header files in
   your working tree
+- Add/Remove newly generated files:
+  - svn status classpath | grep '^\!.*\.class$' | cut -c8- | xargs svn remove
+  - svn status classpath | grep '^\?' | cut -c8- | xargs svn add
+  - svn status gnu java javax org sun | grep '^\!.*\.h$' | cut -c8- | xargs svn remove
+  - svn status gnu java javax org sun | grep '^\?' | cut -c8- | xargs svn add
 
 Over time we plan to remove as many of the remaining divergences as
 possible.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]