aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/lang
AgeCommit message (Collapse)AuthorFilesLines
2003-12-03Class.h (hack_signers): Renamed signers to hack_signers.Michael Koch2-3/+3
2003-12-03 Michael Koch <konqueror@gmx.de> * java/lang/Class.h (hack_signers): Renamed signers to hack_signers. * java/lang/natClass.cc (getSigners): Likewise. (setSigners): Likewise. From-SVN: r74247
2003-12-02configure.in: Added new MinGW-specific configure flag --with-win32-nlsapi.Mohan Embar1-21/+27
* configure.in: Added new MinGW-specific configure flag --with-win32-nlsapi. Added new AC_DEFINE MINGW_LIBGCJ_UNICODE. Add -lunicows to MinGW SYSTEMSPEC if --with-win32-nlsapi is set to unicows. * configure: Rebuilt. * include/config.h.in: Rebuilt. * win32.cc (_Jv_Win32NewString): Implemented. (nativeToUnicode): New helper function defined only for non-UNICODE builds. (unicodeToNative): Likewise. (_Jv_Win32TempString): Implemented. (lots): Refactored using tchar.h macros. (WSAEventWrapper): Use _Jv_Win32NewString. (_Jv_platform_initialize): Use GetModuleFileNameA instead of GetModuleFileName. (_Jv_platform_initProperties): Use _Jv_Win32NewString. Use temporary stack buffer instead of a heap buffer. * include/win32.h Added defines for UNICODE and _UNICODE if MINGW_LIBGCJ_UNICODE is defined; added tchar.h include. (_Jv_Win32TempString): Declared new helper class. (JV_TEMP_STRING_WIN32): New helper macro. (_Jv_Win32NewString): Declared new helper method. * java/io/natFileDescriptorWin32.cc (open): Use JV_TEMP_STRING_WIN32 instead of JV_TEMP_UTF_STRING. (write): Reformatted slightly. * java/io/natFileWin32.cc (lots): Use tchar.h macros; use JV_TEMP_STRING_WIN32 instead of JV_TEMP_UTF_STRING. (getCanonicalPath): Use _Jv_Win32NewString instead of JvNewStringUTF. (performList): Likewise. * java/lang/natWin32Process.cc (ChildProcessPipe): Use tchar.h macros. (startProcess): Use tchar.h macros, JV_TEMP_STRING_WIN32, and UNICODE environment flag for CreateProcess. * java/net/natNetworkInterfaceWin32.cc (winsock2GetRealNetworkInterfaces): Use tchar.h macros and _Jv_Win32NewString. From-SVN: r74201
2003-11-26natDouble.cc (parseDouble): Reverted patch of 2003-11-13.Tom Tromey1-1/+1
* java/lang/natDouble.cc (parseDouble): Reverted patch of 2003-11-13. From-SVN: r73956
2003-11-21* java/lang/Float.java (static): Removed.Mark Wielaard1-14/+1
From-SVN: r73805
2003-11-14jni.cc (_Jv_JNI_GetStringUTFChars): Pass length of string to ↵Tom Tromey4-7/+7
JvGetStringUTFRegion. * jni.cc (_Jv_JNI_GetStringUTFChars): Pass length of string to JvGetStringUTFRegion. * java/lang/natPosixProcess.cc (new_string): Pass length of string to JvGetStringUTFRegion. * java/lang/natDouble.cc (parseDouble): Pass length of string to JvGetStringUTFRegion. * java/lang/natWin32Process.cc (startProcess): Pass length of string to JvGetStringUTFRegion. * java/lang/natClass.cc (forName): Pass length of string to JvGetStringUTFRegion. * gnu/gcj/runtime/natNameFinder.cc (getExternalLabel): Pass length of string to JvGetStringUTFRegion. * gnu/gcj/convert/natIconv.cc (init): Pass length of string to JvGetStringUTFRegion. * gnu/awt/gtk/natGtkLabelPeer.cc (setText): Pass length of string to JvGetStringUTFRegion. * gnu/awt/gtk/natGtkButtonPeer.cc (setLabel): Pass length of string to JvGetStringUTFRegion. From-SVN: r73571
2003-11-07re PR libgcj/12231 ([win32] Console applications spawned via Runtime.exec( ) ↵Mohan Embar2-74/+117
in a GUI application flash console window) PR libgcj/12231 * java/lang/Win32Process.java (hasExited) Changed from public to private. (startProcess): Likewise. (cleanup): Likewise. * java/lang/natWin32Process.cc (cleanup) Don't close input, output and error streams. (ChildProcessPipe): New helper class. (startProcess): Refactored to use ChildProcessPipe. Use CREATE_NO_WINDOW when launching child process. From-SVN: r73326
2003-11-04natClass.cc (newInstance): Throw InstantiationException if class has no ↵Bryce McKinlay1-1/+1
null-argument constructor. * java/lang/natClass.cc (newInstance): Throw InstantiationException if class has no null-argument constructor. From-SVN: r73244
2003-10-30natMethod.cc (_Jv_CallAnyMethodA): Don't use vtable dispatch for final methods.Bryce McKinlay1-2/+4
* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Don't use vtable dispatch for final methods. From-SVN: r73101
2003-10-28natClass.cc (_Jv_LayoutVTableMethods): Always assign a vtable slot for final ↵Bryce McKinlay1-2/+7
methods. * java/lang/natClass.cc (_Jv_LayoutVTableMethods): Always assign a vtable slot for final methods. Add FIXME comment. From-SVN: r73023
2003-10-26AccessibleObject.java (secureSetAccessible): Don't check for AccessibleObject.Bryce McKinlay1-33/+12
* java/lang/reflect/AccessibleObject.java (secureSetAccessible): Don't check for AccessibleObject. Update javadocs. From-SVN: r72943
2003-10-26Constructor.java (toString): Avoid extra whitespace on constructor with no ↵Bryce McKinlay4-45/+54
modifiers. 2003-10-26 Bryce McKinlay <bryce@mckinlay.net.nz> * java/lang/reflect/Constructor.java (toString): Avoid extra whitespace on constructor with no modifiers. * java/lang/reflect/natConstructor.java (newInstance): Look up caller and perform accessibility check only if constructor is non-public and accessible flag is not set. 2003-10-26 Bryce McKinlay <bryce@mckinlay.net.nz> * jni.cc (_Jv_JNI_CallAnyMethodV, _Jv_JNI_CallAnyMethodA, _Jv_JNI_CallAnyVoidMethodV, _Jv_JNI_CallAnyVoidMethodA): Don't use _Jv_LookupDeclaredMethod(). Call _Jv_CallAnyMethodA with is_virtual_call argument. * include/jvm.h (_Jv_isVirtualMethod): Moved and renamed from natClass.cc. * java/lang/natClass.cc (_Jv_LayoutVTableMethods): Use _Jv_isVirtualMethod. * java/lang/reflect/natMethod.cc (invoke): Don't use _Jv_LookupDeclaredMethod. (_Jv_CallAnyMethodA): New is_virtual_call argument. If specified, look up method in target object's vtable. From-SVN: r72942
2003-10-25Method.java (toString): Avoid extra whitespace on method with no modifiers.Bryce McKinlay1-2/+6
* java/lang/reflect/Method.java (toString): Avoid extra whitespace on method with no modifiers. From-SVN: r72919
2003-10-25re PR libgcj/11780 (Method.invoke() is slow)Bryce McKinlay2-36/+49
PR libgcj/11780: * java/lang/reflect/natMethod.cc (invoke): Look up caller and perform accessibility check only if target is non-public and accessible flag is not set. * java/lang/reflect/natField.cc (getAddr): Likewise. From-SVN: r72918
2003-10-24Obvious fix for systems with no interpreter.Anthony Green1-0/+2
From-SVN: r72903
2003-10-24lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.Andrew Haley2-5/+70
2003-10-22 Andrew Haley <aph@redhat.com> * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New. (java_get_callee_fndecl): New. * jcf-parse.c (java_parse_file): Call emit_catch_table(). * java-tree.h (ctable_decl): New. (catch_classes): New. (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES. * decl.c (java_init_decl_processing): Add catch_class_type. Add ctable_decl. Add catch_classes field. * class.c (build_indirect_class_ref): Break out from build_class_ref. (make_field_value): Check flag_indirect_dispatch. (make_class_data): Ditto. Tidy uses of PUSH_FIELD_VALUE. Add field catch_classes. (make_catch_class_record): New. * java-tree.h (PUSH_FIELD_VALUE): Tidy. 2003-10-22 Andrew Haley <aph@redhat.com> * java/lang/natClass.cc (initializeClass): Call _Jv_linkExceptionClassTable. (_Jv_LinkSymbolTable): Call )_Jv_ThrowNoSuchMethodError. Call _Jv_Defer_Resolution on a method whose ncode is NULL. (_Jv_linkExceptionClassTable): New function. (_Jv_LayoutVTableMethods): If superclass looks like a constant pool entry, look it up. * java/lang/Class.h (struct _Jv_CatchClass): New. (_Jv_linkExceptionClassTable): New friend. (_Jv_Defer_Resolution): New friend. (class Class.catch_classes): New field. * include/java-interp.h (Jv_Defer_Resolution): New method. (_Jv_PrepareClass): Make a friend of _Jv_MethodBase. (_Jv_MethodBase.deferred): New field. (_Jv_Defer_Resolution): New function. * resolve.cc (_Jv_PrepareClass): Resolve deferred handlers. * exception.cc (get_ttype_entry): Change return type to void**. (PERSONALITY_FUNCTION): Remove all code related to using a Utf8Const* for a match type. Change match type to be a pointer to a pointer, rather than a pointer to a Class. * defineclass.cc (handleCodeAttribute): Initialize method->deferred. (handleMethodsEnd): Likewise. From-SVN: r72886
2003-10-23natObject.cc (_Jv_ObjectCheckMonitor): Use _Jv_MutexCheckMonitor instead of ↵Rainer Orth1-1/+1
accessing mutex.owner directly. * java/lang/natObject.cc (_Jv_ObjectCheckMonitor): Use _Jv_MutexCheckMonitor instead of accessing mutex.owner directly. From-SVN: r72872
2003-10-22re PR libgcj/12416 (java.lang.Class.getFields returns duplicate entries.)Tom Tromey3-62/+77
PR libgcj/12416: * java/lang/Class.h: Updated. * java/lang/natClass.cc (_getFields): Removed. (getFields): Likewise. (getDeclaredFields): Added `public_only' parameter. * java/lang/Class.java (getFields): Now implemented in java; from Classpath. (getDeclaredFields): Likewise. (getDeclaredFields(boolean)): Declare. (_getFields): Removed. (internalGetFields): New method, from Classpath. From-SVN: r72818
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