aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/lang
AgeCommit message (Collapse)AuthorFilesLines
2003-10-21posix-threads.cc (_Jv_CondNotify,_Jv_CondNotifyAll): Rename ↵Jerry Quinn4-0/+65
_Jv_PthreadCheckMonitor to _Jv_MutexCheckMonitor. 2003-10-21 Jerry Quinn <jlquinn@optonline.net> * posix-threads.cc (_Jv_CondNotify,_Jv_CondNotifyAll): Rename _Jv_PthreadCheckMonitor to _Jv_MutexCheckMonitor. * include/no-threads.h (_Jv_MutexCheckMonitor): New. * include/posix-threads.h (_Jv_MutexCheckMonitor): Rename from _Jv_PthreadCheckMonitor. Simplify code. (_Jv_MutexUnlock): Use _Jv_MutexCheckMonitor. * include/win32-threads.h (_Jv_MutexCheckMonitor): New. * java/lang/Object.h (_Jv_ObjectCheckMonitor): Declare. * java/lang/Thread.java (holdsLock): New. * java/lang/natObject.cc (_Jv_ObjectCheckMonitor): New, with and without JV_HASH_SYNCHRONIZATION. * java/lang/natThread.cc (java::lang::Thread::holdsLock): New. From-SVN: r72741
2003-10-16StringBuffer.java (getChars): Fix array index checks.Ralph Loader1-5/+6
* java/lang/StringBuffer.java (getChars): Fix array index checks. (append, substring, insert): Likewise. * testsuite/libjava.lang/StringBuffer_overflow.java: New file. * testsuite/libjava.lang/StringBuffer_overflow.out: New file. From-SVN: r72579
2003-10-16natString.cc (getChars): Fix validation of array indexes.Ralph Loader1-10/+16
* java/lang/natString.cc (getChars): Fix validation of array indexes. (getBytes, regionMatches, startsWith, valueOf): Likewise. * testsuite/libjava.lang/String_overflow.java: New file. * testsuite/libjava.lang/String_overflow.out: New file. From-SVN: r72578
2003-10-13natClassLoader.cc (_Jv_InitNewClassFields): Removed.Tom Tromey1-37/+0
* java/lang/natClassLoader.cc (_Jv_InitNewClassFields): Removed. (defineClass): Updated. (_Jv_NewClass): Likewise. * prims.cc (_Jv_InitPrimClass): Don't call _Jv_InitNewClassFields. From-SVN: r72444
2003-10-09ClassLoader.java (setSigners): Implemented.Tom Tromey5-6/+22
* java/lang/ClassLoader.java (setSigners): Implemented. * boehm.cc (_Jv_MarkObj): Mark `signers' field. * java/lang/natClassLoader.cc (_Jv_InitNewClassFields): Initialize new fields. * java/lang/Class.java (getSigners): Now native. (setSigners): Declare. * java/lang/natClass.cc (getSigners): New method. (getSigners): Likewise. * java/lang/Class.h (Class::signers): New field. (Class::setSigners): New method. From-SVN: r72271
2003-10-08StrictMath.java (toDegrees): Multiply before dividing.Tom Tromey2-4/+10
* java/lang/StrictMath.java (toDegrees): Multiply before dividing. (toRadians): Likewise. 2003-10-08 C. Brian Jones <cbj@gnu.org> * java/lang/Math.java (toRadians): multiply before dividing to reduce decimal error (toDegrees): ditto From-SVN: r72238
2003-10-02VMClassLoader.java (loadClass): Now native.Tom Tromey2-8/+13
* java/lang/VMClassLoader.java (loadClass): Now native. * java/lang/natClassLoader.cc (loadClass): Implement. * prims.cc (_Jv_RunMain): Initialize ClassLoader. From-SVN: r72038
2003-10-01jcf-parse.c (java_parse_file): Write otable and atable.Andrew Haley2-49/+221
2003-10-01 Andrew Haley <aph@redhat.com> * jcf-parse.c (java_parse_file): Write otable and atable. * java-tree.h (atable_methods): New. (atable_decl): New. (atable_syms_decl): New. (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL, JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*. (symbol_*type): Rename method_symbol* to symbol*type. (emit_offset_symbol_table): Delete. (emit_symbol_table): New. (get_symbol_table_index): New. (atable_type): New. * expr.c (build_field_ref): Handle flag_indirect_dispatch. (build_known_method_ref): Likewise. (get_symbol_table_index): Rename from get_offset_table_index. Parameterize to allow re-use by differing types of symbol table. (build_invokevirtual): Pass table to get_offset_table_index. * decl.c (java_init_decl_processing): Push types and decls for atable and atable_syyms. * class.c (build_static_field_ref): Handle flag_indirect_dispatch. (make_class_data): Add new fields atable and atable_syms. (emit_symbol_table): Rename from emit_offset_symbol_table. Parameterize to allow re-use by different types of symbol table. (build_symbol_entry): Renamed from build_method_symbols_entry. 2003-10-01 Andrew Haley <aph@redhat.com> * java/lang/natClass.cc (initializeClass): Check for otable and atable. (_Jv_LinkOffsetTable): Check for existence of atable. Rewrite loops using for(). Search superinterfaces. Check for fields as well as methods. Initialize atable as well as otable: check for static methods as well as virtual methods. * java/lang/Class.h (struct _Jv_AddressTable): New. (atable): New. (atable_syms): New. * include/jvm.h (_Jv_equalUtf8Consts): constify. * prims.cc (_Jv_equalUtf8Consts): constify. From-SVN: r71979
2003-09-29re PR libgcj/10596 (Reference and String.intern don't work together)Tom Tromey2-26/+95
PR libgcj/10596: * include/jvm.h (_Jv_FinalizeString, _Jv_RegisterStringFinalizer): Declare. * java/lang/natString.cc (_Jv_FinalizeString): Renamed from unintern. (intern): Updated. (_Jv_NewStringUtf8Const): Likewise. * java/lang/ref/natReference.cc (finalize_referred_to_object): Add special case when finalizing a String. (in_hash): New function. (_Jv_RegisterStringFinalizer): Likewise. (maybe_add_finalize): Likewise. From-SVN: r71915
2003-09-252003-09-25 Michael Koch <konqueror@gmx.de>Michael Koch1-12/+3
* java/lang/reflect/Proxy.java (getProxyClass): Remove workaround for gcj 3.0.x. From-SVN: r71796
2003-09-25Proxy.java (generate): Uncomment protection domain code.Tom Tromey7-687/+820
* java/lang/reflect/Proxy.java (generate): Uncomment protection domain code. * java/lang/natClassLoader.cc (defineClass): Added `loader' argument. (linkClass0): Now in VMClassLoader. (markClassErrorState0): Likewise. (getSystemClassLoaderInternal): New method. * java/lang/natClass.cc (initializeClass): Use VMClassLoader::resolveClass. * java/lang/ClassLoader.java: New version, from Classpath. * java/lang/Class.java (getProtectionDomain): protectionDomainPermission and unknownProtectionDomain now in VMClassLoader. * java/lang/Class.h: VMClassLoader now a friend class. * gnu/gcj/runtime/VMClassLoader.java (instance): Now package-private. * gcj/javaprims.h: Regenerated class list. * resolve.cc (_Jv_PrepareClass): Use VMClassLoader::resolveClass. * java/lang/VMClassLoader.java: New version from Classpath; modified for libgcj use. From-SVN: r71765
2003-09-24StringBuffer.java (substring): Don't set `shared' on small Strings, even if ↵Bryce McKinlay1-4/+5
buffer is already shared. * java/lang/StringBuffer.java (substring): Don't set `shared' on small Strings, even if buffer is already shared. From-SVN: r71726
2003-09-24* java/lang/System.java: Add GCJ LOCAL note about encoding aliases.Nathanael Nerode1-0/+5
From-SVN: r71710
2003-09-23Float.java, [...]: Add GCJ LOCAL markers.Nathanael Nerode2-0/+12
* java/lang/Float.java, java/lang/Double.java: Add GCJ LOCAL markers. From-SVN: r71699
2003-09-22re PR libgcj/12350 (StringBuffer.substring handles shared flag incorrected.)Ralph Loader1-2/+3
2003-09-21 Ralph Loader <suckfish@ihug.co.nz> PR java/12350: * java/lang/StringBuffer.java (substring): Fix handling of shared flag. 2003-09-21 Ralph Loader <suckfish@ihug.co.nz> PR java/12350 * libjava.lang/PR12350.java: New file. * libjava.lang/PR12350.out: New file. From-SVN: r71651
2003-09-20Reference.java (clear): Set referent to null and synchronize.David Daney1-1/+6
2003-09-19 David Daney <ddaney@avtrex.com> * java/lang/ref/Reference.java (clear): Set referent to null and synchronize. From-SVN: r71597
2003-09-19win32-threads.cc: (ensure_interrupt_event_initialized) New function for lazy ↵Mohan Embar1-2/+27
initialization of an... * win32-threads.cc: (ensure_interrupt_event_initialized) New function for lazy initialization of an auto-reset event. (_Jv_CondWait) Added thread interrupt support. (_Jv_ThreadInitData) Added initialization of interrupt support members. (_Jv_ThreadDestroyData) Added cleanup of interrupt support members. (_Jv_ThreadStart) Removed unused code. (_Jv_Win32GetInterruptEvent) New method for returning interrupt event to an external caller. (_Jv_ThreadInterrupt) Implemented. * include/win32-threads.h: (_Jv_Thread_t) Added a Win32 auto-reset event for interrupt support as well as a mutex which regulates access to this. (_Jv_Win32GetInterruptEvent) Declared new method for returning interrupt event to an external caller. * java/lang/natWin32Process.cc: (cleanup) Close handle to spawned process. (waitFor) Added interrupt support. From-SVN: r71562
2003-08-29win32.cc: fixed tab...Mohan Embar1-40/+14
* win32.cc: fixed tab, indentation and whitespace inconsistencies removed jvm.h include added includes java/lang/UnsupportedOperationException.h, java/io/IOException.h, java/net/SocketException.h (WSAEventWrapper): class implementation (_Jv_WinStrError): implemented both overloads (_Jv_ThrowIOException): implemented both overloads (_Jv_ThrowSocketException): implemented both overloads (_Jv_select): implemented * include/win32.h: fixed tab, indentation and whitespace inconsistencies wrapped <windows.h> include with #define WIN32_LEAN_AND_MEAN added jvm.h include (WSAEventWrapper): added class declaration (_Jv_WinStrError): added both overload declarations (_Jv_ThrowIOException): added both overload declarations (_Jv_ThrowSocketException): added both overload declarations removed ENOTCONN, ECONNRESET and ENOPROTOOPT defines (_Jv_select): added declaration (_Jv_socket): removed (_Jv_connect): removed (_Jv_close): removed (_Jv_bind): removed (_Jv_accept): removed (_Jv_listen): removed (_Jv_write): removed (_Jv_read): removed * java/io/natFileDescriptorWin32.cc: fixed tab, indentation and whitespace inconsistencies replaced <windows.h> #include with <platform.h> removed jvm.h include (testCanUseGetHandleInfo): new function which tests whether Win32 GetHandleInformation() call can be used with console buffer handles (only supported on >=WinNT 5.0) (winerr): removed (superseded by _Jv_WinStrError in include/win32.h) (valid): rewrote implementation using GetHandleInformation() (sync): changed exception throwing to use error string and exception helper methods declared in include/win32.h (open): likewise (write): likewise (setLength): likewise (close): likewise (seek): likewise (getFilePointer): likewise (read): likewise * java/io/natFileWin32.cc: fixed tab, indentation and whitespace inconsistencies replaced <windows.h> #include with <platform.h> removed jvm.h include (_access): use JV_TEMP_UTF_STRING (_stat): likewise (performMkDir): use JV_TEMP_UTF_STRING (performRenameTo): likewise (performDelete): likewise (performCreate): likewise (performSetReadOnly): likewise (performSetLastModified): likewise * java/lang/natWin32Process.cc: fixed tab, indentation and whitespace inconsistencies replaced <windows.h> #include with <platform.h> removed includes gcj/cni.h, jvm.h (new_string): removed (startProcess): use JV_TEMP_UTF_STRING, changed exception throwing to use error string and exception helper methods declared in include/win32.h * java/net/natInetAddressWin32.cc: fixed tab, indentation and whitespace inconsistencies replaced <windows.h> #include with <platform.h> removed jvm.h include removed DISABLE_JAVA_NET conditional code removed POSIX conditional code not relevant to Win32 (aton): use JV_TEMP_UTF_STRING removed POSIX conditional code not relevant to Win32 (lookup): likewise (getLocalHostName): likewise * java/net/natNetworkInterfaceWin32.cc: fixed tab, indentation and whitespace inconsistencies removed unnecessary windows.h, winsock.h and gcj/cni.h includes removed DISABLE_JAVA_NET conditional code removed POSIX conditional code not relevant to Win32 (winsock2GetRealNetworkInterfaces): new function to compute network interfaces via Winsock2 API (determineGetRealNetworkInterfacesFN): new function for returning a function pointer to the function used to compute network interfaces. (getRealNetworkInterfaces): implemented * java/net/natPlainDatagramSocketImplWin32.cc: fixed tab, indentation and whitespace inconsistencies removed gcj/cni.h include removed DISABLE_JAVA_NET conditional code removed POSIX conditional code not relevant to Win32 changed net POSIXisms to Win32isms replaced _Jv socket-related calls with their real Win32 equivalents changed exception throwing to use error string and exception helper methods declared in include/win32.h (peekData): implemented timeout support (receive): likewise * java/net/natPlainSocketImplWin32.cc: fixed tab, indentation and whitespace inconsistencies removed gcj/cni.h and gcj/javaprims.h includes removed DISABLE_JAVA_NET conditional code removed POSIX conditional code not relevant to Win32 changed net POSIXisms to Win32isms replaced _Jv socket-related calls with their real Win32 equivalents changed exception throwing to use error string and exception helper methods declared in include/win32.h (throwConnectException): helper function for connect() (connect): implemented timeout support (accept): likewise (doRead): new helper function common to both read() method overloads, includes timeout support (read): implemented both overloads in terms of doRead() (available): implemented using ioctlsocket() From-SVN: r70904
2003-08-28Makefile.in: Rebuilt.Tom Tromey1-0/+2
* Makefile.in: Rebuilt. * Makefile.am (ordinary_java_source_files): Added new files. * java/lang/Class.h (_Jv_sharedlib_register_hook): Declare as friend. * java/net/URLClassLoader.java (findClass): Don't use findURLResource. Use loader's getClass method. (URLLoader.getClass): New method. (addURL): Handle `gcjlib' URLs. (SoURLLoader): New class. (SoResource): Likewise. * gnu/gcj/protocol/gcjlib/Connection.java: New file. * gnu/gcj/protocol/gcjlib/Handler.java: New file. * include/jvm.h (struct _Jv_core_chain): Moved from natCore.cc. (_Jv_RegisterCoreHook): Declare. (_Jv_FindCore): Declare. * gnu/gcj/runtime/SharedLibHelper.java: New file. * gnu/gcj/runtime/natSharedLibLoader.cc (CoreHookFunc): New typedef. (core_hook): New function. (struct SharedLibDummy) [saved_core]: New field. (init): Set _Jv_RegisterCoreHook. Throw exception on failure. (register_hook): Set protection domain and class loader on new class. (finalize): Free core chain. * gnu/gcj/Core.java (Core): New constructor. * gnu/gcj/runtime/SharedLibLoader.java: Rewrote to use SharedLibHelper. * gnu/gcj/natCore.cc (_Jv_RegisterResource): Indentation fixlet. (_Jv_create_core): New function. (create): Use it. (default_register_resource): New function. (_Jv_RegisterCoreHook): New global. (_Jv_RegisterResource): Use it. (core_chain_struct): Removed. (_Jv_FindCore): New function. (_Jv_FreeCoreChain): New function. From-SVN: r70892
2003-08-26StrictMath.java: Typo fix.Tom Tromey5-13/+18
* java/lang/StrictMath.java: Typo fix. * java/lang/Math.java: Typo fix. 2003-08-26 Stephen Crawley <crawley@dstc.edu.au> * java/lang/ThreadGroup.java (removeThread): null the 'group' field of the removed Thread. 2003-08-26 Mark Wielaard <mark@klomp.org> Reported by David Holmes <dholmes@dltech.com.au>. * java/lang/InheritableThreadLocal.java (threadMap): Wrap inside Collections.synchronizedMap. * java/lang/ThreadLocal.java (valueMap): Likewise. From-SVN: r70828
2003-08-26Reference.java (get): Indentation fix.Tom Tromey1-8/+8
* java/lang/ref/Reference.java (get): Indentation fix. (clear): Comment fix. (enqueue): Likewise. (lock): Likewise. (referent): Likewise. From-SVN: r70814
2003-08-26re PR libgcj/12058 (java.lang.reflect.Array.set(Object, int, Object) throws ↵Tom Tromey1-1/+1
java.lang.IllegalArgumentException) PR java/12058: * java/lang/reflect/natArray.cc (set): Allow null as argument. From-SVN: r70813
2003-08-26Proxy.java (ProxyData): `pack' now a String.Tom Tromey1-6/+21
* java/lang/reflect/Proxy.java (ProxyData): `pack' now a String. (ProxyData.getPackage): New method. (ProxyData.getProxyData): Use package name, not Package. (ClassFactory.ClassFactory): Updated. From-SVN: r70809
2003-08-21re PR libgcj/12013 (Calling Reference.clear() can cause runtime to crash.)David Daney2-9/+16
2003-08-21 David Daney <ddaney@avtrex.com> Fix for PR libgcj/12013: * java/lang/ref/natReference.cc (finalize_referred_to_object): Check `cleared' field. * java/lang/ref/Reference.java (copy): Updated comments. (cleared): New field. (clear): Rewrote. From-SVN: r70668
2003-08-20natReference.cc (finalize_referred_to_object): Set `list->reference' to ↵Tom Tromey1-3/+14
DELETED_REFERENCE when removing dead object. * java/lang/ref/natReference.cc (finalize_referred_to_object): Set `list->reference' to DELETED_REFERENCE when removing dead object. (find_slot): Added an assert. (DELETED_REFERENCE): New define. (add_to_hash): Check for DELETED_REFERENCE. (remove_from_hash): Just return if found slot isn't ours. From-SVN: r70599
2003-08-18re PR libgcj/11951 (natMethod.cc (_Jv_CallAnyMethodA) should clear ↵Tom Tromey1-29/+50
ffi_result before ffi_call) PR libgcj/11951: * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Returns void. Throw VirtualMachineError if ffi fails. Initialize return value. Added is_jni_call argument; only wrap exception if not a JNI call. Use descriptive message if operation not supported. (_Jv_GetTypesFromSignature): Use declaring class' loader to find array class. * include/jvm.h (_Jv_CallAnyMethodA): Updated declaration. * jni.cc (_Jv_JNI_CallAnyMethodV): Updated for new form of _Jv_CallAnyMethodA. (_Jv_JNI_CallAnyMethodA): Likewise. (_Jv_JNI_CallAnyVoidMethodV): Likewise. (_Jv_JNI_CallAnyVoidMethodA): Likewise. From-SVN: r70544
2003-08-08[multiple changes]Andrew Haley1-1/+4
2003-08-08 Andrew Haley <aph@redhat.com> * Makefile.am (AM_CXXFLAGS): Define BOOT_CLASS_PATH. * Makefile.in: Rebuild. * java/lang/natRuntime.cc (insertSystemProperties): Add "sun.boot.class.path". 2003-08-07 Andrew Haley <aph@redhat.com> * java/io/PrintStream.java: Don't crash on a null string. From-SVN: r70250
2003-08-07Thread.java (Thread): Check for null "name" from start of private constructor...Bryce McKinlay1-9/+4
* java/lang/Thread.java (Thread): Check for null "name" from start of private constructor, not after calling the private constructor. From-SVN: r70216
2003-08-05re PR libgcj/11779 (Field reflection incorrectly throws IllegalAccessException)Tom Tromey1-5/+6
Fix for PR libgcj/11779: * java/lang/reflect/natField.cc (getAddr): Skip frames in Field class. From-SVN: r70185
2003-08-05Method.java: Updated status comment.Tom Tromey2-115/+349
* java/lang/reflect/Method.java: Updated status comment. Imported javadoc from Classpath and re-ordered methods. * java/lang/reflect/Constructor.java: Reindented. Updated status comment. Imported javadoc from Classpath and re-ordered methods. From-SVN: r70184
2003-07-28natString.cc (init(gnu.gcj.runtime.StringBuffer)): New method.Tom Tromey2-1/+9
* java/lang/natString.cc (init(gnu.gcj.runtime.StringBuffer)): New method. Include gnu/gcj/runtime/StringBuffer.h. * java/lang/String.java (init(gnu.gcj.runtime.StringBuffer)): New native method. (String(gnu.gcj.runtime.StringBuffer)): Use it. From-SVN: r69890
2003-07-27Win32Process.java (ConcreteProcess): Surround a command line element with ↵Ranjit Mathew2-3/+9
quotes if it contains an embedded space or tab. 2003-07-26 Ranjit Mathew <rmathew@hotmail.com> * java/lang/Win32Process.java (ConcreteProcess): Surround a command line element with quotes if it contains an embedded space or tab. * java/lang/natWin32Process.cc (startProcess): Do not surround command line elements with quotes here. From-SVN: r69844
2003-07-25+ * java/lang/natRuntime.cc (_load): Add library name toMark Wielaard1-1/+2
+ UnsatisfiedLinkError when thrown. From-SVN: r69786
2003-07-23* java/lang/natSystem.cc (arraycopy): Check for overflow.Tom Tromey1-2/+4
From-SVN: r69706
2003-07-21Runtime.java: Comment fix.Tom Tromey10-126/+204
* java/lang/Runtime.java: Comment fix. * java/lang/ClassLoader.java (isAncestorOf): New method. (getParent): Uncommented security check. Use isAncestorOf. * include/jvm.h (_Jv_CheckAccess): Declare. * java/lang/reflect/natConstructor.cc (newInstance): Perform access check. Include IllegalAccessException.h, ArrayIndexOutOfBoundsException.h. * java/lang/reflect/natArray.cc (newInstance): Pass caller's class loader to _Jv_GetArrayClass. Include ArrayIndexOutOfBoundsException.h. * java/lang/reflect/Field.java: Update comment to reflect status. (equals): Fixed indentation. * java/lang/Class.h (Class): Declare memberAccessCheck, not checkMemberAccess. Make _Jv_CheckAccess a friend. * java/lang/Class.java (memberAccessCheck): New method from Classpath. (checkMemberAccess): Removed. (getDeclaredMethod): Use memberAccessCheck. (getField): Likewise. (getMethod): Likewise. * resolve.cc (_Jv_ResolvePoolEntry): Use _Jv_CheckAccess. (_Jv_SearchMethodInClass): Likewise. * prims.cc (_Jv_CheckAccess): New function. * jni.cc (_Jv_JNI_FindClass): Use getClassLoaderInternal. (_Jv_JNI_GetAnyFieldID): Likewise. * java/lang/natClass.cc (forName): Use getClassLoaderInternal. (getClassLoader): Added security check. (getConstructor): Call memberAccessCheck. (getDeclaredClasses): Likewise. (getDeclaredField): Likewise. (getDeclaredFields): Likewise. (_getConstructors): Likewise. (getDeclaredConstructor): Likewise. (getDeclaredMethods): Likewise. (getFields): Likewise. (getMethods): Likewise. (newInstance): Likewise. (_Jv_MakeVTable): Put method name in exception. * java/lang/reflect/natMethod.cc (getType): Use getClassLoaderInternal. (_Jv_GetTypesFromSignature): Likewise. (invoke): Perform access check. (_Jv_CallAnyMethodA): Removed old FIXME comments. Include ArrayIndexOutOfBoundsException.h. * java/lang/reflect/natField.cc (getType): Use getClassLoaderInternal. (_Jv_CheckFieldAccessibility): Removed. (getAddr): Use _Jv_CheckAccess; find caller. Include ArrayIndexOutOfBoundsException.h. From-SVN: r69621
2003-07-08cni.h: CNI now expands to Compiled Native Interface.Mark Wielaard2-2/+2
* gcj/cni.h: CNI now expands to Compiled Native Interface. * java/lang/e_pow.c: CYGNUS LOCAL should be GCJ LOCAL. * java/lang/fdlibm.h: Likewise. From-SVN: r69104
2003-06-18natVMSecurityManager.cc (getClassContext): Use maxlen instead of len for ↵Matt Kraai1-2/+2
loop bound. * java/lang/natVMSecurityManager.cc (getClassContext): Use maxlen instead of len for loop bound. From-SVN: r68153
2003-06-12jni.cc (_Jv_JNI_check_types): New.Andrew Haley1-4/+4
2003-06-11 Andrew Haley <aph@redhat.com> * jni.cc (_Jv_JNI_check_types): New. (_Jv_JNI_SetPrimgitiveArrayRegion): Check array type. (_Jv_JNI_GetPrimitiveArrayRegion): Ditto. (_Jv_JNI_GetPrimitiveArrayElements): Ditto. (_Jv_JNI_ReleasePrimitiveArrayElements): Ditto. * java/lang/natVMSecurityManager.cc (getClassContext): Fix infinite loop. From-SVN: r67835
2003-06-12ClassLoader.java (loadClass): Not deprecated.Tom Tromey1-1/+0
* java/lang/ClassLoader.java (loadClass): Not deprecated. * java/io/PrintStream.java: Not deprecated. From-SVN: r67811
2003-06-07re PR libgcj/8738 (java.io.CharArrayWriter's write methods erroneously throw ↵Mark Wielaard1-6/+6
IOExceptions) 2002-06-06 James Clark <jjc@jclark.com> Fix for PR libgcj/8738: * gnu/gcj/convert/UnicodeToBytes.java (havePendingBytes): New method. * gnu/gcj/convert/Output_SJIS.java (havePendingBytes): Likewise. * gnu/gcj/convert/Output_EUCJIS.java (havePendingBytes): Likewise. * gnu/gcj/convert/Output_UTF8.java (havePendingBytes): Likewise. (write): Always decrease avail when count is increased. * java/lang/natString.cc (getBytes): Check converter havePendingBytes() and whether output buffer is full before increasing size. 2002-06-06 Mark Wielaard <mark@klomp dot org> * java/io/PrintStream.java (writeChars(char[],int, int)): Check converter.havePendingBytes(). (writeChars(String,int,int)): Likewise. * java/io/OutputStreamWriter.java (writeChars(char[], int, int)): Check converter.havePendingBytes() and flush buffer when stalled. From-SVN: r67595
2003-06-06w_exp.c (o_threshold, [...]): Define only if _IEEE_LIBM is undefined.Matt Kraai1-0/+4
* java/lang/w_exp.c (o_threshold, u_threshold): Define only if _IEEE_LIBM is undefined. From-SVN: r67526
2003-05-27System.java: Explicitely import needed classes.Michael Koch1-1/+8
2003-05-27 Michael Koch <konqueror@gmx.de> * java/lang/System.java: Explicitely import needed classes. From-SVN: r67182
2003-05-01re PR libgcj/10582 (array assignment fails in some situations)Tom Tromey1-16/+24
PR libgcj/10582: * verify.cc (_Jv_BytecodeVerifier::is_assignable_from_slow): Removed. (type::compatible): Use _Jv_IsAssignableFrom. * java/lang/natClass.cc (iindex_mutex_initialized): Now static. (_Jv_IsAssignableFrom): Work even when source or target class is not prepared. From-SVN: r66348
2003-04-28natString.cc (_Jv_AllocString): Initialize cachedHashCode.Tom Tromey1-0/+2
* java/lang/natString.cc (_Jv_AllocString): Initialize cachedHashCode. (init): Likewise. (_Jv_NewStringUtf8Const): Likewise. From-SVN: r66180
2003-04-25jvm.h: (_Jv_GetNbArgs) added (_Jv_GetSafeArg) added (_Jv_SetArgs) addedMohan Embar1-5/+1
2003-03-29 Mohan Embar <gnustuff@thisiscool.com> * include/jvm.h: (_Jv_GetNbArgs) added (_Jv_GetSafeArg) added (_Jv_SetArgs) added * prims.cc: (_Jv_GetNbArgs) implemented (_Jv_GetSafeArg) implemented (_Jv_SetArgs) implemented (_Jv_RunMain) use _Jv_SetArgs() instead of explicitly setting _Jv_argc and _Jv_argv * posix.cc: (_Jv_ThisExecutable) use _Jv_GetSafeArg() instead of _Jv_argv * java/lang/natRuntime.cc: (insertSystemProperties) use _Jv_GetSafeArg() instead of _Jv_argv From-SVN: r66067
2003-04-16ieeefp.h: Handle ARM platforms that have pure-endian floating point.Richard Earnshaw1-2/+12
* java/lang/ieeefp.h: Handle ARM platforms that have pure-endian floating point. From-SVN: r65693
2003-03-31String.java (data, [...]): Documented.Tom Tromey1-9/+30
* java/lang/String.java (data, boffset, count): Documented. (String(byte[],String)): Reformatted. (String(byte[])): Likewise. (lastIndexOf(int)): Likewise. (lastIndexOf(String)): Likewise. (substring(int)): Renamed argument to match Classpath. (String(StringBuffer)): Don't share buffer if it is nearly empty. From-SVN: r65070
2003-03-30String.java: Miscellaneous minor formatting changes to match Classpath more ↵Tom Tromey1-72/+72
closely. * java/lang/String.java: Miscellaneous minor formatting changes to match Classpath more closely. From-SVN: r65055
2003-03-30natString.cc (hashCode): Use cachedHashCode.Eric Blake2-15/+167
2003-03-29 Eric Blake <ebb9@email.byu.edu> Tom Tromey <tromey@redhat.com> * java/lang/natString.cc (hashCode): Use cachedHashCode. (init()): Removed. (charAt): Put index in exception. (contentEquals): New method. Include StringBuffer.h. * java/lang/String.java (cachedHashCode): New field. (String()): Follow classpath implementation. (init()): Removed. (contentEquals): Declare. (subSequence): Don't declare IndexOutIfBoundsException in throws clause. (matches, replaceFirst, replaceAll, split): New methods from Classpath. Co-Authored-By: Tom Tromey <tromey@redhat.com> From-SVN: r65037
2003-03-30String.java: Reordered to follow Classpath; merged in javadoc.Tom Tromey1-128/+809
* java/lang/String.java: Reordered to follow Classpath; merged in javadoc. From-SVN: r65036