diff options
author | green <green@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-04-22 17:09:39 +0000 |
---|---|---|
committer | green <green@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-04-22 17:09:39 +0000 |
commit | a3eb58a5497a3220f9bfd7d036395173c8c6a1b7 (patch) | |
tree | 174f5778c3674a19984c0ecaef26fd9c1b42d71f /libjava/java | |
parent | 7706387be865225e6c20b1f05869bec733b24f9a (diff) | |
download | gcc-a3eb58a5497a3220f9bfd7d036395173c8c6a1b7.tar.gz |
+ 2000-04-22 Anthony Green <green@cygnus.com>
+
+ * include/jvm.h (__builtin_expect): Define as unused for now.
+ * java/lang/natObject.cc (_Jv_MonitorEnter): Add __builtin_expect.
+ (notify): Ditto.
+ (notifyAll): Ditto.
+ (wait): Ditto.
+ (_Jv_MonitorExit): Ditto.
+ * boehm.cc (_Jv_MarkObj): Ditto.
+ (_Jv_MarkObj): Ditto.
+ (_Jv_MarkArray): Ditto.
+ (_Jv_AllocBytes): Ditto.
+ * prims.cc (_Jv_AllocObject): Ditto.
+ (_Jv_NewObjectArray): Ditto.
+ (_Jv_NewPrimArray): Ditto.
+ (_Jv_Malloc): Ditto.
+ (_Jv_Realloc): Ditto.
+ (_Jv_MallocUnchecked): Ditto.
+ (_Jv_divI): Ditto.
+ (_Jv_remI): Ditto.
+ (_Jv_divJ): Ditto.
+ (_Jv_remJ): Ditto.
+
+ * include/Makefile.in: Rebuilt.
+ * include/Makefile.am (include_HEADERS): Add jvmpi.h.
+
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33339 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java')
-rw-r--r-- | libjava/java/lang/natObject.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libjava/java/lang/natObject.cc b/libjava/java/lang/natObject.cc index 99e7ac518ba..6aed8986d1d 100644 --- a/libjava/java/lang/natObject.cc +++ b/libjava/java/lang/natObject.cc @@ -172,10 +172,10 @@ java::lang::Object::sync_init (void) void java::lang::Object::notify (void) { - if (INIT_NEEDED (this)) + if (__builtin_expect (INIT_NEEDED (this), 0)) sync_init (); _Jv_SyncInfo *si = (_Jv_SyncInfo *) sync_info; - if (_Jv_CondNotify (&si->condition, &si->mutex)) + if (__builtin_expect (_Jv_CondNotify (&si->condition, &si->mutex), 0)) JvThrow (new IllegalMonitorStateException(JvNewStringLatin1 ("current thread not owner"))); } @@ -183,10 +183,10 @@ java::lang::Object::notify (void) void java::lang::Object::notifyAll (void) { - if (INIT_NEEDED (this)) + if (__builtin_expect (INIT_NEEDED (this), 0)) sync_init (); _Jv_SyncInfo *si = (_Jv_SyncInfo *) sync_info; - if (_Jv_CondNotifyAll (&si->condition, &si->mutex)) + if (__builtin_expect (_Jv_CondNotifyAll (&si->condition, &si->mutex), 0)) JvThrow (new IllegalMonitorStateException(JvNewStringLatin1 ("current thread not owner"))); } @@ -194,9 +194,9 @@ java::lang::Object::notifyAll (void) void java::lang::Object::wait (jlong timeout, jint nanos) { - if (INIT_NEEDED (this)) + if (__builtin_expect (INIT_NEEDED (this), 0)) sync_init (); - if (timeout < 0 || nanos < 0 || nanos > 999999) + if (__builtin_expect (timeout < 0 || nanos < 0 || nanos > 999999, 0)) JvThrow (new IllegalArgumentException); _Jv_SyncInfo *si = (_Jv_SyncInfo *) sync_info; switch (_Jv_CondWait (&si->condition, &si->mutex, timeout, nanos)) @@ -226,10 +226,10 @@ jint _Jv_MonitorEnter (jobject obj) { #ifndef HANDLE_SEGV - if (! obj) + if (__builtin_expect (! obj, 0)) JvThrow (new java::lang::NullPointerException); #endif - if (INIT_NEEDED (obj)) + if (__builtin_expect (INIT_NEEDED (obj), 0)) obj->sync_init (); _Jv_SyncInfo *si = (_Jv_SyncInfo *) obj->sync_info; return _Jv_MutexLock (&si->mutex); @@ -241,7 +241,7 @@ _Jv_MonitorExit (jobject obj) JvAssert (obj); JvAssert (! INIT_NEEDED (obj)); _Jv_SyncInfo *si = (_Jv_SyncInfo *) obj->sync_info; - if (_Jv_MutexUnlock (&si->mutex)) + if (__builtin_expect (_Jv_MutexUnlock (&si->mutex), 0)) JvThrow (new java::lang::IllegalMonitorStateException); return 0; } |