Commit Graph

105 Commits

Author SHA1 Message Date
Jakub Jelinek d652f226fc Update Copyright years for files modified in 2010.
From-SVN: r168438
2011-01-03 21:52:22 +01:00
Jason Merrill ae099258d3 name-lookup.c (current_decl_namespace): Non-static.
* name-lookup.c (current_decl_namespace): Non-static.
	(pop_nested_namespace): Sanity check.
	* cp-tree.h: Declare current_decl_namespace.
	* decl.c (grokvardecl): Use it instead of current_namespace.
	(grokfndecl): Likewise.
	* gnu/gcj/runtime/natSharedLibLoader.cc (findCore): Move
	declaration of _Jv_create_core out of the function.

From-SVN: r158074
2010-04-07 11:55:02 -04:00
Matthias Klose e1ab4b422f re PR libgcj/42676 (javah doesn't generate the header files as checked in in the archive)
2010-03-13  Matthias Klose  <doko@ubuntu.com>

        PR libgcj/42676
        * Regenerate .h files for anonymous inner classes.

From-SVN: r157422
2010-03-13 14:27:27 +00:00
Tom Tromey 3088dc29d1 Committed up-to-date .class and .h files from an earlier commit
From-SVN: r123890
2007-04-16 20:15:00 +00:00
Andrew Haley 0e055c1cd2 BootClassLoader.java (getBootURLLoader): New method.
2007-04-16  Andrew Haley  <aph@redhat.com>

        * gnu/gcj/runtime/BootClassLoader.java (getBootURLLoader): New
        method.
        (bootGetResource): Use getBootURLLoader() to load resources.
        (bootGetResources): Likewise.

        * java/lang/reflect/natMethod.cc (Method::invoke): In invoke also
        check that the method's declaring class is accessible.

From-SVN: r123862
2007-04-16 13:44:59 +00:00
Gary Benson a5c0f6fe87 URLClassLoader.java: Removed.
2007-01-15  Gary Benson  <gbenson@redhat.com>

	* java/net/URLClassLoader.java: Removed.
	* gnu/java/net/loader/Load_gcjlib.java: New file.
	* gnu/gcj/runtime/BootClassLoader.java: Ensure core
	URL handler is present in static executables.
	* sources.am, Makefile.in: Rebuilt.

From-SVN: r120791
2007-01-15 10:25:38 +00:00
Tom Tromey 97b8365caf Merged gcj-eclipse branch to trunk.
From-SVN: r120621
2007-01-09 19:58:05 +00:00
Andrew Haley 8f2cc5b59b natSharedLibLoader.cc (init): Don't set curLoader to VMClassLoader::bootLoader.
2006-07-28  Andrew Haley  <aph@redhat.com>

        * gnu/gcj/runtime/natSharedLibLoader.cc (init): Don't set
        curLoader to VMClassLoader::bootLoader.

From-SVN: r115797
2006-07-28 16:44:49 +00:00
David Daney 696dad4b6b gcj.texi (libgcj Runtime Properties): Document gnu.gcj.runtime.NameFinder.show_raw and...
2006-06-05  David Daney  <ddaney@avtrex.com>

	* gcj.texi (libgcj Runtime Properties): Document
	gnu.gcj.runtime.NameFinder.show_raw and
	gnu.gcj.runtime.NameFinder.remove_unknown.

2006-06-05  David Daney  <ddaney@avtrex.com>

	* gnu/gcj/runtime/NameFinder.java (show_raw): New field.
	(showRaw): New method.
	* stacktrace.cc : Include gnu/gcj/runtime/StringBuffer.h.
	(getLineNumberForFrame): Show IP offset in trace if line number
	not available and show_raw true.

From-SVN: r114437
2006-06-06 17:00:16 +00:00
Bryce McKinlay c1ef8ca9ac NameFinder.java (lookup): If exec'ing addr2line fails, don't try again.
2006-05-11  Bryce McKinlay  <mckinlay@redhat.com>

	* gnu/gcj/runtime/NameFinder.java (lookup): If exec'ing addr2line
	fails, don't try again.
	(use_addr2line): Field no longer final.

From-SVN: r113715
2006-05-11 23:20:07 +01:00
Bryce McKinlay 64c9036718 NameFinder.java (blacklist): New static field.
2006-05-11  Bryce McKinlay  <mckinlay@redhat.com>

	* gnu/gcj/runtime/NameFinder.java (blacklist): New static field.
	(lookup): If addr2line fails to find an address, flag the binary as
	having no debug info and avoid calling addr2line on it again.

From-SVN: r113711
2006-05-11 21:53:04 +01:00
Andrew Haley c6c097b26c natSharedLibLoader.cc (init): Remove debugging line.
2006-05-11  Andrew Haley  <aph@redhat.com>

        * gnu/gcj/runtime/natSharedLibLoader.cc (init): Remove debugging
        line.

From-SVN: r113693
2006-05-11 09:57:53 +00:00
Andrew Haley fdafd4613f prims.cc (_Jv_soleIndirectCompiledEngine): New.
2006-05-09  Andrew Haley  <aph@redhat.com>

        * prims.cc (_Jv_soleIndirectCompiledEngine): New.
        * include/execution.h (Jv_CompiledEngine::do_allocate_static_fields):
        Remove body.
        (_Jv_CompiledEngine::allocate_field_initializers): New.
        (_Jv_CompiledEngine::_Jv_CompiledEngine): Initialize
        allocate_field_initializers.
        (class _Jv_IndirectCompiledClass): New.
        (struct _Jv_IndirectCompiledEngine): New.
        * java/lang/Class.h: (IndirectCompiledEngine): New.
        * java/lang/natClassLoader.cc (_Jv_NewClassFromInitializer): Set
        engine to _Jv_soleIndirectCompiledEngine
        * link.cc (ensure_fields_laid_out): Call
        engine->allocate_field_initializers().

From-SVN: r113674
2006-05-10 17:17:20 +00:00
Tom Tromey b149e89e77 Class.h (JV_STATE_LOADING): Added comment.
* java/lang/Class.h (JV_STATE_LOADING): Added comment.
	* Makefile.in: Rebuilt.
	* Makefile.am (nat_source_files): Added natSystemClassLoader.cc.
	* gnu/gcj/runtime/natSystemClassLoader.cc: New file.
	* gnu/gcj/runtime/SystemClassLoader.java (nativeClasses):
	New field.
	(loadedClasses): Removed.
	(findClass): Declare.
	(addClass): Add to nativeClasses, not loadedClasses.

From-SVN: r113530
2006-05-04 15:29:22 +00:00
Tom Tromey 1f263074ea natSharedLibLoader.cc: Include gc.h later.
* gnu/gcj/runtime/natSharedLibLoader.cc: Include gc.h later.
	Include platform.h.  Set GC_DEBUG before including gc.h, if
	needed.

From-SVN: r113251
2006-04-25 15:20:33 +00:00
Bryce McKinlay 405827c59d re PR libgcj/27170 (Deadlock in garbage collector)
PR libgcj/27170
        * gnu/gcj/runtime/natSharedLibLoader.cc: Include gc.h to override
        dlopen(). From Anthony Green.

From-SVN: r113123
2006-04-21 00:47:56 +01:00
Bryce McKinlay 20cbfac4e9 SystemClassLoader.java (addClass): Get the value of package-private field "loadedClasses" using reflection.
* gnu/gcj/runtime/SystemClassLoader.java (addClass): Get the value
	of package-private field "loadedClasses" using reflection.
	* java/lang/VMCompiler.java (compileClass): Remove unreachable catch
	block.

From-SVN: r112858
2006-04-11 17:23:00 +01:00
Andrew Haley 24ca2a963a stacktrace.cc (GetStackTraceElements): Call gnu::gcj::runtime::NameFinder::removeUnknown() to determine if...
2006-02-16  Andrew Haley  <aph@redhat.com>

        * stacktrace.cc (GetStackTraceElements): Call
        gnu::gcj::runtime::NameFinder::removeUnknown() to determine if
        non-Java frames should be removed from a printed stack trace.
        Pass methodName to getLineNumberForFrame().
        (getLineNumberForFrame): Set method_name from info.dli_sname.
        * gnu/gcj/runtime/NameFinder.java (removeUnknown): New method.
        (remove_unknown): New variable.
        * include/java-stack.h (_Jv_StackTrace::getLineNumberForFrame):
        Add methodName arg.

From-SVN: r111181
2006-02-17 13:01:40 +00:00
Tom Tromey 1058a848dc natThread.cc (finish_): Don't clear 'group'.
* java/lang/natThread.cc (finish_): Don't clear 'group'.
	* sources.am, Makefile.in: Rebuilt.
	* java/lang/Runtime.java (exit): Merged with Classpath.
	(runShutdownHooks): New method from Classpath.
	* java/io/File.java (deleteOnExit): Use DeleteFileHelper, not
	FileDeleter.
	* gnu/gcj/runtime/FileDeleter.java: Removed.
	* java/lang/natRuntime.cc (runFinalizationForExit): New method.
	(exitInternal): Don't run finalizers or delete files.

From-SVN: r109400
2006-01-06 01:03:45 +00:00
Tom Tromey 2fb1388876 Class.h (_Jv_CopyClassesToSystemLoader): Updated.
* java/lang/Class.h (_Jv_CopyClassesToSystemLoader): Updated.
	* java/lang/natClassLoader.cc (_Jv_CopyClassesToSystemLoader):
	Changed argument type.  Use SystemClassLoader.addClass.
	* gnu/gcj/runtime/SystemClassLoader.java (addClass): New method.

From-SVN: r109340
2006-01-04 17:59:40 +00:00
Bryce McKinlay 0c9976393b BootClassLoader.java (BootClassLoader): Pass `null' parent ClassLoader to parent constructor.
2005-09-21  Bryce McKinlay  <mckinlay@redhat.com>

        * gnu/gcj/runtime/BootClassLoader.java (BootClassLoader): Pass
        `null' parent ClassLoader to parent constructor.
        * gnu/gcj/runtime/HelperClassLoader.java (HelperClassLoader): New
        constructor.

From-SVN: r104516
2005-09-22 01:21:52 +01:00
Kelley Cook 917b04f492 Update FSF address
From-SVN: r101453
2005-06-30 03:22:09 +00:00
Robin Green 832a0afe9c re PR libgcj/22189 (Table Full in gcj-dbtool if -m option used with smallest possible input)
2005-06-28  Robin Green  <greenrd@greenrd.org>

	PR java/22189
	* gnu/gcj/runtime/PersistentByteMap.java (init): Fix rounding
	error.

From-SVN: r101382
2005-06-28 14:31:22 +00:00
Tom Tromey 92b5fbc5ae SystemClassLoader.java (init): Clear last_was_sep in loop.
* gnu/gcj/runtime/SystemClassLoader.java (init): Clear
	last_was_sep in loop.

From-SVN: r100991
2005-06-15 19:05:43 +00:00
Tom Tromey 9c309ac9a4 SystemClassLoader.java (init): Handle empty element in path.
* gnu/gcj/runtime/SystemClassLoader.java (init): Handle empty
	element in path.

From-SVN: r99676
2005-05-13 20:20:56 +00:00
Andrew Pinski 2828ee690f NameFinder.java (close): IN, OUT, and PROC can all be null, check for that case and don't deference it.
2005-04-22  Andrew Pinski  <pinskia@physics.uc.edu>

        * gnu/gcj/runtime/NameFinder.java (close): IN, OUT, and PROC can all
        be null, check for that case and don't deference it.

From-SVN: r98573
2005-04-22 10:43:50 -07:00
Aaron Luchko ea1194ab2c re PR libgcj/20958 (Compile Errors In two files in gnu.gcj)
2005-04-12  Aaron Luchko  <aluchko@redhat.com>

	PR libgcj/20958
	* gnu/gcj/runtime/PersistentByteMap.java (close): Throw IOException.
	* gnu/gcj/tools/gcj_dbtool/Main.java (addJar): Make 'length' an int.

From-SVN: r98053
2005-04-13 00:22:14 +01:00
Tom Tromey ef87438639 natVMClassLoader.cc (getSystemClassLoaderInternal): Updated for name change.
* java/lang/natVMClassLoader.cc (getSystemClassLoaderInternal):
	Updated for name change.
	(nativeFindClass): New method.
	(loadClass): Use nativeFindClass.
	* java/lang/natClassLoader.cc (_Jv_FindClass): Use single-argument
	form of loadClass.
	* java/lang/VMClassLoader.java (tried_libraries, lib_control,
	LIB_FULL, LIB_CACHE, LIB_NEVER): New fields from old
	VMClassLoader.
	(initialize): New method.
	(nativeFindClass): Declare.
	* gnu/gcj/runtime/natVMClassLoader.cc: Removed.
	* gnu/gcj/runtime/VMClassLoader.java: Removed.
	* gnu/gcj/runtime/ExtensionClassLoader.java: Renamed from
	VMClassLoader.java.
	(definePackageForNative): Removed.
	(tried_libraries, LIB_CACHE, LIB_FULL, LIB_NEVER, lib_control):
	Moved to VMClassLoader.java.
	* prims.cc (_Jv_CreateJavaVM): Updated for renaming.
	* Makefile.am (gnu/gcj/runtime/ExtensionClassLoader.h): Renamed.
	(ordinary_java_source_files): Added ExtensionClassLoader.java,
	removed VMClassLoader.java.
	(nat_source_files): Removed natVMClassLoader.cc.

From-SVN: r97414
2005-04-01 19:19:13 +00:00
Tom Tromey 5ef0d62ff1 natRuntime.cc (insertSystemProperties): Set gnu.gcj.runtime.endorsed.dirs.
libjava:
	* java/lang/natRuntime.cc (insertSystemProperties): Set
	gnu.gcj.runtime.endorsed.dirs.
	* Makefile.in: Rebuilt.
	* Makefile.am (ordinary_java_source_files): Added
	HelperClassLoader.java.
	(AM_CXXFLAGS): Define GCJ_ENDORSED_DIRS.
	* gnu/gcj/runtime/VMClassLoader.java (VMClassLoader): Extends
	HelperClassLoader.
	(init): Use addDirectoriesFromProperty.
	* gnu/gcj/runtime/BootClassLoader.java (BootClassLoader): Extends
	HelperClassLoader.  Use addDirectoriesFromProperty.  Handle
	gnu.gcj.runtime.endorsed.dirs.
	* gnu/gcj/runtime/HelperClassLoader.java: New file.
gcc/java:
	* gcj.texi (libgcj Runtime Properties): Document
	gnu.gcj.runtime.endorsed.dirs.

From-SVN: r97212
2005-03-29 22:54:04 +00:00
Tom Tromey dc0a6205e6 natRuntime.cc (insertSystemProperties): Set gnu.gcj.runtime.endorsed.dirs.
libjava:
	* java/lang/natRuntime.cc (insertSystemProperties): Set
	gnu.gcj.runtime.endorsed.dirs.
	* Makefile.in: Rebuilt.
	* Makefile.am (ordinary_java_source_files): Added
	HelperClassLoader.java.
	(AM_CXXFLAGS): Define GCJ_ENDORSED_DIRS.
	* gnu/gcj/runtime/VMClassLoader.java (VMClassLoader): Extends
	HelperClassLoader.
	(init): Use addDirectoriesFromProperty.
	* gnu/gcj/runtime/BootClassLoader.java (BootClassLoader): Extends
	HelperClassLoader.  Use addDirectoriesFromProperty.  Handle
	gnu.gcj.runtime.endorsed.dirs.
	* gnu/gcj/runtime/HelperClassLoader.java: New file.
gcc/java:
	* gcj.texi (libgcj Runtime Properties): Document
	gnu.gcj.runtime.endorsed.dirs.

From-SVN: r97207
2005-03-29 21:47:03 +00:00
Tom Tromey b0966710ba BootClassLoader.java (BootClassLoader): Don't add sax and w3c libraries.
* gnu/gcj/runtime/BootClassLoader.java (BootClassLoader): Don't
	add sax and w3c libraries.
	* Makefile.am (libgij_la_LIBADD): Added libsax-gcj.la and
	libw3c-gcj.la.
	* external/w3c_dom/Makefile.in: Rebuilt.
	* external/w3c_dom/Makefile.am (libw3c_gcj_la_GCJFLAGS): Include
	AM_GCJFLAGS.
	(libw3c_gcj_la_LDFLAGS): New variable.
	(noinst_LTLIBRARIES): Renamed.
	* external/sax/Makefile.in: Rebuilt.
	* external/sax/Makefile.am (libsax_gcj_la_GCJFLAGS): Include
	AM_GCJFLAGS.
	(libsax_gcj_la_LDFLAGS): New variable.
	(noinst_LTLIBRARIES): Renamed.

From-SVN: r97004
2005-03-24 19:42:40 +00:00
Tom Tromey aa893047e8 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (AM_CXXFLAGS): Define TOOLEXECLIBDIR.
	(libgcj0_convenience_la_SOURCES): Don't include
	gnu_xml_source_files.
	(libgcj0_convenience_la_LIBADD): New variable.
	(libgcj_la_LIBADD): Don't include sax or w3c_dom.
	(all_java_source_files): javax_imageio_source_files,
	javax_xml_source_files, and gnu_java_beans_source_files.
	($(gnu_xml_source_files:.java=.lo)): Removed target.
	(gnu-xml.lo): New target.
	(javax-imageio.lo): Likewise.
	(javax-xml.lo): Likewise.
	(gnu-java-beans.lo): Likewise.
	(gnu_java_beans_source_files): New variable.
	(javax_imageio_source_files): Likewise.
	(javax_xml_source_files): Likewise.
	(javax_source_files): Moved files to other variable.
	(awt_java_source_files): Likewise.
	(ordinary_java_source_files): Added BootClassLoader.java.
	* java/lang/natVMClassLoader.cc (defineClass): Use boot loader,
	not system class loader.
	(initBootLoader): New method.
	(loadClass): Search bootLoader.
	* java/lang/natClassLoader.cc (_Jv_RegisterInitiatingLoader): Use
	boot loader, not system class loader.
	(_Jv_UnregisterInitiatingLoader): Likewise.
	(_Jv_FindClass): Likewise.  Ensure entries in
	bootstrap_class_list are unique.
	* java/lang/natClass.cc (getClassLoader): Don't special case
	system class loader.
	* java/lang/VMClassLoader.java (bootLoader): New field.
	(getResource): Use bootLoader.
	(getResources): Likewise.
	(initBootLoader): Declare.
	* gnu/gcj/runtime/BootClassLoader.java: New file.
	* external/sax/org/xml/sax/helpers/NamespaceSupport.java
	(EMPTY_ENUMERATION): Now package-private.
	* external/w3c_com/Makefile.in: Rebuilt.
	* external/w3c_com/Makefile.am (MULTIBUILDTOP): New variable.
	(w3c.jar): New target.
	(classes.stamp): Updated.
	(toolexeclib_LTLIBRARIES): Renamed from noinst_LTLIBRARIES.
	Changed name of library.
	(libw3c_gcj_la_SOURCES): New variable.
	(libw3c_gcj_la_GCJFLAGS): Likewise.
	(source_files): Renamed from lib3c_convenience_la_SOURCES.
	* external/sax/Makefile.in: Rebuilt.
	* external/sax/Makefile.am (MULTIBUILDTOP): New variable.
	(sax.jar): New target.
	(classes.stamp): Updated.
	(toolexeclib_LTLIBRARIES): Renamed from noinst_LTLIBRARIES.
	Changed name of library.
	(libsax_gcj_la_SOURCES): New variable.
	(libsax_gcj_la_GCJFLAGS): Likewise.
	(source_files): Renamed from libsax_convenience_la_SOURCES.
	* stacktrace.cc (non_system_trace_fn): Don't look at system class
	loader.
	* prims.cc (_Jv_CreateJavaVM): Initialize the bootstrap class
	loader.
	(_Jv_RunMain): Handle case where 'runtime' is NULL at exit.

From-SVN: r96960
2005-03-24 00:04:22 +00:00
Bryce McKinlay c0cbd60130 exception.cc: Remove stray MethodRef.h include.
2005-03-10  Bryce McKinlay  <mckinlay@redhat.com>

        * exception.cc: Remove stray MethodRef.h include.
        * java/lang/natClass.cc: Likewise.
        * gnu/gcj/runtime/MethodRef.java: Removed.
        * gnu/gcj/runtime/StackTrace.java, gnu/gcj/runtime/natNameFinder.cc,
        gnu/gcj/runtime/natStackTrace.cc: Really removed.
        * java/lang/natRuntime.cc (_load): Remove unsed variable.
        * Makefile.am (ordinary_java_source_files): Remove MethodRef.java.
        * Makefile.in: Rebuilt.

From-SVN: r96288
2005-03-11 04:30:20 +00:00
Bryce McKinlay 18744d9b72 New Stack Trace infrastructure.
2005-03-10  Bryce McKinlay  <mckinlay@redhat.com>

	New Stack Trace infrastructure.
	* Makefile.am (libgcj0_convenience_la_SOURCES): Add stacktrace.cc.
	(gnu/gcj/runtime/StackTrace.lo): Removed.
	(ordinary_java_source_files): Remove obsolete files.
	(nat_source_files): Remove obsolete files. Add natVMThrowable.cc.
	* configure.host (fallback_backtrace_h): Set backtrace header
	for mingw and cygwin targets.
	* configure.ac: Make symlink for fallback backtrace headers.
	* Makefile.in, configure: Rebuilt.
	* defineclass.cc (_Jv_ClassReader::read_one_code_attribute):
	Read 'LineNumberTable' attribute.
	(_Jv_ClassReader::read_one_class_attribute): Read 'SourceFile'
	attribute.
	(_Jv_ClassReader::handleCodeAttribute): Initialize method line
	table fields.
	* exception.cc: Remove unused include.
	* interpret.cc (DIRECT_THREADED, insn_slot): Moved to java-interp.h.
	(SAVE_PC): New macro. Save current PC in the interpreter frame.
	(NULLCHECK, NULLARRAYCHECK): Use SAVE_PC.
	(_Jv_InterpMethod::compile): Translate bytecode PC values in the line
	table to direct threaded instruction values.
	(_Jv_StartOfInterpreter, _Jv_EndOfInterpreter): Removed.
	(_Jv_InterpMethod::run): No longer member function. All
	callers updated. Remove _Unwind calls. Call SAVE_PC whenever a call
	is made or where an instruction could throw.
	(_Jv_InterpMethod::get_source_line): New. Look up source line numbers
	in line_table.
	* prims.cc (catch_segv): Construct exception after MAKE_THROW_FRAME.
	(catch_fpe): Likewise.
	* stacktrace.cc: New file. Stack trace code now here.
	* gnu/gcj/runtime/MethodRef.java:
	* gnu/gcj/runtime/NameFinder.java: Mostly reimplemented. Now simply
	calls addr2line to look up PC addresses in a given binary or shared
	library.
	* gnu/gcj/runtime/StackTrace.java, gnu/gcj/runtime/natNameFinder.cc,
	gnu/gcj/runtime/natStackTrace.cc: Removed.
	* gnu/java/lang/MainThread.java (call_main): Add comment warning that
	this function name is specially recognised by the stack trace code
	and shouldn't be changed.
	* include/java-interp.h (DIRECT_THREADED, insn_slot): Moved here.
	(struct  _Jv_LineTableEntry, line_table, line_table_len): New.
	(_Jv_InterpMethod::run): Update declaration.
	(_Jv_StackTrace_): New friend. NameFinder and StackTrace no longer
	friends.
	(_Jv_InterpFrame): Renamed from _Jv_MethodChain. Add PC field.
	* include/java-stack.h: New file. Declarations for stack tracing.
	* include/jvm.h (_Jv_Frame_info): Removed.
	* java/lang/Class.h: Update friend declarations.
	* java/lang/VMClassLoader.java (getSystemClassLoader): Simplify
	exception message.
	* java/lang/VMThrowable.java (fillInStackTrace): Now native.
	(getStackTrace): Now native.
	(data): New RawDataManaged field.
	* java/lang/natClass.cc: Update includes.
	(forName): Use _Jv_StackTrace::GetCallingClass for
	calling-classloader check.
	(getClassLoader): Likewise.
	* java/lang/natRuntime.cc: Update includes.
	(_load): Use _Jv_StackTrace::GetFirstNonSystemClassLoader.
	* java/lang/natVMSecurityManager.cc: Update includes.
	(getClassContext): Use _Jv_StackTrace::GetClassContext.
	* java/lang/natVMThrowable.cc: New file. Native methods for
	VMThrowable.
	* java/lang/reflect/natArray.cc: Update includes.
	(newInstance): Use _Jv_StackTrace::GetCallingClass to implement
	accessibility check.
	* java/lang/reflect/natConstructor.cc: Update includes.
	(newInstance): Use _Jv_StackTrace::GetCallingClass to implement
	accessibility check.
	* java/lang/reflect/natField.cc: Update includes.
	(getAddr): Use _Jv_StackTrace::GetCallingClass to implement
	accessibility check.
	* java/lang/reflect/natMethod.cc: Update includes.
	(invoke): Use _Jv_StackTrace::GetCallingClass to implement
	accessibility check.
	* java/util/natResourceBundle.cc: Update includes.
	(getCallingClassLoader): Use _Jv_StackTrace::GetCallingClass.
	* java/util/logging/natLogger.cc: Update includes. Use
	_Jv_StackTrace::GetCallerInfo to get call-site info.
	* sysdep/generic/backtrace.h: Fallback backtrace code. Stub
	implementation.
	* sysdep/i386/backtrace.h: New. Fallback backtrace code. i386
	implementation.

From-SVN: r96253
2005-03-10 19:02:21 +00:00
Tom Tromey 1b3b050918 SharedLibHelper.java (findHelper): Delete copied file on exit.
* gnu/gcj/runtime/SharedLibHelper.java (findHelper): Delete
	copied file on exit.

From-SVN: r95116
2005-02-16 21:39:11 +00:00
Andrew Haley 019dac3214 Subject.java (doAsPrivileged): If acc is null, create a new AccessControlContext.
2005-02-08  Andrew Haley  <aph@redhat.com>

        * javax/security/auth/Subject.java (doAsPrivileged): If acc is
        null, create a new AccessControlContext.
        * java/security/SecureClassLoader.java (protectionDomainCache):
        new field.
        (defineClass): Create a new protection domain and add it to our
        cache.

        * java/rmi/server/UnicastRemoteObject.java (exportObject): Call
        addStub() to keep track of the stub we've exported.
        (unexportObject): Call deleteStub().
        * java/rmi/server/RemoteObject.java (stubs): New field.
        (addStub): New method.
        (deleteStub): New method.
        (toStub): Rewrite.

        * java/lang/VMCompiler.java (loadSharedLibrary): Pass
        true to findHelper (tryParents).
        * gnu/gcj/runtime/SharedLibLoader.java (SharedLibLoader):
        Likewise.
        * java/net/URLClassLoader.java (SoURLLoader): Likewise.
        * gnu/gcj/runtime/SharedLibHelper.java (SharedLibHelper): Pass
        ProtectionDomain.
        If tryParents is false, don't scan parent class loaders.

        * java/security/Permissions.java (PermissionsHash.implies):
        Iterate over the collection and invoke implies() on each
        element.

From-SVN: r95111
2005-02-16 18:51:25 +00:00
Andrew Haley d2638db653 PersistentByteMap.java (name, values, fc): new fields.
2005-02-16  Andrew Haley  <aph@redhat.com>

        * gnu/gcj/runtime/PersistentByteMap.java (name, values, fc): new
        fields.
        (PersistentByteMap): Set name
        Magic number changed to 0x67636a64 ("gcjd").
        (init): Force the map to be prime.
        (emptyPersistentByteMap): File name was a string, now a File.
        (addBytes): Share srings between entries.
        (stringTableSize): New method.
        (capacity): Scale by load factor.
        (force): New method.
        (getFile): New method.
        (close): New method.
        (putAll): New method.
        (ByteWrapper): New class.
        * gnu/gcj/tools/gcj_dbtool/Main.java (verbose): New field.
        (main): Guess the average string size as 32, not 64.
        Copy a database before modifying it, so that we can update a
        database in a running system.
        If a database isn't big enough, resize it.
        "-m": new option: merges databases.
        "-a": Create a new detabase if it doesn't exist.
        (usage): Correct, add new option.
        (addJar): Copy a database before modifying it.
        (resizeMap): New method.

From-SVN: r95110
2005-02-16 17:32:59 +00:00
Mark Wielaard 0008978072 Fixes bug libgcj/8170
Fixes bug libgcj/8170
       * java/lang/ClassLoader.java (loadClass): Don't rewrap
       ClassNotFoundException.
       * gnu/java/lang/MainThread.java (run): Chain NoClassDefFoundError.
       * gnu/gcj/runtime/NameFinder.java (remove_interpreter): Removed.
       (remove_internal): New field superceding remove_interpreter.
       (sanitizeStack): Remove all no-package classes starting with "_Jv_".
       Remove no-class methods starting with "_Jv_". And Replace null
       class or method names with the empty string. Stop at either the
       MainThread or a real Thread run() method.
       (newElement): Made static.
       * java/net/URLClassLoader.java (findClass): Throw
       ClassNotFoundExceptions including urls, plus parent using toString().
       (thisString): New field.
       (toString): New method.

From-SVN: r94935
2005-02-12 13:51:11 +00:00
Tom Tromey 6d27fe75d0 re PR libgcj/19681 (extension loading currently incorrect)
PR libgcj/19681:
	* Makefile.in: Rebuilt.
	* Makefile.am (ordinary_java_source_files): Added new class.
	* java/lang/natVMClassLoader.cc (getSystemClassLoaderInternal):
	Use system_instance, not instance.
	* gnu/gcj/runtime/SystemClassLoader.java: New file.
	* gnu/gcj/runtime/VMClassLoader.java (init): Don't search
	java.class.path.
	(system_instance): New field.
	(initialize): Initialize the system loader as well.
	(VMClassLoader): Default to LIB_CACHE.

From-SVN: r94611
2005-02-02 20:59:41 +00:00
Tom Tromey c7273283df PersistentByteMap.java: Fixed typo.
* gnu/gcj/runtime/PersistentByteMap.java: Fixed typo.
	* prims.cc: Fixed comment.

From-SVN: r94592
2005-02-02 16:19:45 +00:00
Tom Tromey af84b3d056 VMCompiler.java (compileClass): Ignore UnknownError.
* java/lang/VMCompiler.java (compileClass): Ignore UnknownError.
	* gnu/gcj/runtime/natSharedLibLoader.cc (finalize): Only dlclose
	if 'handler' is valid.

From-SVN: r93927
2005-01-19 23:56:27 +00:00
Tom Tromey 3fd8010046 PR libgcj/12016, PR libgcj/18405, PR libgcj/17738:
* java/lang/Package.java (getPackages): Use VMClassLoader when
	appropriate.
	(getPackage): Likewise.
	* prims.cc (_Jv_CreateJavaVM): Call
	_Jv_RegisterBootstrapPackages.
	* include/jvm.h (_Jv_RegisterBootstrapPackages): Declare.
	* java/lang/VMClassLoader.java (getPackage): Rewrote.
	(getPackages): Likewise.
	(definedPackages): New field.
	(definePackageForNative): New method.
	* java/lang/Class.h (_Jv_FindClassInCache): Updated.
	* java/lang/natVMClassLoader.cc (loadClass): Updated.
	* defineclass.cc (handleClassBegin): Use
	ClassLoader.findLoadedClass.
	* java/lang/natClassLoader.cc (_Jv_RegisterInitiatingLoader):
	Rewrote.
	(struct _Jv_LoaderInfo): Removed.
	(initiated_classes): Likewise.
	(_Jv_UnregisterClass): Don't use initiated_classes.
	(_Jv_FindClassInCache): Likewise.  Removed 'loader' argument.
	(_Jv_FindClass): Register classes found during boostrap.
	(BOOTSTRAP_CLASS_LIST_SIZE): New define.
	(bootstrap_class_list): New global.
	(bootstrap_index): Likewise.
	(_Jv_RegisterBootstrapPackages): New function.
	* gnu/gcj/runtime/natVMClassLoader.cc (findClass): Call
	definePackageForNative.
	(findClass): Updated.
	* gnu/gcj/runtime/VMClassLoader.java (definePackageForNative):
	New method.

From-SVN: r93155
2005-01-10 19:39:26 +00:00
Tom Tromey 367390404d * Merged gcj-abi-2-dev-branch to trunk.
(Actual changes too large to list in the commit message;
see ChangeLog.)

From-SVN: r91270
2004-11-25 03:47:08 +00:00
Andrew Haley 963ebe78d4 re PR libgcj/18036 (Bad interaction between interpreter and Class.forName())
2004-10-18  Andrew Haley  <aph@redhat.com>

        PR java/18036:
        * gnu/gcj/runtime/natStackTrace.cc (fillInStackTrace): Reorganize
        and correct logic used to find interpreter.

From-SVN: r89221
2004-10-18 14:07:42 +00:00
Andrew Haley 180a373d0d interpret.cc (_Jv_InterpMethod::run): Initialize _Jv_StartOfInterpreter.
2004-10-13  Andrew Haley  <aph@redhat.com>

        * interpret.cc (_Jv_InterpMethod::run): Initialize
        _Jv_StartOfInterpreter.
        (_Jv_StartOfInterpreter, _Jv_EndOfInterpreter): Functions removed.
        (_Jv_StartOfInterpreter, _Jv_EndOfInterpreter): New variables.
        * gnu/gcj/runtime/natStackTrace.cc (fillInStackTrace): Use
        _Unwind_FindEnclosingFunction to discover whether PC is within the
        interpreter.

From-SVN: r89037
2004-10-14 15:21:13 +00:00
Bryce McKinlay 31a7b75558 re PR awt/16748 (IAA.ImageComponentsTest: Freezes When Window Is Resized)
2004-07-11  Bryce McKinlay  <mckinlay@redhat.com>

	PR libgcj/16748
	* prims.cc (_Jv_CreateJavaVM): Fix comment.
	* gnu/gcj/runtime/FinalizerThread.java (init): New. Native.
	(finalizerReady): Now native.
	(run): Likewise.
	(runFinalizers): Removed.
	* gnu/gcj/runtime/natFinalizerThread.cc (run): Implement here. Use
	a primitive lock, and don't hold it while running the finalizers.
	(runFinalizers): Implement. Don't aquire any Java lock.
	(finalizerReady): Use lock primitives to signal finalizer thread.

From-SVN: r84531
2004-07-11 22:19:47 +01:00
Bryce McKinlay a1433c46a1 VMClassLoader.java (init): Check classpath entry before passing to URL constructor.
2004-07-05  Bryce McKinlay  <mckinlay@redhat.com>

	* gnu/gcj/runtime/VMClassLoader.java (init): Check classpath entry
	before passing to URL constructor. Rethrow any MalformedURLException
	as a RuntimeException. Catch MalformedURLException specifically, not
	all exceptions.

From-SVN: r84138
2004-07-06 00:18:14 +01:00
Michael Koch 74fa958ec7 FirstThread.java, [...]: Removed.
2004-07-04  Michael Koch  <konqueror@gmx.de>

	* gnu/gcj/runtime/FirstThread.java,
	gnu/gcj/runtime/natFirstThread.cc: Removed.
	* gnu/java/lang/MainThread.java,
	gnu/java/lang/natMainThread.cc: New files.
	* prims.cc (_Jv_RunMain): Use MainThread instead of FirstThread.
	* Makefile.am: Added new files and removed deleted ones.
	* Makefile.in: Regenerated.

From-SVN: r84085
2004-07-04 15:27:05 +00:00
Ranjit Mathew 6ca77e6fa4 VMClassLoader.java (init): Add extensions directory only if it actually exists.
* gnu/gcj/runtime/VMClassLoader.java (init): Add extensions
        directory only if it actually exists.

From-SVN: r83347
2004-06-18 13:53:19 +00:00
Anthony Green 794c3bee30 Add extension directory contents to the class path.
From-SVN: r83291
2004-06-17 13:30:32 +00:00