aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/lang
AgeCommit message (Collapse)AuthorFilesLines
2006-05-18Imported GNU Classpath 0.90Mark Wielaard8-3/+481
Imported GNU Classpath 0.90 * scripts/makemake.tcl: LocaleData.java moved to gnu/java/locale. * sources.am: Regenerated. * gcj/javaprims.h: Regenerated. * Makefile.in: Regenerated. * gcj/Makefile.in: Regenerated. * include/Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated. * gnu/java/lang/VMInstrumentationImpl.java: New override. * gnu/java/net/local/LocalSocketImpl.java: Likewise. * gnu/classpath/jdwp/VMMethod.java: Likewise. * gnu/classpath/jdwp/VMVirtualMachine.java: Update to latest interface. * java/lang/Thread.java: Add UncaughtExceptionHandler. * java/lang/reflect/Method.java: Implements GenericDeclaration and isSynthetic(), * java/lang/reflect/Field.java: Likewise. * java/lang/reflect/Constructor.java * java/lang/Class.java: Implements Type, GenericDeclaration, getSimpleName() and getEnclosing*() methods. * java/lang/Class.h: Add new public methods. * java/lang/Math.java: Add signum(), ulp() and log10(). * java/lang/natMath.cc (log10): New function. * java/security/VMSecureRandom.java: New override. * java/util/logging/Logger.java: Updated to latest classpath version. * java/util/logging/LogManager.java: New override. From-SVN: r113887
2006-05-17re PR libgcj/27352 (SecurityManager.checkPermission() called unnecessarily)Bryce McKinlay1-7/+16
PR libgcj/27352 * java/lang/Class.java (getClassLoaderInternal): New method. (forName (String, Class)): Use getClassLoaderInternal. (getPackage): Likewise. (getResource): Likewise. (getResourceAsStream): Likewise. (desiredAssertionStatus): Likewise. From-SVN: r113863
2006-05-13sources.am, [...]: Rebuilt.Tom Tromey4-312/+25
* sources.am, Makefile.in: Rebuilt. * java/util/logging/LogManager.java: Removed. * java/util/logging/Logger.java (resetLogger): New method, from Classpath. * java/io/RandomAccessFile.java: Removed. * gnu/java/nio/channels/FileChannelImpl.java (create): New method. (FileChannelImpl): Now private. * java/io/FileInputStream.java: Removed. * java/io/FileOutputStream.java: Removed. * java/security/AccessControlContext.java: Removed. * java/lang/ThreadLocal.java: Removed. * java/lang/InheritableThreadLocal.java: Removed. * java/lang/Thread.java (locals): New field. (getThreadLocals): New method. * java/lang/natThread.cc (finish_): Clear 'locals'. From-SVN: r113735
2006-05-10natClassLoader.cc: Add comments.Andrew Haley1-0/+24
2006-05-10 Andrew Haley <aph@redhat.com> * java/lang/natClassLoader.cc: Add comments. From-SVN: r113677
2006-05-10prims.cc (_Jv_soleIndirectCompiledEngine): New.Andrew Haley2-0/+4
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-05re PR libgcj/27294 (gij throws NullPointerException, when the interpreter is ↵Tom Tromey1-1/+16
not enabled) PR libgcj/27294: * java/lang/natVMClassLoader.cc (defineClass): Throw VirtualMachineError if no interpreter configured. From-SVN: r113554
2006-05-04[multiple changes]Andrew Haley3-3/+26
2006-05-04 Andrew Haley <aph@redhat.com> * class.c (make_field_value): Always build_address_of fdecl if there is an initializer. 2006-05-03 Andrew Haley <aph@redhat.com> PR libgcj/27352 * expr.c (maybe_rewrite_invocation): New function. (rewrite_arglist_getclass): Likewise. (rules): New. (expand_invoke): Call maybe_rewrite_invocation. * parse.y (patch_invoke): Likewise. * java-tree.h: (maybe_rewrite_invocation): New function. 2006-05-03 Andrew Haley <aph@redhat.com> PR libgcj/27352 * java/lang/Class.java (getClassLoader(Class)): New. forName(String, Class): New. * java/lang/natClass.cc (getClassLoader(Class)): New. 2006-05-02 Andrew Haley <aph@redhat.com> * prims.cc (_Jv_NewMultiArray): Check for phantom class. From-SVN: r113532
2006-05-04Class.h (JV_STATE_LOADING): Added comment.Tom Tromey1-0/+8
* 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-04-25natClassLoader.cc: Don't include link.h or dladdr.h.Andrew Haley1-5/+0
2006-04-25 Andrew Haley <aph@redhat.com> * java/lang/natClassLoader.cc: Don't include link.h or dladdr.h. * boehm.cc: Don't include link.h. (_Jv_RegisterLibForGc): Cast away const when calling dladdr(). From-SVN: r113246
2006-04-24* java/lang/natClass.cc (_Jv_getInterfaceMethod): Skip <clinit>.Tom Tromey1-5/+12
From-SVN: r113229
2006-04-24lang.c (java_init): Handle flag_indirect_classes.Andrew Haley2-8/+59
2006-04-21 Andrew Haley <aph@redhat.com> * lang.c (java_init): Handle flag_indirect_classes. * jvgenmain.c: Use "class$$" instead of "class$". * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as DECLs. (mangle_class_field): Special case "class$$" as well as "class$". * constants.c (build_ref_from_constant_pool): If flag_indirect_classes, generate a ref into the heap. * decl.c (constants_field_decl_node, constants_data_field_decl_node): New. * class.c (build_static_class_ref): New. (build_classdollar_field): Factor out from build_class_ref(). (make_field_value): Handle static fields in heap. (make_class_data): Make sure we get a static ref to class. Make class initializer const if flag_indirect_classes. (register_class): Build a class_ref for initialization if flag_indirect_classes. (emit_indirect_register_classes): New. 2006-04-21 Andrew Haley <aph@redhat.com> * include/execution.h (struct _Jv_CompiledEngine): Define for compiled classes. * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Call _Jv_RegisterLibForGc. (_Jv_RegisterClasses_Counted): Likewise. (_Jv_NewClassFromInitializer): New. (_Jv_RegisterNewClasses): New. * sources.am: Regenerate. * boehm.cc (_Jv_GC_has_static_roots): new. (_Jv_InitGC): Call GC_register_has_static_roots_callback. (filename_node, find_file, _Jv_print_gc_store, new_node, _Jv_GC_has_static_roots, _Jv_RegisterLibForGc): New. * scripts/makemake.tcl: Add -fno-indirect-classes. * Makefile.in: Regenerate. * link.cc (resolve_pool_entry): Allocate constant pool. Allocate fields. From-SVN: r113224
2006-04-11SystemClassLoader.java (addClass): Get the value of package-private field ↵Bryce McKinlay1-5/+0
"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-04re PR classpath/26990 (SecurityManager.checkExit() problem)Tom Tromey1-2/+13
PR libgcj/26990: * prims.cc (_Jv_RunMain): Use exitNoChecksAccessor. * gnu/java/lang/natMainThread.cc (call_main): Use exitNoChecksAccessor. * testsuite/libjava.lang/pr26990.out: New file. * testsuite/libjava.lang/pr26990.java: New file. * java/lang/Runtime.java (exitNoChecks): New method. (exitNoChecksAccessor): Likewise. (exit): Call exitNoChecks. From-SVN: r112685
2006-03-28unicode-muncher.pl: Removed this file.Anthony Balkissoon2-7/+740
2006-03-28 Anthony Balkissoon <abalkiss@redhat.com> * scripts/unicode-muncher.pl: Removed this file. * scripts/MakeCharTables.java: Likewise. * scripts/unicode-to-chartables.pl: New file. * java/lang/natCharacter.cc: (UNASSIGNED_TYPE): New field. (UNASSIGNED_DIGIT): Likewise. (UNASSIGNED_DIRECTION): Likewise. (UNASSIGNED_NUMERIC_VALUE): Likewise. (PRIVATE_TYPE): Likewise. (PRIVATE_DIRECTION): Likewise. (readCodePoint): New method. (getType(jint)): Likewise. (toLowerCase(jint)): Likewise. (toUpperCase(jint)): Likewise. (toTitleCase(jint)): Likewise. (digit(jint, jint)): Likewise. (getNumericValue(jint)): Likewise. (getDirectionality(jint)): Likewise. (readChar), (getType(jchar)), (toLowerCase(jchar)), (toUpperCase(jchar)), (toTitleCase(jchar)), (digit(jchar, jint)), (getNumericValue(jchar)), (getDirectionality(jchar)): Changed references from data to data[0], blocks to blocks[0], direction to direction[0], numValue to numValue[0], upper to upper[0], lower to lower[0], and shift to shift[0] to reflect the new structures in java-chartables.h. * java/lang/Character.java: (readCodePoint): Declared new native method. (getType(int)): Likewise. (toLowerCase(int)): Likewise. (toUpperCase(int)): Likewise. (toTitleCase(int)): Likewise. (digit(int, int)): Likewise. (getNumericValue(int)): Likewise. (getDirectionality(int)): Likewise. (isLowerCase(int)): New method. (isUpperCase(int)): Likewise. (itTitleCase(int)): Likewise. (isDigit(int)): Likewise. (isDefined(int)): Likewise. (isLetter(int)): Likewise. (isLetterOrDigit(int)): Likewise. (isJavaIdentifierStart(int)): Likewise. (isJavaIdentifierPart(int)): Likewise. (isUnicodeIdentifierStart(int)): Likewise. (isUnicodeIdentifierPart(int)): Likewise. (isIdentifierIgnorable(int)): Likewise. (isSpaceChar(int)): Likewise. (isWhitespace(int)): Likewise. (isISOControl(int)): Likewise. (isMirrored(int)): Likewise. * include/java-chartables.h: Generated from scripts/unicode-to-chartables.h. From-SVN: r112454
2006-03-10Imported GNU Classpath 0.90Mark Wielaard3-271/+1589
Imported GNU Classpath 0.90 * scripts/makemake.tcl: Set gnu/java/awt/peer/swing to ignore. * gnu/classpath/jdwp/VMFrame.java (SIZE): New constant. * java/lang/VMCompiler.java: Use gnu.java.security.hash.MD5. * java/lang/Math.java: New override file. * java/lang/Character.java: Merged from Classpath. (start, end): Now 'int's. (canonicalName): New field. (CANONICAL_NAME, NO_SPACES_NAME, CONSTANT_NAME): New constants. (UnicodeBlock): Added argument. (of): New overload. (forName): New method. Updated unicode blocks. (sets): Updated. * sources.am: Regenerated. * Makefile.in: Likewise. From-SVN: r111942
2006-03-10re PR libgcj/23495 (java.lang.String.equals is suboptimal)Tom Tromey1-57/+37
PR libgcj/23495: * java/lang/natString.cc (_Jv_NewString): Use memcpy. (equals): Use memcmp. (contentEquals): Likewise. (getChars): Use memcpy. (toCharArray): Likewise. (regionMatches): Use memcmp. (regionMatches): Likewise. (startsWith): Likewise. (concat): Use memcpy. (valueOf): Likewise. From-SVN: r111919
2006-03-09win32.cc (_Jv_platform_nanotime): New function.Tom Tromey2-2/+17
* win32.cc (_Jv_platform_nanotime): New function. * include/win32.h (_Jv_platform_nanotime): Declare. * posix.cc (_Jv_platform_nanotime): New function. * include/posix.h (_Jv_platform_nanotime): Declare. * java/lang/natSystem.cc (nanoTime): New method. * java/lang/System.java (nanoTime): Declare. * include/config.h.in, configure: Rebuilt. * configure.ac: Check for clock_gettime. From-SVN: r111869
2006-03-07re PR libgcj/26103 (Wrong exception thrown)Tom Tromey2-3/+6
PR libgcj/26103: * java/lang/ClassLoader.java (loadClass): Don't throw StringIndexOutOfBoundsException if name is empty. * java/lang/natClassLoader.cc (loadClassFromSig): Throw exception if class not found. From-SVN: r111820
2006-03-01re PR libgcj/24321 (instanceof erroneously causes class initialization)Tom Tromey1-3/+3
PR java/24321: * testsuite/libjava.lang/pr24321.java: New file. * testsuite/libjava.lang/pr24321.out: New file. * java/lang/natClass.cc (isInstance): Don't initialize class. (isAssignableFrom): Likewise. From-SVN: r111603
2006-02-09Class.h (_Jv_IDispatchTable): Make it a struct.Bryce McKinlay2-27/+22
2006-02-09 Bryce McKinlay <mckinlay@redhat.com> * java/lang/Class.h (_Jv_IDispatchTable): Make it a struct. Put 'itable' inline, instead of as a pointer. (java::lang::Class): Put 'idt' in anonymous union with 'ioffsets'. * link.cc (null_idt): Update definition. (_Jv_Linker::prepare_constant_time_tables): Allocate klass->idt as a single struct. Use _Jv_AllocBytes, not _Jv_AllocRawObj. (_Jv_Linker::generate_itable): Update to use 'ioffsets'. (_Jv_Linker::find_iindex): Likewise. Update comment. * java/lang/natClass.cc (_Jv_LookupInterfaceMethodIdx): Update for _Jv_IDispatchTable change. (_Jv_IsAssignableFrom): Likewise. From-SVN: r110818
2006-02-09re PR libgcj/25187 (dereferencing type-punned pointer warnings while ↵Bryce McKinlay3-5/+9
building libgcj) 2006-02-08 Bryce McKinlay <mckinlay@redhat.com> PR libgcj/25187: * gnu/gcj/io/natSimpleSHSStream.cc (gnu::gcj::io::SimpleSHSStream::shsFinal): Remove bogus cast. * interpret.cc (_Jv_InterpMethod::run): Simplify arguments to _Jv_InterpFrame(). * boehm.cc: #undef some autoconf macros before including gc-config.h. (_Jv_MarkObject): Don't mark the class, it is reachable via the vtable. (_Jv_MarkArray): Likewise. * java/lang/ref/natReference.cc (java::lang::ref::Reference::create): Simplify _Jv_GCRegisterDisappearingLink() call. * java/lang/Class.h (getComponentType): Use element_type. (element_type): New field declaration, as a union with "methods". * java/lang/natClassLoader.cc (_Jv_NewArrayClass): Use "element_type". * java/net/natVMNetworkInterfacePosix.cc (java::net::VMNetworkInterface::getInterfaces): Add "int" cast to avoid sign comparison warning. * include/java-interp.h (_Jv_InterpFrame): Take thread as second argument, not parent call frame. * include/x86_64-signal.h (MAKE_THROW_FRAME): Use "gregs" directly, without a cast. (restore_rt): Declare with hidden visibility, not "static". * posix.cc (_Jv_platform_initProperties): Make "tmpdir" a string constant. * jni.cc (_Jv_JNI_DestroyJavaVM): Use a union to avoid strict alias warning From-SVN: r110783
2006-02-08link.cc (_Jv_Linker::print_class_loaded): Declare string constants as "const ↵Bryce McKinlay1-2/+2
char *". 2006-02-08 Bryce McKinlay <mckinlay@redhat.com> * link.cc (_Jv_Linker::print_class_loaded): Declare string constants as "const char *". * verify.cc (verify_fail): Likewise. * gnu/classpath/natSystemProperties.cc (file_encoding): Likewise. * interpret.cc (throw_internal_error, throw_class_format_error): Likewise. * gcj/javaprims.h (_Jv_hashUtf8String, _Jv_Utf8Const::space_needed, _Jv_Utf8Const::init, _Jv_makeUtf8Const): Likewise. * java/lang/Class.h (_Jv_InitPrimClass): Likewise. * include/jvm.h (_Jv_strLengthUtf8, _Jv_makeUtf8Const): Likewise. * defineclass.cc (throw_internal_error, throw_no_class_def_found_error, is_attribute_name): Likewise. * prims.cc (_Jv_strLengthUtf8, _Jv_hashUtf8String, _Jv_Utf8Const::init, _Jv_makeUtf8Const, _Jv_InitPrimClass): Likewise. From-SVN: r110767
2006-02-08re PR java/22578 (should inline floatToIntBits et al)Tom Tromey6-1109/+229
gcc/java PR java/22578: * check-init.c (check_init): Handle VIEW_CONVERT_EXPR. * builtins.c (convert_real): New function. (java_builtins): Handle Float.intBitsToFloat, Float.floatToRawIntBits, Double.longBitsToDouble, Double.doubleToRawLongBits. libjava PR java/22578: * gcj/javaprims.h: Updated. * sources.am, Makefile.in: Rebuilt. * java/lang/natDouble.cc (doubleToLongBits): Moved to VMDouble. (doubleToRawLongBits): Likewise. (longBitsToDouble): Likewise. (toString): Likewise. (parseDouble): Likewise. * java/lang/natFloat.cc (floatToIntBits): Moved to VMFloat. (floatToRawIntBits): Likewise. (intBitsToFloat): Likewise. * java/lang/VMDouble.java: New file. * java/lang/VMFloat.java: New file. * java/lang/Float.java, java/lang/Double.java: Removed. From-SVN: r110759
2006-02-012006-02-01 Robert Schuster <robertschuster@fsfe.org>Robert Schuster3-3/+42
* link.cc: (_Jv_Linker::find_field_helper): Added checks. (_Jv_Linker::find_field): Use exception swallowing class resolution and added early return. (_Jv_ThrowNoClassDefFoundErrorTrampoline): New function. (_Jv_Linker::link_symbol_table): Use exception swallowing class resolution, added ffi_closure installation routine, use _Jv_ThrowNoClassDefFoundError for missing static method. (_Jv_Linker::ensure_class_linked): Added string check which does not trigger class resolution. * java/lang/natClassLoader.cc: (_Jv_FindClassNoException): New method. * java/lang/Class.h: (_Jv_FindClassNoException): New method declaration. * include/jvm.h: (_Jv_FindClassNoException): New method declaration. (_Jv_FindClassFromSignatureNoException): New method declaration. * prims.cc: (_Jv_FindClassFromSignatureNoException): New method. * gcj/javaprims.h: (_Jv_equalsUtf8Classname): New method declaration. (_Jv_isPrimitiveOrDerived): Dito. * prims.cc: (_Jv_equalsUtf8Classnames): New method. (_Jv_isPrimitiveOrDerived): New method. * verify.cc: (ref_intersection::equals): Use new classname comparison method. (type::compatible): Use new classname comparison method. Added check whether LHS' type is java.lang.Object . (type::resolve): Added new optional debug message and simplified if-expression. (type::to_array): Added codepath that generates an array type without resolving the element type. From-SVN: r110474
2006-01-23Class.h (_Jv_FindInterpreterMethod): Add new declaration.Keith Seitz2-5/+42
* java/lang/Class.h (_Jv_FindInterpreterMethod): Add new declaration. * java/lang/natClass.cc (_Jv_FindInterpreterMethod): New function. From-SVN: r110142
2006-01-09Character.java (toChars,toCodePoint): Correct these methods to use ↵Chris Burdess1-5/+6
algorithms from Unicode specification. 2006-01-08 Chris Burdess <dog@gnu.org> * java/lang/Character.java (toChars,toCodePoint): Correct these methods to use algorithms from Unicode specification. From-SVN: r109516
2006-01-09StringBuilder.java (appendCodePoint): New method.Tom Tromey5-31/+372
* java/lang/StringBuilder.java (appendCodePoint): New method. (insert): New overloads. * java/lang/StringBuffer.java (StringBuffer): New constructor. (charAt): Remerged javadoc. (codePointAt, codePointBefore): New methods. (appendCodePoint): New method. (append): New overloads. (insert): Likewise. (trimToSize, codePointCount, offsetByCodePoints): New methods. * java/lang/Float.java (SIZE): New field. (valueOf): New method. * java/lang/natDouble.cc (initIDs): Removed. * java/lang/Double.java (static initializer): Removed. (SIZE): New field. (valueOf): New method. (initIDs): Removed. From-SVN: r109497
2006-01-07Character.java (SIZE, [...]): New fields from Classpath.Tom Tromey3-8/+412
* java/lang/Character.java (SIZE, MAX_CACHE, charCache, MIN_SURROGATE, MAX_SURROGATE): New fields from Classpath. (MIN_HIGH_SURROGATE, MAX_HIGH_SURROGATE, MIN_LOW_SURROGATE, MAX_LOW_SURROGATE): Javadoc fixes. (valueOf, reverseBytes, isHighSurrogate, isLowSurrogate, isSurrogatePair, toCodePoint, codePointAt, codePointBefore): New methods from Classpath. * java/lang/String.java (codePointAt, codePointBefore, codePointCount, contains, replace): New methods from Classpath. (contentEquals): Declare. * java/lang/natString.cc (contentEquals): New method. From-SVN: r109445
2006-01-06natThread.cc (finish_): Don't clear 'group'.Tom Tromey3-51/+89
* 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-05* java/lang/natPosixProcess.cc (reap): Ignore unknown children.Tom Tromey1-6/+3
From-SVN: r109383
2006-01-04Class.h (_Jv_CopyClassesToSystemLoader): Updated.Tom Tromey2-6/+22
* 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
2005-12-22natClassLoader.cc (_Jv_NewArrayClass): Don't reference NUM_OBJECT_METHODS.Tom Tromey1-2/+0
* java/lang/natClassLoader.cc (_Jv_NewArrayClass): Don't reference NUM_OBJECT_METHODS. * include/jvm.h (NUM_OBJECT_METHODS): Removed. From-SVN: r108956
2005-12-16Class.java (getPackage): Get package from VMClassLoader if needed.Tom Tromey1-3/+3
* java/lang/Class.java (getPackage): Get package from VMClassLoader if needed. From-SVN: r108685
2005-12-12VMCompiler.java: Directly generate a new instance of ↵Andrew Haley1-16/+12
gnu.java.security.provider.MD5. 2005-12-12 Andrew Haley <aph@redhat.com> * java/lang/VMCompiler.java: Directly generate a new instance of gnu.java.security.provider.MD5. From-SVN: r108421
2005-12-08Object.h (throwNoSuchMethodError): New method.Andrew Haley2-0/+11
2005-12-08 Andrew Haley <aph@redhat.com> * java/lang/Object.h (throwNoSuchMethodError): New method. * java/lang/Object.java (throwNoSuchMethodError): New method. * include/jvm.h (_Jv_ThrowNoSuchFieldError): Declare. * link.cc (_Jv_ThrowNoSuchFieldError): New. (link_symbol_table): Don't throw a NoSuchFieldError if a field is missing. Instead, set the otable entry to zero. (link_symbol_table): If we don't find a nonstatic method, insert the vtable offset of Object.throwNoSuchMethodError() into the otable. From-SVN: r108231
2005-11-08PR libgcj/23763. From aeby@graeff.com.Tom Tromey1-1/+7
* java/lang/natPosixProcess.cc (nativeSpawn): Unblock SIGCHLD before exec. From-SVN: r106655
2005-09-27re PR libgcj/23367 (_Jv_FindMethodInCache is not thread-safe)Tom Tromey2-21/+49
PR libgcj/23367: * include/jvm.h (_Jv_FreeMethodCache): Declare. * java/lang/natClass.cc (MCACHE_SIZE): Conditional on HAVE_TLS. (struct _Jv_mcache): Likewise. (method_cache): Likewise. (_Jv_FindMethodInCache): Do nothing unless TLS is available. (_Jv_AddMethodToCache): Likewise. (_Jv_FreeMethodCache): New function. * java/lang/natThread.cc (finish_): Call _Jv_FreeMethodCache. * aclocal.m4, configure, include/config.h.in: Rebuilt. * configure.ac: Invoke GCC_CHECK_TLS. From-SVN: r104707
2005-09-23Imported Classpath 0.18.Tom Tromey2-38/+143
* sources.am, Makefile.in: Updated. * Makefile.am (nat_source_files): Removed natProxy.cc. * java/lang/reflect/natProxy.cc: Removed. * gnu/classpath/jdwp/VMFrame.java, gnu/classpath/jdwp/VMIdManager.java, gnu/classpath/jdwp/VMVirtualMachine.java, java/lang/reflect/VMProxy.java: New files. 2005-09-23 Thomas Fitzsimmons <fitzsim@redhat.com> * scripts/makemake.tcl (verbose): Add gnu/java/awt/peer/qt to BC list. 2005-09-23 Thomas Fitzsimmons <fitzsim@redhat.com> * gnu/java/net/DefaultContentHandlerFactory.java (getContent): Remove ClasspathToolkit references. 2005-09-23 Thomas Fitzsimmons <fitzsim@redhat.com> * gnu/awt/xlib/XCanvasPeer.java: Add new peer methods. * gnu/awt/xlib/XFramePeer.java: Likewise. * gnu/awt/xlib/XGraphicsConfiguration.java: Likewise. 2005-09-23 Thomas Fitzsimmons <fitzsim@redhat.com> * Makefile.am (libgcjawt_la_SOURCES): Remove jawt.c. Add classpath/native/jawt/jawt.c. * Makefile.in: Regenerate. * jawt.c: Remove file. * include/Makefile.am (tool_include__HEADERS): Remove jawt.h and jawt_md.h. Add ../classpath/include/jawt.h and ../classpath/include/jawt_md.h. * include/Makefile.in: Regenerate. * include/jawt.h: Regenerate. * include/jawt_md.h: Regenerate. From-SVN: r104586
2005-09-08re PR libgcj/23761 (java.library.path doesn't affect module loading path)Thomas Fitzsimmons1-0/+2
2005-09-08 Thomas Fitzsimmons <fitzsim@redhat.com> PR libgcj/23761 * include/java-props.h (_Jv_Module_Load_Path): Declare variable. * java/lang/natRuntime.cc (init): Call lt_dlsetsearchpath after lt_dlinit. * gnu/classpath/natSystemProperties.cc (_Jv_Module_Load_Path): Define variable. (_Jv_SetDLLSearchPath): Do not call lt_dlsetsearchpath. Set _Jv_Module_Load_Path. From-SVN: r104044
2005-09-06re PR libgcj/23739 (JNI: IsAssignableFrom reverses arguments)Tom Tromey2-13/+13
PR libgcj/23739: * testsuite/libjava.jni/pr23739.c: New file. * testsuite/libjava.jni/pr23739.java: New file. * testsuite/libjava.jni/pr23739.out: New file. * jni.cc (_Jv_JNI_IsAssignableFrom): Reversed arguments. * java/lang/reflect/natMethod.cc (invoke): Updated. * java/lang/natClass.cc (isAssignableFrom): Updated. (isInstance): Likewise. (_Jv_IsAssignableFrom): Reversed arguments. (_Jv_IsInstanceOf): Updated. (_Jv_CheckCast): Likewise. (_Jv_CheckArrayStore): Likewise. (_Jv_IsAssignableFromSlow): Reversed arguments. (_Jv_InterfaceAssignableFrom): Likewise. * link.cc (verify_type_assertions): Updated. * prims.cc (_Jv_CheckAccess): Updated. From-SVN: r103953
2005-08-232005-08-23 Roman Kennke <roman@kennke.org>Roman Kennke1-1/+166
* java/lang/Character.java (toChars(int)): New JDK1.5 method. (toChars(int, char[], int)): New JDK1.5 method. (charCount): New JDK1.5 method. (isSupplementaryCodePoint): New JDK1.5 method. (isValidCodePoint): New JDK1.5 method. From-SVN: r103413
2005-08-17class.c (make_class_data): Always emit JV_STATE_PRELOADING for class' ↵Tom Tromey1-0/+2
initial state. gcc/java: * class.c (make_class_data): Always emit JV_STATE_PRELOADING for class' initial state. libjava: * java/lang/Class.h (_Jv_IsBinaryCompatibilityABI): Declare as friend. * include/jvm.h (_Jv_IsBinaryCompatibilityABI): New function. * testsuite/libjava.lang/bclink.java: New file. * testsuite/libjava.lang/bclink.out: New file. * link.cc (print_class_loaded): Changed ABI test to look at various _syms fields. From-SVN: r103225
2005-08-12re PR libgcj/23353 (clone() copies internal lock data with hash ↵Morgan Deters1-1/+6
synchronization off) 2005-08-12 Morgan Deters <mdeters@morgandeters.com> PR libgcj/23353: * java/lang/natObject.cc (clone): Clear sync_info. From-SVN: r103039
2005-07-16Major merge with Classpath.Tom Tromey118-22097/+0
Removed many duplicate files. * HACKING: Updated.x * classpath: Imported new directory. * standard.omit: New file. * Makefile.in, aclocal.m4, configure: Rebuilt. * sources.am: New file. * configure.ac: Run Classpath configure script. Moved code around to support. Disable xlib AWT peers (temporarily). * Makefile.am (SUBDIRS): Added 'classpath' (JAVAC): Removed. (AM_CPPFLAGS): Added more -I options. (BOOTCLASSPATH): Simplified. Completely redid how sources are built. Include sources.am. * include/Makefile.am (tool_include__HEADERS): Removed jni.h. * include/jni.h: Removed (in Classpath). * scripts/classes.pl: Updated to look at built classes. * scripts/makemake.tcl: New file. * testsuite/libjava.jni/jni.exp (gcj_jni_compile_c_to_so): Added -I options. (gcj_jni_invocation_compile_c_to_binary): Likewise. From-SVN: r102082
2005-07-14Class.java (getProtectionDomain): Merged javadoc from Classpath.Tom Tromey1-0/+13
* java/lang/Class.java (getProtectionDomain): Merged javadoc from Classpath. From-SVN: r102025
2005-06-30Update FSF addressKelley Cook100-200/+200
From-SVN: r101453
2005-06-29re PR libgcj/22211 ([4.0 only] Thread.interrupt sometimes causes abort if ↵Tom Tromey2-4/+12
thread is already dead) PR libgcj/22211: * testsuite/libjava.lang/pr22211.java: New file. * java/lang/natThread.cc (finish_): Synchronize when updating alive_flag. (_Jv_AttachCurrentThread): Likewise. (interrupt): Only call _Jv_ThreadInterrupt if thread is alive. * java/lang/Thread.java (isAlive): Now synchronized. From-SVN: r101430
2005-06-24natClassLoader.cc (_Jv_UnregisterClass): Handle case where class' name is NULL.Tom Tromey2-8/+8
* java/lang/natClassLoader.cc (_Jv_UnregisterClass): Handle case where class' name is NULL. (_Jv_FindClass): Don't wait for class state. * java/lang/natVMClassLoader.cc (defineClass): Only unregister if name found. * include/java-interp.h (_Jv_DefineClass): Updated. * defineclass.cc (_Jv_DefineClass): Added 'name_result' argument. (struct _Jv_ClassReader): Likewise. (found_name): New field. (handleClassBegin): Set *found_name. (_Jv_VerifyMethodSignature): Handle case where ptr==NULL. (handleClassBegin): Throw error if super class not set. (read_methods): Correctly call check_tag and prepare_pool_entry. From-SVN: r101301
2005-06-14Class.java (getClasses): New method.Tom Tromey3-90/+83
* java/lang/Class.java (getClasses): New method. (internalGetClasses): Likewise. (getClassLoader): Updated documentation. (getDeclaredClasses): New overload; old overload no longer native. (_getConstructors): Removed. (resourcePath): Updated. * java/lang/natClass.cc (getClasses): Removed. * java/lang/Class.h (getDeclaredClasses, getDeclaredConstructors): Updated. (_getConstructors): Removed. From-SVN: r100948
2005-06-01re PR libgcj/21753 (String.substring sharing heuristic should be improved)Tom Tromey1-1/+4
PR libgcj/21753: * java/lang/natString.cc (substring): Changed sharing heuristic. From-SVN: r100454