summaryrefslogtreecommitdiffstats
path: root/libjava/gnu/gcj/runtime
Commit message (Collapse)AuthorAgeFilesLines
...
* * java/lang/VMThrowable.java (getStackTrace): Pass trace as-is tormathew2004-04-092-5/+29
| | | | | | | | | | | | | | modified lookup(). * gnu/gcj/runtime/NameFinder.java (lookup): Change to take in a StackTraceElement directly. (newElement): New native helper method to create StackTraceElement bypassing Java access control. (createStackTraceElement): Use newElement() instead of directly calling StackTraceElement's constructor. * gnu/gcj/runtime/natNameFinder.cc (newElement): New method. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@80541 138bc75d-0d04-0410-961f-82ee72b054a4
* PR libgcj/12001:tromey2004-01-141-11/+13
| | | | | | | | | | | | * gnu/gcj/runtime/VMClassLoader.java (VMClassLoader): Pass empty array to superclass. (init): Changed interface; add URLs here. (initialize): New static method. * prims.cc (_Jv_CreateJavaVM): Initialize ClassLoader here... (_Jv_RunMain): ... not here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75889 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc (_Jv_JNI_GetStringUTFChars): Pass length of string totromey2003-11-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73571 138bc75d-0d04-0410-961f-82ee72b054a4
* * gnu/gcj/runtime/FirstThread.java (Klocale, Kcalendar):jsturm2003-11-081-4/+6
| | | | | | | New fields. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73360 138bc75d-0d04-0410-961f-82ee72b054a4
* PR libgcj/12656:tromey2003-10-221-2/+3
| | | | | | | | * gnu/gcj/runtime/natFirstThread.cc (call_main): Use _Jv_LookupDeclaredMethod, not _Jv_GetMethodLocal. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72811 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-10-08 Michael Koch <konqueror@gmx.de>mkoch2003-10-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/gcj/protocol/core/Connection.java, gnu/gcj/protocol/core/CoreInputStream.java, gnu/gcj/protocol/core/Handler.java, gnu/gcj/protocol/core/natCoreInputStream.cc, gnu/gcj/protocol/file/Connection.java, gnu/gcj/protocol/file/Handler.java, gnu/gcj/protocol/gcjlib/Connection.java, gnu/gcj/protocol/gcjlib/Handler.java, gnu/gcj/protocol/http/Connection.java, gnu/gcj/protocol/http/Handler.java, gnu/gcj/protocol/jar/Connection.java, gnu/gcj/protocol/jar/Handler.java: Moved to gnu/java/net/protocol. * gnu/java/net/protocol/core/Connection.java, gnu/java/net/protocol/core/CoreInputStream.java, gnu/java/net/protocol/core/Handler.java, gnu/java/net/protocol/core/natCoreInputStream.cc, gnu/java/net/protocol/file/Connection.java, gnu/java/net/protocol/file/Handler.java, gnu/java/net/protocol/gcjlib/Connection.java, gnu/java/net/protocol/gcjlib/Handler.java, gnu/java/net/protocol/http/Connection.java, gnu/java/net/protocol/http/Handler.java, gnu/java/net/protocol/jar/Connection.java, gnu/java/net/protocol/jar/Handler.java: Moved from gnu/gcj/protocol. * gnu/gcj/runtime/FirstThread.java, java/net/URL.java: Use moved protocol handlers. * Makefile.am (ordinary_java_source_files): Moved files. (nat_source_files): Likewise. * Makefile.in: Regenerated. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72233 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix PR libgcj/12475bryce2003-10-022-1/+7
| | | | | | | | * gnu/gcj/runtime/StackTrace.java (finalize): Declare. * gnu/gcj/runtime/natStackTrace.cc (finalize): New. Free "addrs". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72012 138bc75d-0d04-0410-961f-82ee72b054a4
* * gnu/gcj/runtime/FirstThread.java (getMain): Fixed indentation.tromey2003-10-011-14/+13
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71998 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/reflect/Proxy.java (generate): Uncomment protectiontromey2003-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* * Makefile.in: Rebuilt.tromey2003-08-283-48/+240
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* 2003-01-31 Andrew Haley <aph@redhat.com>aph2003-08-202-6/+13
| | | | | | | | | | | | | | | | * except.c (prepare_eh_table_type): Use new encoding for exception handlers when using -fno-assume-compiled. 2003-08-20 Andrew Haley <aph@redhat.com> * gnu/gcj/runtime/StackTrace.java (getClass): New method. * gnu/gcj/runtime/natStackTrace.cc (getClass): New method. (classAt): Break out class lookup function into getClass(). * exception.cc (PERSONALITY_FUNCTION): Use new encoding for exception handlers when using -fno-assume-compiled. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70605 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix for PR libgcj/9125:tromey2003-08-202-6/+42
| | | | | | | | | | | | | * gnu/gcj/runtime/natVMClassLoader.cc (findClass): Find Runtime object outside of loop. Respect lib_control setting. * gnu/gcj/runtime/VMClassLoader.java (tried_libraries): New field. (lib_control): New field. (LIB_FULL, LIB_CACHE, LIB_NEVER): New constants. (VMClassLoader): Initialize new field. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70600 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-07-20 Anthony Green <green@redhat.com>green2003-07-211-12/+4
| | | | | | | | | | | | | | | | | * gnu/awt/j2d/AbstractGraphicsState.java (clone): Handle CloneNotSupportedException. * gnu/gcj/xlib/WindowAttributes.java (clone): Ditto. * gnu/gcj/xlib/WMSizeHints.java (clone): Ditto. * gnu/gcj/xlib/GC.java (clone): Ditto. * gnu/awt/xlib/XGraphics.java (clone): Ditto. * gnu/awt/j2d/Graphics2DImpl.java (clone): Ditto. * gnu/awt/xlib/XEventLoop.java (postNextEvent): Remove unreachable handler. * gnu/gcj/runtime/NameFinder.java (NameFinder): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69623 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-07-20 Steve Pribyl <steve@netfuel.com.>tromey2003-07-212-8/+12
| | | | | | | | | | | * gnu/gcj/runtime/natSharedLibLoader.cc (init): `libname' now a String. Put dlerror() message into exception. Include UnsatisfiedLinkError. * gnu/gcj/runtime/SharedLibLoader.java (init): `libname' now a String. Now native. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69622 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-07-11 Matt Kraai <kraii@alumni.cmu.edu>tromey2003-07-112-4/+4
| | | | | | | | | | * gnu/gcj/runtime/SharedLibLoader.java: Fix misspelling. * gnu/gcj/runtime/natSharedLibLoader.cc: Likewise. * java/awt/im/InputContext.java: Remove a redundant partial line. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69238 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-03-10 2003-02-27 Mohan Embar <gnustuff@thisiscool.com>aph2003-03-102-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * include/jvm.h: removed declaration of _Jv_ThisExecutable() setter; made return value of getter const char* instead of char* * prims.cc: removed all references to _Jv_ThisExecutable(). These are in the platform-specific sections now. * posix.cc: define platform-specific _Jv_ThisExecutable(). Handle DISABLE_MAIN_ARGS and HAVE_PROC_SELF_EXE cases * win32.cc: define platform-specific _Jv_ThisExecutable() using GetModuleFilename() * java/lang/natRuntime.cc: set gnu.gcj.progname property to argv[0] instead of _Jv_ThisExecutable() 2003-03-10 Ranjit Mathew <rmathew@hotmail.com> * gnu/gcj/runtime/NameFinder.java (usingAddr2name): New flag that is set if we are using addr2name.awk instead of addr2line. (NameFinder): Set usingAddr2name if using addr2name.awk. (getExternalLabel): New native method to convert a method name to an external label. (lookup): Convert name given by addr2line to an external label before demangling. * gnu/gcj/runtime/natNameFinder.cc (LABEL_PREFIX): New string constant representing the prefix attached to method names to convert them to an external label. (gnu::gcj::runtime::NameFinder::getExternalLabel): Define using LABEL_PREFIX. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64111 138bc75d-0d04-0410-961f-82ee72b054a4
* * gnu/gcj/runtime/natStackTrace.cc: Include platform.h immediatelyro2003-02-191-3/+2
| | | | | | | | | | | | | | after config.h. Use <> for consistency. * java/lang/natObject.cc: Likewise. * java/lang/natRuntime.cc: Likewise. * java/lang/natSystem.cc: Likewise. * java/util/natTimeZone.cc: Likewise. * win32.cc: Likewise. * include/posix.h (fcntl, socket, connect, close, bind, accept, listen, write, read): Undef to avoid interference from OS macros. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63122 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-02-13 Ranjit Mathew <rmathew@hotmail.com>mark2003-02-131-1/+1
| | | | | | | | | | * gnu/gcj/runtime/NameFinder.java (createStackTraceElement): Use lastIndexOf( ) instead of indexOf( ) to find the colon before the line number, because Win32 file names might contain a drive letter and a colon at the start of an absolute path. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62834 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-01-27 Ranjit Mathew <rmathew@hotmail.com>tromey2003-01-281-0/+2
| | | | | | | | | | | * configure.in: Specifically define HAVE_BACKTRACE if building for MinGW. * include/win32.h: Remove HAVE_BACKTRACE definition. * gnu/gcj/runtime/natStackTrace.cc: Include platform.h. * configure: Rebuilt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62000 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in: Rebuilt.tromey2002-12-111-0/+67
| | | | | | | | | | | * Makefile.am (nat_source_files): Added natVMClassLoader.cc. * gnu/gcj/runtime/natVMClassLoader.cc: New file. (gnu::gcj::runtime::VMClassLoader::findClass): Moved here. * java/lang/natClassLoader.cc (gnu::gcj::runtime::VMClassLoader::findClass): Removed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60020 138bc75d-0d04-0410-961f-82ee72b054a4
* * gnu/gcj/protocol/jar/Connection.java (getJarFile): download andmark2002-12-091-17/+4
| | | | | | | | | | | | | | | | | | cache remote jar files. * gnu/gcj/runtime/VMClassLoader.java: Don't construct jar URL, only add File.separator to URL when it is a directory. * java/lang/ClassLoader.java: Add Classpath javadoc. (parent): final. (getParent): Add (disabled) security check. (findLibrary): New default method. * java/net/JarURLConnection.java (getManifest): Implement. (getInputStream): Only create InputStream when entry exists. (getHeaders): Only use jarFileURLConnection or JarEntry to set length when they exist. * java/net/URLClassLoader.java: New/Rewritten version from Classpath. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59949 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-12-05 Andrew Haley <aph@redhat.com>aph2002-12-051-3/+6
| | | | | | | | * gnu/gcj/runtime/natStackTrace.cc (fillInStackTrace): Throw #ifdef (HAVE_BACKTRACE) around the whole function body. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59855 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-12-03 Andrew Haley <aph@redhat.com>aph2002-12-033-0/+383
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): Call _Jv_PushClass. (_Jv_InitNewClassFields): Set protectionDomain and chain = NULL. (_Jv_PopClass): New. (_Jv_PushClass): New. * java/lang/natClass.cc (forName (jstring)): Use a StackTrace to discover the ClassLoader of our caller. (_Jv_CheckArrayStore): Don't check that a class is assignment compatible with Object. * java/lang/natVMTHrowable.cc: Delete. * gnu/gcj/runtime/StackTrace.java: New, partly copied from java.lang.VMThrowable. (StackTrace(), StackTrace(int)): New constructors. (classAt, methodAt, update, methodAtAddress): New methods. (map): New field. * java/lang/VMThrowable.java: Use StackTrace instead of natVMTHrowable. * java/lang/Class.h (getClassLoaderInternal): New. (class Class): Be friendly with _Jv_PopClass and _Jv_PushClass. Be friendly with gnu::gcj::runtime::StackTrace. (Object.chain): New field. * include/java-interp.h (class _Jv_InterpMethod): Be friendly with gnu::gcj::runtime::StackTrace. * gnu/gcj/runtime/natStackTrace.cc: New file. * gnu/gcj/runtime/MethodRef.java: New file. * prims.cc (_Jv_NewObjectArray): Use getClassLoaderInternal() instead of getClassLoader(). * verify.cc (class _Jv_BytecodeVerifier): Likewise. java::lang::VMThrowable. * Makefile.am (core_java_source_files): Add MethodRef.java, StackTrace.java. (nat_source_files): Remove natVMThrowable.cc; add natStackTrace.cc. * Makefile.in: Rebuild. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59771 138bc75d-0d04-0410-961f-82ee72b054a4
* * gnu/gcj/runtime/NameFinder.java (remove_interpreter): New field.mark2002-09-022-15/+148
| | | | | | | | | | | | (sanitizeStack): Correctly reset unknown and interpreter counters, detect interpreter runtime frames. (demangleInterpreterMethod): New method. * gnu/gcj/runtime/natNameFinder.cc (lookupInterp): Use new method. * java/lang/natVMThrowable.cc (fillInStackTrace): Change order of filling in addrs[]. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56741 138bc75d-0d04-0410-961f-82ee72b054a4
* * include/jvm.h (struct _Jv_frame_info): New structure.tromey2002-08-292-7/+44
| | | | | | | | | | | | | | | | | | | | | | | * gnu/gcj/runtime/natNameFinder.cc: Include StringBuffer.h, java-interp.h. (lookupInterp): New method. (getAddrAsString): Use _Jv_frame_info. (dladdrLookup): Likewise. * gnu/gcj/runtime/NameFinder.java (lookup): Try to look up interpreted frame. (lookupInterp): Declare. * java/lang/natVMThrowable.cc: Include Thread.h, java-interp.h. (fillInStackTrace): Collect information on interpreted frames. Use _Jv_frame_info. * interpret.cc: Include Thread.h. (run): Create and push _Jv_MethodChain object. (_Jv_EndOfInterpreter): New global. * java/lang/Thread.java (interp_frame): New field. * include/java-interp.h (struct _Jv_MethodChain): New structure. Include NameFinder.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56657 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.am (libgcj_la_SOURCES): Remove name-finder.cc.mark2002-08-242-0/+491
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (core_java_source_files): Add VMThrowable.java and NameFinder.java (nat_source_files): Remove natThrowable.cc, add natVMThrowable.cc and natNameFinder.cc. * Makefile.in: Regenerate. * prims.cc: Use trace_enabled from VMThrowable. * name-finder.cc: Removed. * gcj/javaprims.h: Add class VMThrowable. * gnu/gcj/runtime/NameFinder.java: New file. * gnu/gcj/runtime/natNameFinder.cc: Likewise. * include/name-finder.h: Removed. * java/lang/Throwable.java (printStackTrace (PrintStream)): Use new method stackTraceString(). (printStackTrace (PrintWriter)): Likewise. (stackTraceString): Complete rewrite of old printStackTrace using StringBuffer. (stackTraceStringBuffer): New helper method for stackTraceString(). (fillInStackTrace): Delegate to VMTrowable. (getStackTrace): Likewise. (getStackTrace0): Removed. (trace_enabled, stackTraceBytes): Moved to new VMThrowable.java. (setStackTrace): Copy given array. * java/lang/natThrowable.cc: Removed (replaced by natVMThrowable). * java/lang/VMThrowable.java: New class. * java/lang/natVMThrowable.cc: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56556 138bc75d-0d04-0410-961f-82ee72b054a4
* Add license clarification.mark2002-01-221-5/+16
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49104 138bc75d-0d04-0410-961f-82ee72b054a4
* * gnu/gcj/runtime/StringBuffer.javatromey2001-12-121-1/+1
| | | | | | | | (ensureCapacity_unsynchronized): Ensure we always get at least `minimumCapacity' characters in new buffer. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47940 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/String.java (String): New constructor.tromey2001-12-112-0/+224
| | | | | | | | | | | | * gnu/gcj/runtime/natStringBuffer.cc: New file. * gnu/gcj/runtime/StringBuffer.java: New file. * Makefile.in: Rebuilt. * Makefile.am (ordinary_java_source_files): Added gnu/gcj/runtime/StringBuffer.java. (nat_source_files): Added gnu/gcj/runtime/natStringBuffer.cc. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47883 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in: Rebuilt.tromey2001-11-131-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.am (ordinary_java_source_files): Added JNIWeakRef.java. * jni.cc: Include JNIWeakRef.h. (unwrap): New function. (_Jv_JNI_DefineClass): Use it. (_Jv_JNI_GetSuperclass): Likewise. (_Jv_JNI_IsAssignableFrom): Likewise. (_Jv_JNI_Throw): Likewise. (_Jv_JNI_ThrowNew): Likewise. (_Jv_JNI_IsSameObject): Likewise. (_Jv_JNI_AllocObject): Likewise. (_Jv_JNI_GetObjectClass): Likewise. (_Jv_JNI_IsInstanceOf): Likewise. (_Jv_JNI_GetAnyMethodID): Likewise. (array_from_valist): Likewise. (_Jv_JNI_CallAnyMethodV): Likewise. (_Jv_JNI_CallAnyMethodA): Likewise. (_Jv_JNI_CallAnyVoidMethodV): Likewise. (_Jv_JNI_CallAnyVoidMethodA): Likewise. (_Jv_JNI_CallStaticMethodV): Likewise. (_Jv_JNI_CallStaticMethod): Likewise. (_Jv_JNI_CallStaticMethodA): Likewise. (_Jv_JNI_NewObjectV): Likewise. (_Jv_JNI_NewObject): Likewise. (_Jv_JNI_NewObjectA): Likewise. (_Jv_JNI_GetField): Likewise. (_Jv_JNI_SetField): Likewise. (_Jv_JNI_GetAnyFieldID): Likewise. (_Jv_JNI_SetStaticField): Likewise. (_Jv_JNI_GetStringLength): Likewise. (_Jv_JNI_GetStringChars): Likewise. (_Jv_JNI_ReleaseStringChars): Likewise. (_Jv_JNI_GetStringUTFLength): Likewise (_Jv_JNI_GetStringUTFChars): Likewise. (_Jv_JNI_GetStringRegion): Likewise. (_Jv_JNI_GetStringUTFRegion): Likewise. (_Jv_JNI_GetStringCritical): Likewise. (_Jv_JNI_GetArrayLength): Likewise. (_Jv_JNI_NewObjectArray): Likewise. (_Jv_JNI_GetObjectArrayElement): Likewise. (_Jv_JNI_SetObjectArrayElement): Likewise. (_Jv_JNI_GetPrimitiveArrayElements): Likewise. (_Jv_JNI_ReleasePrimitiveArrayElements): Likewise. (_Jv_JNI_GetPrimitiveArrayRegion): Likewise. (_Jv_JNI_SetPrimitiveArrayRegion): Likewise. (_Jv_JNI_MonitorEnter): Likewise. (_Jv_JNI_MonitorExit): Likewise. (_Jv_JNI_ToReflectedField): Likewise. (_Jv_JNI_FromReflectedField): Likewise. (_Jv_JNI_ToReflectedMethod): Likewise. (_Jv_JNI_FromReflectedMethod): Likewise. (_Jv_JNI_NewGlobalRef): Likewise. (_Jv_JNI_DeleteGlobalRef): Likewise. (_Jv_JNI_DeleteLocalRef): Likewise. (_Jv_JNI_NewLocalRef): Likewise. (_Jv_JNI_NewWeakGlobalRef): New function. (_Jv_JNI_DeleteWeakGlobalRef): Likewise. (_Jv_JNIFunctions): Updated for new methods. (NOT_IMPL): Removed. * gnu/gcj/runtime/JNIWeakRef.java: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46990 138bc75d-0d04-0410-961f-82ee72b054a4
* fix include problemgreen2001-10-241-1/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46459 138bc75d-0d04-0410-961f-82ee72b054a4
* * gnu/gcj/runtime/natFinalizerThread.cc: New file.tromey2001-10-103-4/+99
| | | | | | | | | | | | | | | | | | | | | | | * java/lang/natRuntime.cc: Include FinalizerThread.h. (runFinalization): Call finalizerReady. * nogc.cc (_Jv_GCInitializeFinalizers): New function. * prims.cc: Include VirtualMachineError.h, FinalizerThread.h. (_Jv_CreateJavaVM): Start the finalizer thread. * no-threads.cc: Include InternalError.h. (_Jv_ThreadStart): Throw InternalError. (_Jv_ThreadInitData): Don't throw error if this is not the first thread. * Makefile.in: Rebuilt. * Makefile.am (ordinary_java_source_files): Added FinalizerThread.java. (nat_source_files): Added natFinalizerThread.cc. * include/jvm.h (_Jv_GCInitializeFinalizers): Declare. * boehm.cc (_Jv_GCInitializeFinalizers): New function. * gnu/gcj/runtime/FirstThread.java (run): Start finalizer thread. * gnu/gcj/runtime/FinalizerThread.java: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46163 138bc75d-0d04-0410-961f-82ee72b054a4
* * gnu/gcj/runtime/SharedLibLoader.java: New class.bothner2001-09-292-0/+150
| | | | | | | | | | * gnu/gcj/runtime/natSharedLibLoader.cc: Native methods. * Makefile.am: Update accordingly. * configure.in: Add AC_CHECK_LIB for dlopen. * include/config.h.in: Add HAVE_DLOPEN. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45885 138bc75d-0d04-0410-961f-82ee72b054a4
* * include/jvm.h: Declare _Jv_RegisterResource.green2001-09-061-0/+10
| | | | | | | | | | | | | | | | | | * gnu/gcj/Core.java, gnu/gcj/natCore.cc, gnu/gcj/protocol/core/Connection.java, gnu/gcj/protocol/core/Handler.java, gnu/gcj/protocol/core/CoreInputStream.java, gnu/gcj/protocol/core/natCoreInputStream.cc: New files. * java/net/URL.java (setURLStreamHandler): Use gnu.gcj.protocol.core.Handler for the core protocol. * gnu/gcj/runtime/VMClassLoader.java (init): Add "core:/" to the end of java.class.path. * Makefile.am (ordinary_java_source_files): Add new java files. (nat_source_files): Add new native code files. * Makefile.in: Rebuilt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45450 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.am: New friends for java/lang/Thread.h.bryce2001-08-262-6/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * prims.cc (runFirst): Removed. (JvRunMain): Merged into _Jv_RunMain. Now just calls that. (_Jv_RunMain): Now takes either a klass or class name parameter. Create a gnu.gcj.runtime.FirstThread and attach the native thread to that, then run it using _Jv_ThreadRun. Remove special handling of jar files, instead pass is_jar parameter through to FirstThread. * gcj/javaprims.h: Add prototypes for _Jv_ThreadRun and new variant of _Jv_AttachCurrentThread. * gnu/gcj/runtime/FirstThread.java (FirstThread): Now extends Thread. (run): New method. Take care of looking up main class manifest attribute and calling forName if neccessary. Then call call_main. (call_main): New native method. * gnu/gcj/runtime/natFirstThread.cc (call_main): New function, code relocated from prims.cc. Look up and call main method. * java/lang/Thread.java (run_): Removed. * java/lang/natThread.cc (run_): Renamed to... (_Jv_ThreadRun): this. JVMPI notification code moved to ... (_Jv_NotifyThreadStart): here. New function. (countStackFrames, destroy, resume, suspend, stop): Throw UnsupportedOperationExceptions rather than JvFail'ing. (_Jv_AttachCurrentThread): New variant takes a Thread argument. Existing version wraps new variant. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45182 138bc75d-0d04-0410-961f-82ee72b054a4
* Implement invocation interface; don't create new thread for main.bothner2001-05-222-186/+9
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42428 138bc75d-0d04-0410-961f-82ee72b054a4
* * gnu/gcj/runtime/VMClassLoader.java (VMClassLoader): Now public.tromey2001-05-211-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42405 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/java:bryce2001-04-251-11/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * decl.c (init_decl_processing): Add new class "protectionDomain" field. * class.c (make_class_data): Set initial value for "protectionDomain". libjava: 2001-04-25 Bryce McKinlay <bryce@albatross.co.nz> java.security merge and ClassLoader compliance fixes. * java/lang/Class.h (Class): Include ProtectionDomain.h. New protectionDomain field. (forName): Add initialize parameter. Fixes declaration to comply with JDK spec. * java/lang/natClass.cc (forName): Correct declaration of the three-arg variant. Honour "initialize" flag. (getProtectionDomain0): New method. * java/lang/Class.java: Fix forName() declaration. (getPackage): New method based on Classpath implementation. (getProtectionDomain0): New native method decl. (getProtectionDomain): New method. * java/lang/ClassLoader.java (getParent): Now final. (definedPackages): New field. (getPackage): New. (defineClass): New variant with protectionDomain argument. (definePackage): New. (getPackages): New. (findSystemClass): Now final. (getSystemResourceAsStream): Remove redundant "final" modifier. (getSystemResource): Remove redundant "final" modifier. (getResources): Now final. (protectionDomainPermission): New static field. (unknownProtectionDomain): Ditto. (defaultProtectionDomain): Ditto. (getSystemClassLoader): Now non-native. * java/util/ResourceBundle.java (tryGetSomeBundle): Use the correct arguments for Class.forName(). * java/lang/Package.java: New file. * gnu/gcj/runtime/VMClassLoader.java (getVMClassLoader): Removed. (instance): Static initialize singleton. (findClass): Override this, not findSystemClass. * java/lang/natClassLoader.cc (defineClass0): Set class's protectionDomain field as specified. (getSystemClassLoader): Removed. (findClass): Renamed from findSystemClass. Call the interpreter via URLClassLoader.findClass if loading class via dlopen fails. * java/security/*.java: java.security import/merge with Classpath. * java/security/acl/*.java: Likewise. * java/security/interfaces/*.java: Likewise. * java/security/spec/*.java: Likewise. * java/net/NetPermission.java: Likewise. * java/net/SocketPermission.java: Likewise. * gnu/java/security/provider/DefaultPolicy.java: Likewise. * Makefile.am: Add new classes. * Makefile.in: Rebuilt. * gcj/javaprims.h: CNI namespace rebuild. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41543 138bc75d-0d04-0410-961f-82ee72b054a4
* * exception.cc (java_eh_info): Make value type jthrowable.rth2001-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (_Jv_type_matcher): Remove now unneeded cast. (_Jv_Throw): Make argument type jthrowable. Munge name for SJLJ_EXCEPTIONS here ... * gcj/cni.h: ... not here. (JvThrow): Remove. * gcj/javaprims.h (_Jv_Throw, _Jv_Sjlj_Throw): Update declarations. * defineclass.cc, interpret.cc, jni.cc, posix-threads.cc, prims.cc, resolve.cc, gnu/gcj/runtime/natFirstThread.cc, gnu/gcj/xlib/natDrawable.cc, gnu/gcj/xlib/natFont.cc, gnu/gcj/xlib/natWMSizeHints.cc, gnu/gcj/xlib/natWindowAttributes.cc, gnu/gcj/xlib/natXImage.cc, java/io/natFile.cc, java/io/natFileDescriptorEcos.cc, java/io/natFileDescriptorPosix.cc, java/io/natFileDescriptorWin32.cc, java/io/natFileWin32.cc, java/lang/natClass.cc, java/lang/natClassLoader.cc, java/lang/natDouble.cc, java/lang/natObject.cc, java/lang/natPosixProcess.cc, java/lang/natRuntime.cc, java/lang/natString.cc, java/lang/natSystem.cc, java/lang/natThread.cc, java/lang/reflect/natArray.cc, java/lang/reflect/natConstructor.cc, java/lang/reflect/natField.cc, java/lang/reflect/natMethod.cc, java/util/zip/natDeflater.cc, java/util/zip/natInflater.cc: Use throw, not JvThrow or _Jv_Throw. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40838 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/natClass.cc (_Jv_CheckCast): add class names to exceptionmark2001-03-181-1/+3
| | | | | | | * gnu/gcj/runtime/FirstThread.java (main): replace / with . in jarMainClassName git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40604 138bc75d-0d04-0410-961f-82ee72b054a4
* * gnu/gcj/runtime/FirstThread.java (Kcert, Kfile, Khttp, Kjar):tromey2000-12-121-1/+10
| | | | | | | New static final fields. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38200 138bc75d-0d04-0410-961f-82ee72b054a4
* 2000-09-05 Bryce McKinlay <bryce@albatross.co.nz>bryce2000-09-051-7/+4
| | | | | | | | | | | | | | | * gnu/gcj/convert/natIconv.cc (read): Remove unused local. (write): Ditto. * gnu/gcj/runtime/FileDeleter.java (deleteOnExitNow): Check for null stack. Synchronize. * java/lang/fdlibm.h: #undef __P if previously defined. * java/lang/natSystem.cc (currentTimeMillis): Remove unused local. * java/net/natPlainDatagramSocketImpl.cc (send): Remove unreachable block. (mcastGrp): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36158 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/io/File.java (deleteOnExit): New method.green2000-09-041-0/+38
| | | | | | | | | | | * gnu/gcj/runtime/FileDeleter.java: New class. * java/lang/natRuntime.cc (exit): Call FileDeleter.deleteOnExitNow() * Makefile.am: Add FileDeleter.java. * Makefile.in: Rebuilt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36141 138bc75d-0d04-0410-961f-82ee72b054a4
* 2000-08-26 Anthony Green <green@redhat.com>green2000-08-262-4/+17
| | | | | | | | | | | | | | | | | | | | | | * Makefile.in: Rebuilt. * Makefile.am (java/lang/ClassLoader.h): Make _Jv_RunMain a friend. * prims.cc: Include ClassLoader.h. (_Jv_RunMain): When executing jar files, classpath must be the jar file only. Lose our reference to the system ClassLoader in order to get a new one with the correct classpath. * java/lang/natSystem.cc (init_properties): When executing a jar file, only use the jar file for java.class.path. * gnu/gcj/runtime/VMClassLoader.java: Use the canonical file name for bytecode archives. * gnu/gcj/runtime/FirstThread.java: Handle case where manifest exists, but not Main-Class. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35999 138bc75d-0d04-0410-961f-82ee72b054a4
* Sun Aug 20 21:02:48 2000 Anthony Green <green@redhat.com>green2000-08-211-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * java/lang/natSystem.cc (init_properties): Change sourceware reference to sources.redhat.com. * include/java-props.h: Add _Jv_Jar_Class_Path. * prims.cc: Ditto. Set it from `gij -jar file' option. * java/lang/natSystem.cc (init_properties): Set java.class.path from {gij -jar file}:{CLASSPATH variable}:{-Djava.class.path= or .} * java/util/PropertyPermission.java: Import from GNU Classpath. * Makefile.in: Rebuilt. * Makefile.am: Add java/util/PropertyPermission.java. * java/lang/System.java: Add setProperty method. * gij.cc (main): Add -jar option to execute jar files. (help): Describe -jar option. * prims.cc (_Jv_RunMain): Add support for jar execution mode. * gnu/gcj/tools/Gij.java: New file. * include/jvm.h: Add is_jar argument to _Jv_RunMain. * gnu/gcj/runtime/FirstThread.java (main): New method. * java/util/jar/Attributes.java: Correct comment spelling. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35829 138bc75d-0d04-0410-961f-82ee72b054a4
* 2000-06-20 Bryce McKinlay <bryce@albatross.co.nz>bryce2000-06-201-4/+4
| | | | | | | | | | | | | * java/lang/ThreadGroup.java: Merged with classpath. * prims.cc (_Jv_RunMain): Don't use ain_group'. * gnu/gcj/runtime/FirstThread.java: Remove ThreadGroup constructor argument. * java/lang/Thread.java (Thread): Bootstrap initial thread from ThreadGroup.root if Thread.currentThread is null. Honour the ThreadGroup's max priority setting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34615 138bc75d-0d04-0410-961f-82ee72b054a4
* * gnu/gcj/runtime/natFirstThread.cc (run): Initialize class beforetromey2000-04-241-4/+3
| | | | | | | calling main. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33377 138bc75d-0d04-0410-961f-82ee72b054a4
* JVMPI changes...green2000-04-021-1/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sun Apr 2 08:27:18 2000 Anthony Green <green@redhat.com> * configure: Rebuilt. * configure.in: Add --disable-jvmpi. * include/config.h.in: Rebuilt. * acconfig.h: Add ENABLE_JVMPI. * include/jvm.h: Declare _Jv_DisableGC and _Jv_EnableGC. (_Jv_JVMPI_Notify_OBJECT_ALLOC): New define. (_Jv_JVMPI_Notify_THREAD_END): New define. (_Jv_JVMPI_Notify_THREAD_END): New define. * prims.cc (_Jv_JVMPI_Notify_OBJECT_ALLOC): Declare. (_Jv_JVMPI_Notify_THREAD_END): Declare. (_Jv_JVMPI_Notify_THREAD_END): Declare. * prims.cc (_Jv_AllocObject): Generate JVMPI object allocation events. * java/lang/natThread.cc: Include JVMPI headers if necessary. (finish_): Generate JVMPI thread end events. (run_): Generate JVMPI thread start events. * gnu/gcj/runtime/natFirstThread.cc (run): Call JNI_OnLoad for any preloaded JNI library. Include JVMPI headers if necessary. (run): Generate JVMPI thread start events. * boehm.cc: Define GC_disable and GC_enable. (_Jv_DisableGC): New function. (_Jv_EnableGC): New function. (disable_gc_mutex): Declare. * nogc.cc (_Jv_DisableGC): New function. (_Jv_EnableGC): New function. * jni.cc (_Jv_JNI_GetEnv): Handle JVMPI interface requests. (_Jv_JVMPI_Interface): Define. (jvmpiEnableEvent): New function. (_Jv_JNI_Init): Initialize _Jv_JVMPI_Interface. * include/jvmpi.h: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32866 138bc75d-0d04-0410-961f-82ee72b054a4
* * All files: Updated copyright information.tromey2000-03-073-3/+3
| | | | | | | | | * COPYING: New file. * COPYING.LIB: Removed. * LIBGCJ_LICENSE: We now use GPL + special exception. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32387 138bc75d-0d04-0410-961f-82ee72b054a4
* * configure.host: Fix __NO_MATH_INLNES botch.green2000-03-052-0/+103
| | | | | | | | | | | | | | | | * Makefile.in: Rebuilt. * Makefile.am (nat_source_files): Move natFirstThread.cc. (gnu/gcj/runtime/FirstThread.h): Moved. (ordinary_java_source_files): Move FirstThread.java. * prims.cc: Deal with FirstThread movement. (JvRunMain): Ditto. (_Jv_RunMain): Ditto. * gnu/gcj/runtime/FirstThread.java: Moved from java/lang. * gnu/gcj/runtime/natFirstThread.cc: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32348 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud