natObject.cc (_Jv_MonitorEnter): Only perform null check when we have to.
2000-04-08 Anthony Green <green@redhat.com> * java/lang/natObject.cc (_Jv_MonitorEnter): Only perform null check when we have to. * gcj/array.h: Mark elements(JArray<T>& x) and elements(JArray<T>* x) as `inline'. * java/util/StringTokenizer.java: Minor optimization. Eliminates one method call. * java/util/Vector.java (VectorEnumeration.nextElement): Manually inline hasMoreElements. From-SVN: r33033
This commit is contained in:
parent
6308dae99a
commit
3bd835f73f
5 changed files with 21 additions and 4 deletions
|
@ -18,6 +18,7 @@ details. */
|
|||
#include <jvm.h>
|
||||
#include <java/lang/Object.h>
|
||||
#include <java-threads.h>
|
||||
#include <java-signal.h>
|
||||
#include <java/lang/CloneNotSupportedException.h>
|
||||
#include <java/lang/IllegalArgumentException.h>
|
||||
#include <java/lang/IllegalMonitorStateException.h>
|
||||
|
@ -224,8 +225,10 @@ _Jv_InitializeSyncMutex (void)
|
|||
jint
|
||||
_Jv_MonitorEnter (jobject obj)
|
||||
{
|
||||
#ifndef HANDLE_SEGV
|
||||
if (! obj)
|
||||
JvThrow (new java::lang::NullPointerException);
|
||||
#endif
|
||||
if (INIT_NEEDED (obj))
|
||||
obj->sync_init ();
|
||||
_Jv_SyncInfo *si = (_Jv_SyncInfo *) obj->sync_info;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue