Back-port old patches to 4.3 branch

Andrew Haley aph@redhat.com
Mon Jan 12 17:35:00 GMT 2009


2009-01-12  Andrew Haley  <aph@redhat.com>

	PR libgcj/38396:
	* libgcj_bc.c: Sort lines.
	*(_Jv_LookupInterfaceMethod, _Jv_MonitorExit,
	_Jv_RegisterResource, _Jv_JNI_PopSystemFrame): Add.

	* sun/misc/natUnsafe.cc (spinlock contructor): Call sched_yield().
Index: libjava/libgcj_bc.c
===================================================================
--- libjava/libgcj_bc.c	(revision 142643)
+++ libjava/libgcj_bc.c	(working copy)
@@ -26,24 +26,27 @@

 /* Functions called from code generated by gcj.  */

-void __gcj_personality_v0 () {}
 void _Jv_AllocObject () {}
 void _Jv_AllocObjectNoFinalizer () {}
+void _Jv_CheckArrayStore () {}
+void _Jv_CheckCast () {}
 void _Jv_InitClass () {}
-void _Jv_ResolvePoolEntry () {}
-void _Jv_Throw () {}
+void _Jv_IsInstanceOf () {}
+void _Jv_LookupInterfaceMethod () {}
+void _Jv_LookupInterfaceMethodIdx () {}
 void _Jv_MonitorEnter () {}
-void _Jv_NewPrimArray () {}
-void _Jv_NewObjectArray () {}
+void _Jv_MonitorExit () {}
 void _Jv_NewMultiArray () {}
-void _Jv_ThrowBadArrayIndex () {}
-void _Jv_ThrowNullPointerException () {}
+void _Jv_NewObjectArray () {}
+void _Jv_NewPrimArray () {}
+void _Jv_RegisterResource () {}
+void _Jv_ResolvePoolEntry () {}
+void _Jv_Throw () {}
 void _Jv_ThrowAbstractMethodError () {}
+void _Jv_ThrowBadArrayIndex () {}
 void _Jv_ThrowNoSuchFieldError () {}
-void _Jv_CheckCast () {}
-void _Jv_IsInstanceOf () {}
-void _Jv_CheckArrayStore () {}
-void _Jv_LookupInterfaceMethodIdx () {}
+void _Jv_ThrowNullPointerException () {}
+void __gcj_personality_v0 () {}

 void _Jv_RegisterClasses ()
 {
@@ -63,16 +66,17 @@

 /* Functions used by -fjni.  */

-void _Jv_LookupJNIMethod () {}
 void _Jv_GetJNIEnvNewFrame () {}
+void _Jv_LookupJNIMethod () {}
 void _Jv_UnwrapJNIweakReference () {}
+void _Jv_JNI_PopSystemFrame () {}


 /* Checked divide (-fuse-divide-subroutine).  */

 void _Jv_divI () {}
-void _Jv_remI () {}
 void _Jv_divJ () {}
+void _Jv_remI () {}
 void _Jv_remJ () {}


@@ -80,19 +84,19 @@

 void _Jv_AllocBytes () {}
 void _Jv_AllocString () {}
-void _Jv_NewString () {}
-void _Jv_NewStringLatin1 () {}
+void _Jv_AttachCurrentThread () {}
+void _Jv_AttachCurrentThreadAsDaemon () {}
+void _Jv_CreateJavaVM () {}
+void _Jv_DetachCurrentThread () {}
+void _Jv_Free () {}
 void _Jv_GetStringChars () {}
 void _Jv_GetStringUTFLength () {}
 void _Jv_GetStringUTFRegion () {}
-void _Jv_NewStringUTF () {}
 void _Jv_Malloc () {}
+void _Jv_NewString () {}
+void _Jv_NewStringLatin1 () {}
+void _Jv_NewStringUTF () {}
 void _Jv_Realloc () {}
-void _Jv_Free () {}
-void _Jv_CreateJavaVM () {}
-void _Jv_AttachCurrentThread () {}
-void _Jv_AttachCurrentThreadAsDaemon () {}
-void _Jv_DetachCurrentThread () {}


 /* Classes for primitive types.  */
Index: libjava/sun/misc/natUnsafe.cc
===================================================================
--- libjava/sun/misc/natUnsafe.cc	(revision 142643)
+++ libjava/sun/misc/natUnsafe.cc	(working copy)
@@ -1,6 +1,6 @@
 // natUnsafe.cc - Implementation of sun.misc.Unsafe native methods.

-/* Copyright (C) 2006
+/* Copyright (C) 2006, 2007
    Free Software Foundation

    This file is part of libgcj.
@@ -32,7 +32,7 @@
 spinlock ()
   {
     while (! compare_and_swap (&lock, 0, 1))
-      ;
+      _Jv_ThreadYield ();
   }
   ~spinlock ()
   {



More information about the Java-patches mailing list