summaryrefslogtreecommitdiffstats
path: root/libjava/java/lang
Commit message (Collapse)AuthorAgeFilesLines
* PR libgcj/11780:bryce2003-10-252-36/+49
| | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72918 138bc75d-0d04-0410-961f-82ee72b054a4
* Obvious fix for systems with no interpreter.green2003-10-241-0/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72903 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-10-22 Andrew Haley <aph@redhat.com>aph2003-10-242-5/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72886 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/natObject.cc (_Jv_ObjectCheckMonitor): Usero2003-10-231-1/+1
| | | | | | | _Jv_MutexCheckMonitor instead of accessing mutex.owner directly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72872 138bc75d-0d04-0410-961f-82ee72b054a4
* PR libgcj/12416:tromey2003-10-223-62/+77
| | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72818 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-10-21 Jerry Quinn <jlquinn@optonline.net>jlquinn2003-10-214-0/+65
| | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72741 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/StringBuffer.java (getChars): Fix array index checks.ralph2003-10-161-5/+6
| | | | | | | | | (append, substring, insert): Likewise. * testsuite/libjava.lang/StringBuffer_overflow.java: New file. * testsuite/libjava.lang/StringBuffer_overflow.out: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72579 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/natString.cc (getChars):ralph2003-10-161-10/+16
| | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72578 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/natClassLoader.cc (_Jv_InitNewClassFields): Removed.tromey2003-10-131-37/+0
| | | | | | | | | | (defineClass): Updated. (_Jv_NewClass): Likewise. * prims.cc (_Jv_InitPrimClass): Don't call _Jv_InitNewClassFields. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72444 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/ClassLoader.java (setSigners): Implemented.tromey2003-10-095-6/+22
| | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72271 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/StrictMath.java (toDegrees): Multiply beforetromey2003-10-082-4/+10
| | | | | | | | | | | | | | 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 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72238 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/VMClassLoader.java (loadClass): Now native.tromey2003-10-022-8/+13
| | | | | | | | * java/lang/natClassLoader.cc (loadClass): Implement. * prims.cc (_Jv_RunMain): Initialize ClassLoader. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72038 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-10-01 Andrew Haley <aph@redhat.com>aph2003-10-012-49/+221
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71979 138bc75d-0d04-0410-961f-82ee72b054a4
* PR libgcj/10596:tromey2003-09-292-26/+95
| | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71915 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-09-25 Michael Koch <konqueror@gmx.de>mkoch2003-09-251-12/+3
| | | | | | | | * java/lang/reflect/Proxy.java (getProxyClass): Remove workaround for gcj 3.0.x. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71796 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/reflect/Proxy.java (generate): Uncomment protectiontromey2003-09-257-687/+820
| | | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71765 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/StringBuffer.java (substring): Don't set `shared' onbryce2003-09-241-4/+5
| | | | | | | small Strings, even if buffer is already shared. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71726 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/System.java: Add GCJ LOCAL note about encoding aliases.neroden2003-09-241-0/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71710 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/Float.java, java/lang/Double.java: Add GCJ LOCALneroden2003-09-232-0/+12
| | | | | | | markers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71699 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-09-21 Ralph Loader <suckfish@ihug.co.nz>bryce2003-09-221-2/+3
| | | | | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71651 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-09-19 David Daney <ddaney@avtrex.com>tromey2003-09-201-1/+6
| | | | | | | | * java/lang/ref/Reference.java (clear): Set referent to null and synchronize. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71597 138bc75d-0d04-0410-961f-82ee72b054a4
* * win32-threads.cc: (ensure_interrupt_event_initialized) Newmembar2003-09-191-2/+27
| | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71562 138bc75d-0d04-0410-961f-82ee72b054a4
* * win32.cc: fixed tab, indentation and whitespacemembar2003-08-291-40/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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() git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70904 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in: Rebuilt.tromey2003-08-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70892 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/StrictMath.java: Typo fix.tromey2003-08-265-13/+18
| | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70828 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/ref/Reference.java (get): Indentation fix.tromey2003-08-261-8/+8
| | | | | | | | | | (clear): Comment fix. (enqueue): Likewise. (lock): Likewise. (referent): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70814 138bc75d-0d04-0410-961f-82ee72b054a4
* PR java/12058:tromey2003-08-261-1/+1
| | | | | | | * java/lang/reflect/natArray.cc (set): Allow null as argument. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70813 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/reflect/Proxy.java (ProxyData): `pack' now a String.tromey2003-08-261-6/+21
| | | | | | | | | (ProxyData.getPackage): New method. (ProxyData.getProxyData): Use package name, not Package. (ClassFactory.ClassFactory): Updated. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70809 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-08-21 David Daney <ddaney@avtrex.com>tromey2003-08-212-9/+16
| | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70668 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/ref/natReference.cc (finalize_referred_to_object):tromey2003-08-201-3/+14
| | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70599 138bc75d-0d04-0410-961f-82ee72b054a4
* PR libgcj/11951:tromey2003-08-181-29/+50
| | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70544 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-08-08 Andrew Haley <aph@redhat.com>aph2003-08-081-1/+4
| | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70250 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/Thread.java (Thread): Check for null "name" frombryce2003-08-071-9/+4
| | | | | | | | start of private constructor, not after calling the private constructor. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70216 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix for PR libgcj/11779:tromey2003-08-051-5/+6
| | | | | | | | * java/lang/reflect/natField.cc (getAddr): Skip frames in Field class. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70185 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/reflect/Method.java: Updated status comment.tromey2003-08-052-115/+349
| | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70184 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/natString.cc (init(gnu.gcj.runtime.StringBuffer)):tromey2003-07-282-1/+9
| | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69890 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-07-26 Ranjit Mathew <rmathew@hotmail.com>tromey2003-07-272-3/+9
| | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69844 138bc75d-0d04-0410-961f-82ee72b054a4
* + * java/lang/natRuntime.cc (_load): Add library name tomark2003-07-251-1/+2
| | | | | | | + UnsatisfiedLinkError when thrown. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69786 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/natSystem.cc (arraycopy): Check for overflow.tromey2003-07-231-2/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69706 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/Runtime.java: Comment fix.tromey2003-07-2110-126/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69621 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcj/cni.h: CNI now expands to Compiled Native Interface.mark2003-07-082-2/+2
| | | | | | | | * java/lang/e_pow.c: CYGNUS LOCAL should be GCJ LOCAL. * java/lang/fdlibm.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69104 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/natVMSecurityManager.cc (getClassContext):kraai2003-06-181-2/+2
| | | | | | | Use maxlen instead of len for loop bound. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68153 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-06-11 Andrew Haley <aph@redhat.com>aph2003-06-121-4/+4
| | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67835 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/ClassLoader.java (loadClass): Not deprecated.tromey2003-06-121-1/+0
| | | | | | | * java/io/PrintStream.java: Not deprecated. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67811 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-06-06 James Clark <jjc@jclark.com>mark2003-06-071-6/+6
| | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67595 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/w_exp.c (o_threshold, u_threshold): Define onlykraai2003-06-061-0/+4
| | | | | | | if _IEEE_LIBM is undefined. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67526 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-05-27 Michael Koch <konqueror@gmx.de>mkoch2003-05-271-1/+8
| | | | | | | | * java/lang/System.java: Explicitely import needed classes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67182 138bc75d-0d04-0410-961f-82ee72b054a4
* PR libgcj/10582:tromey2003-05-011-16/+24
| | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66348 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/natString.cc (_Jv_AllocString): Initializetromey2003-04-281-0/+2
| | | | | | | | | cachedHashCode. (init): Likewise. (_Jv_NewStringUtf8Const): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66180 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-03-29 Mohan Embar <gnustuff@thisiscool.com>aph2003-04-251-5/+1
| | | | | | | | | | | | | | | | | | * 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 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66067 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud