aboutsummaryrefslogtreecommitdiff
path: root/libjava/java
AgeCommit message (Collapse)AuthorFilesLines
2001-12-14prims.cc: Some old cleanups.Hans Boehm1-2/+5
* libjava/prims.cc: Some old cleanups. The collector now handles test for out of memory. * libjava/prims.cc, libjava/gcj/javaprims.h: (_Jv_AllocObjectNoInitNoFinalizer, _Jv_AllocObjectNoFinalizer): New functions for finalizer-free allocation. (jvmpi_notify_alloc): Became separate function. * libjava/java/lang/Object.h, libjava/include/jvm.h: Adjust for revised vtable layout on IA64. With TARGET_VTABLE_USES_DESCRIPTORS, there is only one extra descriptor. From-SVN: r48002
2001-12-11String.java (String): New constructor.Tom Tromey1-0/+10
* java/lang/String.java (String): New constructor. * 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. From-SVN: r47883
2001-12-11re PR libgcj/5064 (java/lang/natClassLoader.cc doesn't compile on systems ↵Tom Tromey1-3/+6
without snprintf) Fix for PR libgcj/5064. * java/lang/natClassLoader.cc: Don't include stdio.h. (_Jv_RegisterClassHookDefault): Don't use snprintf. From-SVN: r47861
2001-12-09Makefile.in: Rebuilt.Tom Tromey3-18/+21
* Makefile.in: Rebuilt. * Makefile.am (java/lang/reflect/Method.h): ObjectInputStream now a friend. * java/lang/natClass.cc (getSignature): Only look at elements of non-null parameters. (getPrivateMethod): Removed old FIXME comment. * java/io/natObjectInputStream.cc (allocateObject): Removed old FIXME comment. (callConstructor): Simply use `NULL' for value of parameters. (ObjectClass): Removed. (ClassClass): Likewise. * java/io/ObjectInputStream.java (readObject): Fixed typo. From-SVN: r47800
2001-12-07ClassLoader.java (defineClass): Rethrow any LinkageError.Tom Tromey1-1/+1
* java/lang/ClassLoader.java (defineClass): Rethrow any LinkageError. From-SVN: r47780
2001-12-07ThreadGroup.java (uncaughtException): Print message to System.err.Tom Tromey1-3/+4
* java/lang/ThreadGroup.java (uncaughtException): Print message to System.err. Required by spec. From-SVN: r47779
2001-11-26Fix for PR libgcj/2024, plus other class name cleanups:Tom Tromey2-3/+9
* include/jvm.h (_Jv_VerifyFieldSignature, _Jv_VerifyMethodSignature, _Jv_VerifyClassName, _Jv_VerifyIdentifier, _Jv_ClassNameSamePackage): Moved from ... * include/java-interp.h: ... here. * defineclass.cc (UTF8_PEEK): No longer conditional on interpreter. (_Jv_VerifyOne): Likewise. (_Jv_VerifyFieldSignature): Likewise. (_Jv_VerifyMethodSignature): Likewise. (is_identifier_start): Likewise. (is_identifier_part): Likewise. (_Jv_VerifyIdentifier): Likewise. (_Jv_VerifyClassName): Likewise. (_Jv_VerifyClassName): Likewise. (_Jv_ClassNameSamePackage): Likewise. (_Jv_VerifyClassName): Fail if class name is too long. * java/lang/natClassLoader.cc (_Jv_NewArrayClass): Disallow array of void. * java/lang/natClass.cc (forName): Check syntax of class name. Include IllegalArgumentException.h. From-SVN: r47334
2001-11-25re PR libgcj/4583 (problems BigDecimal(double) ctor.)Tom Tromey1-8/+111
Fix for PR libgcj/4583: * java/math/BigDecimal.java (BigDecimal(double)): Rewrote. (BigDecimal(String)): Likewise. From-SVN: r47329
2001-11-16Re-merge with Classpath, from Brian Jones:Tom Tromey1-1/+4
* java/lang/Integer.java (getInteger): Attempt to decode the value of the system property instead of the name of the system property. (parseInt): Throw NumberFormatException explicitly in the case of a null argument in keeping with JDK 1.3. From-SVN: r47095
2001-11-16Timer.java (TaskQueue.isStopped): Remove method.Mark Wielaard1-11/+10
* java/util/Timer.java (TaskQueue.isStopped): Remove method. (Scheduler.run): Try to re-schedule task and ignore exception if queue has been stopped. From-SVN: r47093
2001-11-15natString.cc: correct argument order for _Jv_AllocPtrFreeObjHans Boehm1-1/+1
* java/lang/natString.cc: correct argument order for _Jv_AllocPtrFreeObj From-SVN: r47035
2001-11-14Constructor.java (toString): Use more efficient form of Modifier.toString().Tom Tromey1-1/+1
* java/lang/reflect/Constructor.java (toString): Use more efficient form of Modifier.toString(). From-SVN: r47031
2001-11-14Re-merges with Classpath, from various people:Tom Tromey2-99/+162
* java/lang/reflect/Modifier.java: Reindented. (toString): Only trim trailing space if text was added to StringBuffer. * java/lang/reflect/ReflectPermission: Reindented. From-SVN: r47028
2001-11-14Re-merges with Classpath, from various people:Tom Tromey6-88/+215
* java/lang/Double.java (parseDouble): Fixed ordering of modifiers. * java/lang/reflect/AccessibleObject.java: Javadoc, reindented. * java/lang/reflect/Member.java: Reindented. * java/lang/reflect/Modifier.java: Reindented. (toString): Only trim trailing space if text was added to StringBuffer. * java/util/ConcurrentModificationException.java: Javadoc updates. * java/util/EmptyStackException.java: Likewise. * java/util/NoSuchElementException.java: Likewise. From-SVN: r47018
2001-11-13re PR libgcj/4859 (java.util.Timer class throw IllegalStateException on ↵Tom Tromey1-2/+11
cancel()) Fix for PR libgcj/4859: * java/util/Timer.java (TaskQueue.isStopped): New method. (Scheduler.run): Don't re-schedule task if queue has been stopped. From-SVN: r46994
2001-11-05Class.h (Class): Made _Jv_BytecodeVerifier a friend.Tom Tromey1-0/+2
* java/lang/Class.h (Class): Made _Jv_BytecodeVerifier a friend. * Makefile.in: Rebuilt. * Makefile.am (libgcj_la_SOURCES): Added verify.cc. * verify.cc: New file. * include/java-interp.h (_Jv_count_arguments): Declare. (_Jv_VerifyMethod): Likewise. (class _Jv_InterpMethod): Made _Jv_BytecodeVerifier a friend. (class _Jv_InterpException): Likewise. * resolve.cc (_Jv_count_arguments): Renamed from count_arguments. No longer static. Updated callers. * defineclass.cc (int_bits_to_float): Removed. (long_bits_to_double): Likewise. (prepare_pool_entry): Updated. (handleCodeAttribute): Verify method (commented out for now). From-SVN: r46796
2001-11-05* java/util/ResourceBundle.java (class Security): Now static.Bryce McKinlay1-1/+1
From-SVN: r46781
2001-11-04ResourceBundle.java (getClassContext): Removed.Bryce McKinlay2-56/+36
* java/util/ResourceBundle.java (getClassContext): Removed. (Security): New class, extends SecurityManger. (getBundle): Use Security.getCallingClassLoader instead of getClassContext. * java/util/natResourceBundle.cc: Removed. From-SVN: r46761
2001-11-03natResourceBundle.cc (getClassContext): return array of Class instead of ↵Hans Boehm1-1/+1
array of ClassLoader. 2001-11-02 Hans Boehm <Hans_Boehm@hp.com> * java/util/natResourceBundle.cc:getClassContext: return array of Class instead of array of ClassLoader. From-SVN: r46727
2001-10-31HACKING, [...]: Fix spelling errors.Joseph Myers37-66/+66
* HACKING, gnu/gcj/xlib/Pixmap.java, gnu/gcj/xlib/XException.java, gnu/java/rmi/rmic/RMIC.java, java/awt/Window.java, java/awt/AWTEvent.java, java/io/ByteArrayOutputStream.java, java/io/CharConversionException.java, java/io/PipedInputStream.java, java/io/PipedReader.java, java/io/PrintWriter.java, java/io/WriteAbortedException.java, java/io/natFileWin32.cc, java/lang/Class.h, java/lang/natClassLoader.cc, java/lang/natObject.cc, java/lang/Package.java, java/net/BindException.java, java/net/ConnectException.java, java/net/ProtocolException.java, java/net/SocketException.java, java/net/UnknownServiceException.java, java/security/cert/X509Certificate.java, java/security/interfaces/DSAKey.java, java/security/SecureRandom.java, java/security/SignedObject.java, java/sql/DatabaseMetaData.java, java/text/DecimalFormatSymbols.java, java/util/jar/Attributes.java, java/util/jar/JarEntry.java, java/util/jar/JarInputStream.java, java/util/jar/JarOutputStream.java, java/util/Calendar.java, java/util/Collections.java, java/util/GregorianCalendar.java, java/util/HashMap.java, java/util/List.java, java/util/Properties.java, java/util/Timer.java, java/util/Vector.java, java/util/WeakHashMap.java, javax/naming/NamingException.java, testsuite/libjava.lang/Thread_Wait.java, org/xml/sax/helpers/DefaultHandler.java, org/xml/sax/HandlerBase.java, org/xml/sax/SAXParseException.java, ChangeLog, acinclude.m4, aclocal.m4, posix-threads.cc: Fix spelling errors. * configure: Regenerate. From-SVN: r46665
2001-10-29re PR libgcj/4728 (java.util.zip.GZIPOutputStream.write(int) doesn't update CRC)Tom Tromey1-1/+7
* java/util/zip/GZIPOutputStream.java (write(int)): New method. Fixes PR libgcj/4728. From-SVN: r46618
2001-10-26Adler32.java: Use correct class name.Tom Tromey1-1/+1
* java/util/zip/Adler32.java: Use correct class name. (Re-merge from Classpath.) From-SVN: r46561
2001-10-26Oops!Bryce McKinlay1-1/+1
From-SVN: r46526
2001-10-26VMClassLoader.java (getPrimitiveClass): Now native.Bryce McKinlay10-36/+21
* java/lang/VMClassLoader.java (getPrimitiveClass): Now native. Now takes a jchar type-code argument, not a string. * java/lang/natClassLoader.cc (VMClassLoader::getPrimitiveClass): New method. Just call _Jv_FindClassFromSignature. * java/lang/Boolean.java (TYPE): Initialize from VMClassLoader.getPrimitiveClass using type-code. * java/lang/Character.java (TYPE): Likewise. * java/lang/Double.java (TYPE): Likewise. * java/lang/Float.java (TYPE): Likewise. * java/lang/Integer.java (TYPE): Likewise. * java/lang/Long.java (TYPE): Likewise. * java/lang/Short.java (TYPE): Likewise. * java/lang/Void.java (TYPE): Likewise. From-SVN: r46521
2001-10-25natClassLoader.cc (_Jv_RegisterClassHookDefault): Use snprintf, not asprintf.Bryce McKinlay1-3/+2
2001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * java/lang/natClassLoader.cc (_Jv_RegisterClassHookDefault): Use snprintf, not asprintf. From-SVN: r46482
2001-10-24* java/lang/reflect/Field.java: Made many methods private.Tom Tromey1-10/+10
From-SVN: r46467
2001-10-24* java/sql/Types.java (Types): New constructor.Tom Tromey1-1/+6
From-SVN: r46466
2001-10-24Field.java (Field): New constructor.Tom Tromey2-0/+7
* java/lang/reflect/Field.java (Field): New constructor. * java/lang/ClassLoader.java (defineClass(String,byte[],int,int)): Throw ClassFormatError. From-SVN: r46458
2001-10-24PropertyResourceBundle.java (handleGetObject): Now public.Tom Tromey2-4/+4
* java/util/PropertyResourceBundle.java (handleGetObject): Now public. * java/util/ListResourceBundle.java (handleGetObject): Now public and final, per spec. From-SVN: r46452
2001-10-23* java/io/BufferedWriter.java (localFlush): Don't synchronize.Tom Tromey1-5/+3
From-SVN: r46435
2001-10-23BufferedWriter (write (String, int, int)): Remove redundant bounds checks.Bryce McKinlay1-6/+0
* java/io/BufferedWriter (write (String, int, int)): Remove redundant bounds checks. (write (char[], int, int)): Likewise. From-SVN: r46426
2001-10-23prims.cc (_Jv_Abort): Always print error message using fprintf, don't try to ↵Bryce McKinlay1-1/+12
allocate. * prims.cc (_Jv_Abort): Always print error message using fprintf, don't try to allocate. (_Jv_CreateJavaVM): Set gcj::runTimeInitialized. * include/jvm.h (gcj::runTimeInitialized): New variable declaration. * java/lang/natClassLoader.cc (_Jv_RegisterClassHookDefault): Handle duplicate class registration with JvFail if the runtime hasn't been initialized yet. From-SVN: r46424
2001-10-23GregorianCalendar.java (getGregorianChange): Removed `date' argument.Tom Tromey1-1/+1
* java/util/GregorianCalendar.java (getGregorianChange): Removed `date' argument. From-SVN: r46423
2001-10-20Double.java: More Classpath mergingMark Wielaard3-19/+31
* java/lang/Double.java: More Classpath merging (isInfinite): Don't use doubleToLongBits (isNaN (Object)): return v != v (initIDs): make native * java/lang/Float.java: Ditto (isInfinite): Don't use floatToIntBits (isNaN (Object)): return v != v * java/lang/natDouble.cc: add empty initIDs() From-SVN: r46370
2001-10-18BufferedWriter.java (write(String,int,int)): Correctly check bounds.Tom Tromey1-2/+2
* java/io/BufferedWriter.java (write(String,int,int)): Correctly check bounds. From-SVN: r46338
2001-10-18Security.java (loadProviders): Removed unused `pname' variable.Tom Tromey1-38/+14
* java/security/Security.java (loadProviders): Removed unused `pname' variable. Don't create `File' object. Don't update `providerCount'. (providerCount): Removed. (insertProviderAt): Don't use `providerCount'. (addProvider(Provider,int)): Likewise. (removeProvider): Likewise. (addProvider(Provider)): Rewrote. (getProviders): Rewrote. (getProvider): Don't use `providerCount'. From-SVN: r46332
2001-10-18SHA1PRNG.java (engineNextBytes): Rewrote.Tom Tromey1-8/+20
* gnu/java/security/provider/SHA1PRNG.java (engineNextBytes): Rewrote. * java/security/SecureRandom.java (setSeed(long)): Don't set seed if secureRandomSpi is not initialized. From-SVN: r46327
2001-10-18Makefile.in: Rebuilt.Tom Tromey2-0/+3
* Makefile.in: Rebuilt. * Makefile.am (secdir): New macro. (install-data-local): Install new data files. * java/security/classpath.security: New file. * java/security/libgcj.security: New file. From-SVN: r46326
2001-10-18Security.java (loadProviders): Added `vendor' argument.Tom Tromey1-5/+10
* java/security/Security.java (loadProviders): Added `vendor' argument. Load both `classpath' and `java.vm.name' providers. From-SVN: r46325
2001-10-17Security.java (loadProviders): Fix bug in how providers are loaded.Anthony Green1-1/+2
2001-10-17 Anthony Green <green@redhat.com> * java/security/Security.java (loadProviders): Fix bug in how providers are loaded. From-SVN: r46319
2001-10-16javaprims.h: Updated class list.Tom Tromey1-392/+612
* gcj/javaprims.h: Updated class list. * java/util/Hashtable.java: Re-merged with Classpath. From-SVN: r46295
2001-10-16Forgot this file in last commit.Bryce McKinlay1-21/+6
From-SVN: r46284
2001-10-16Eliminate use of C++ static constructors.Bryce McKinlay3-35/+17
* interpret.cc: Remove static Utf8Consts. Use namespace gcj. * jni.cc: Likewise. * resolve.cc: Likewise. * defineclass.cc: Likewise. (_Jv_ClassReader::handleClassBegin): Synchronize call to _Jv_RegisterClass. * include/jvm.h (void_signature, clinit_name, init_name, finit_name): Declare in namespace gcj. * java/lang/Class.h (Class): Remove initialization for primitive types. (friend void _Jv_InitPrimClass): This is in prims.cc. * prims.cc (_Jv_InitPrimClass): Do primitive type initialization here instead. (void_signature, clinit_name, init_name, finit_name): Define in namespace gcj. (_Jv_CreateJavaVM): Call _Jv_InitThreads, _Jv_InitGC, and _Jv_InitializeSyncMutex from here. Initialize Utf8 constants. Initialize primitive types. * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Don't call initialization routines. Don't synchronize. * java/lang/natRuntime.cc (_load): Synchronize on java.lang.Class across dlopen call. From-SVN: r46282
2001-10-16[multiple changes]Bryce McKinlay13-612/+2114
2001-10-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * java/util/HashMap.java (HashEntry.clone): Removed. (HashMap(Map)): Use putAllInternal. (clone): Likewise. (putAllInternal): New method. Efficient counterpart to putAll which does not call put(). * java/util/LinkedHashMap.java (rethread): Removed. (putAllInternal): New method. Clear "head" and "tail". (addEntry): New argument "callRemove". Don't call removeEldestEntry() if callRemove == false. * Makefile.am: Add new classes RandomAccess and LinkedHashMap. * Makefile.in: Rebuilt. 2001-10-15 Eric Blake <ebb9@email.byu.edu> * java/util/Collection.java: Updated javadoc. * java/util/Comparator.java: Updated javadoc. * java/util/Enumeration.java: Updated javadoc. * java/util/Iterator.java: Updated javadoc. * java/util/List.java: Updated javadoc. * java/util/ListIterator.java: Updated javadoc. * java/util/Map.java: Updated javadoc. * java/util/RandomAccess.java: New file. * java/util/Set.java: Updated javadoc. * java/util/SortedMap.java: Updated javadoc. * java/util/SortedSet.java: Updated javadoc. From-SVN: r46277
2001-10-15AccessibleObject.java (checkPermission): Implemented.Tom Tromey1-7/+31
* java/lang/reflect/AccessibleObject.java (checkPermission): Implemented. Updated copyright information. From-SVN: r46272
2001-10-15natObject.cc (heavy_lock): Moved fields old_client_data, ↵Hans Boehm1-32/+178
old_finalization_proc near beginning. 2001-10-15 Hans Boehm <Hans_Boehm@hp.com> * java/lang/natObject.cc (heavy_lock): Moved fields old_client_data, old_finalization_proc near beginning. (heavy_lock_finalization_proc): Now inline; changed type of argument. (JV_SYNC_TABLE_SZ): Now 2048. (mp): New global. (spin): `mp' now global. (heavy_lock_obj_finalization_proc): Updated to correctly handle heavy lock finalization. (remove_all_heavy): New function. (maybe_remove_all_heavy): Likewise. (_Jv_MonitorEnter): Throw exception if object is NULL. (_Jv_MonitorExit): Likewise. Also, clear long lists of unlocked heavy locks. * include/jvm.h (_Jv_AllocTraceTwo): Declare. * nogc.cc (_Jv_AllocTraceTwo): New function. * boehm.cc (trace_two_vtable): New global. (_Jv_AllocTraceTwo): New function. From-SVN: r46271
2001-10-15Makefile.in: Rebuilt.Tom Tromey1-0/+50
* Makefile.in: Rebuilt. * Makefile.am (awt_java_source_files): Added new file. * java/beans/AppletInitializer.java: New file. From-SVN: r46267
2001-10-15SocketPermission.java (hostport, actions): Now private.Tom Tromey1-3/+3
* java/net/SocketPermission.java (hostport, actions): Now private. From-SVN: r46266
2001-10-15Double.java: Partial merge with ClasspathMark Wielaard2-84/+771
* java/lang/Double.java: Partial merge with Classpath (TYPE): initialized through VMClassLoader.getPrimitiveClass() (value): made final (static): new static block to load native libary (not used in libgcj) (Double (String)): call parseDouble() (byteValue): removed, already defined in superclass Number (shortValue): likewise (valueOf (String)): call new Double(String) directly (compare (double,double)): new 1.4 method (compareTo (Double)): call new compare(double,double) method (initIDs): new private method (not used in libgcj) * java/lang/Float.java: Partial merge with Classpath (TYPE): initialized through VMClassLoader.getPrimitiveClass() (value): made final (static): new static block to load native libary (not used in libgcj) (Float (String)): call parseFloat() (byteValue): removed, already defined in superclass Number (shortValue): likewise (valueOf (String)): call new Float(String) directly (compare (float,float)): new 1.4 method (compareTo (Float)): call new compare(double,double) method From-SVN: r46263
2001-10-13* java/lang/SecurityManager.java (SecurityManager): Now public.Tom Tromey1-1/+1
From-SVN: r46247