aboutsummaryrefslogtreecommitdiff
path: root/libjava
AgeCommit message (Collapse)AuthorFilesLines
2002-01-12interpret.cc (NULLARRAYCHECK): New macro.Chris Sears2-41/+38
2002-01-11 Chris Sears <cbsears_sf@yahoo.com> * interpret.cc (NULLARRAYCHECK): New macro. (SAVE_PC): Just store `pc'. (find_exception): Subtract one from `pc' here. (continue1) [insn_iaload, insn_laload, insn_faload, insn_daload, insn_aaload, insn_baload, insn_caload, insn_saload, insn_iastore, insn_lastore, insn_fastore, insn_dastore, insn_aastore, insn_bastore, insn_castore, insn_sastore]: Use NULLARRAYCHECK, and don't call SAVE_PC. (continue1) [insn_fdiv, insn_ddiv, insn_frem, insn_drem]: Don't call SAVE_PC. From-SVN: r48787
2002-01-11natSystem.cc (init_properties): Only look for default locale if LC_MESSAGES ↵Tom Tromey6-188/+282
is defined. * java/lang/natSystem.cc (init_properties): Only look for default locale if LC_MESSAGES is defined. * aclocal.m4, configure, include/config.h.in: Rebuilt. * configure.in: Call AM_LC_MESSAGES. * acinclude.m4 (AM_LC_MESSAGES): New macro. From-SVN: r48781
2002-01-10For PR libgcj/5303:Tom Tromey2-7/+48
* gnu/java/rmi/rmic/RMIC.java (parseOptions): Handle --help and --version. Recognize GNU-style long options. Print GNU-style error messages. (usage): Print GNU-style help. Exit with status 0. (error): New method. (run): Print error message if no class names found. (main): Don't print usage on error. From-SVN: r48740
2002-01-10Convert.java (version): Use java.vm.name property.Tom Tromey2-5/+11
* gnu/gcj/convert/Convert.java (version): Use java.vm.name property. (help, version): Use println(), not println(""). From-SVN: r48739
2002-01-10For PR libgcj/5303:Tom Tromey2-6/+53
* gnu/gcj/convert/Convert.java (error): Program is called `jv-convert'. Print GNU-style message. Exit with status 1, not -1. (main): Handle --help and --version. (help): New method. (version): Likewise. From-SVN: r48703
2002-01-08Makefile.in: Rebuilt.Tom Tromey136-103/+6852
* Makefile.in: Rebuilt. * Makefile.am (ordinary_java_source_files): Added new files. * gnu/java/locale/LocaleInformation.java: Extend LocaleInformation_en. * gnu/java/locale/LocaleInformation_en.java: Added zone strings and time/date formats. * gnu/java/locale/LocaleInformation_en_US.java: Now automatically generated. * gnu/java/locale/LocaleInformation_af_ZA.java: New file. * gnu/java/locale/LocaleInformation_ar_AE.java: New file. * gnu/java/locale/LocaleInformation_ar_BH.java: New file. * gnu/java/locale/LocaleInformation_ar_DZ.java: New file. * gnu/java/locale/LocaleInformation_ar_EG.java: New file. * gnu/java/locale/LocaleInformation_ar_IN.java: New file. * gnu/java/locale/LocaleInformation_ar_IQ.java: New file. * gnu/java/locale/LocaleInformation_ar_JO.java: New file. * gnu/java/locale/LocaleInformation_ar_KW.java: New file. * gnu/java/locale/LocaleInformation_ar_LB.java: New file. * gnu/java/locale/LocaleInformation_ar_LY.java: New file. * gnu/java/locale/LocaleInformation_ar_MA.java: New file. * gnu/java/locale/LocaleInformation_ar_OM.java: New file. * gnu/java/locale/LocaleInformation_ar_QA.java: New file. * gnu/java/locale/LocaleInformation_ar_SD.java: New file. * gnu/java/locale/LocaleInformation_ar_SY.java: New file. * gnu/java/locale/LocaleInformation_ar_TN.java: New file. * gnu/java/locale/LocaleInformation_ar_YE.java: New file. * gnu/java/locale/LocaleInformation_be_BY.java: New file. * gnu/java/locale/LocaleInformation_bn_IN.java: New file. * gnu/java/locale/LocaleInformation_br_FR.java: New file. * gnu/java/locale/LocaleInformation_bs_BA.java: New file. * gnu/java/locale/LocaleInformation_ca_ES.java: New file. * gnu/java/locale/LocaleInformation_cs_CZ.java: New file. * gnu/java/locale/LocaleInformation_cy_GB.java: New file. * gnu/java/locale/LocaleInformation_da_DK.java: New file. * gnu/java/locale/LocaleInformation_de_AT.java: New file. * gnu/java/locale/LocaleInformation_de_BE.java: New file. * gnu/java/locale/LocaleInformation_de_CH.java: New file. * gnu/java/locale/LocaleInformation_de_DE.java: New file. * gnu/java/locale/LocaleInformation_de_LU.java: New file. * gnu/java/locale/LocaleInformation_el_GR.java: New file. * gnu/java/locale/LocaleInformation_en_AU.java: New file. * gnu/java/locale/LocaleInformation_en_BW.java: New file. * gnu/java/locale/LocaleInformation_en_CA.java: New file. * gnu/java/locale/LocaleInformation_en_DK.java: New file. * gnu/java/locale/LocaleInformation_en_GB.java: New file. * gnu/java/locale/LocaleInformation_en_HK.java: New file. * gnu/java/locale/LocaleInformation_en_IE.java: New file. * gnu/java/locale/LocaleInformation_en_IN.java: New file. * gnu/java/locale/LocaleInformation_en_NZ.java: New file. * gnu/java/locale/LocaleInformation_en_PH.java: New file. * gnu/java/locale/LocaleInformation_en_SG.java: New file. * gnu/java/locale/LocaleInformation_en_ZA.java: New file. * gnu/java/locale/LocaleInformation_en_ZW.java: New file. * gnu/java/locale/LocaleInformation_es_AR.java: New file. * gnu/java/locale/LocaleInformation_es_BO.java: New file. * gnu/java/locale/LocaleInformation_es_CL.java: New file. * gnu/java/locale/LocaleInformation_es_CO.java: New file. * gnu/java/locale/LocaleInformation_es_CR.java: New file. * gnu/java/locale/LocaleInformation_es_DO.java: New file. * gnu/java/locale/LocaleInformation_es_EC.java: New file. * gnu/java/locale/LocaleInformation_es_ES.java: New file. * gnu/java/locale/LocaleInformation_es_GT.java: New file. * gnu/java/locale/LocaleInformation_es_HN.java: New file. * gnu/java/locale/LocaleInformation_es_MX.java: New file. * gnu/java/locale/LocaleInformation_es_NI.java: New file. * gnu/java/locale/LocaleInformation_es_PA.java: New file. * gnu/java/locale/LocaleInformation_es_PE.java: New file. * gnu/java/locale/LocaleInformation_es_PR.java: New file. * gnu/java/locale/LocaleInformation_es_PY.java: New file. * gnu/java/locale/LocaleInformation_es_SV.java: New file. * gnu/java/locale/LocaleInformation_es_US.java: New file. * gnu/java/locale/LocaleInformation_es_UY.java: New file. * gnu/java/locale/LocaleInformation_es_VE.java: New file. * gnu/java/locale/LocaleInformation_et_EE.java: New file. * gnu/java/locale/LocaleInformation_eu_ES.java: New file. * gnu/java/locale/LocaleInformation_fa_IR.java: New file. * gnu/java/locale/LocaleInformation_fi_FI.java: New file. * gnu/java/locale/LocaleInformation_fo_FO.java: New file. * gnu/java/locale/LocaleInformation_fr_BE.java: New file. * gnu/java/locale/LocaleInformation_fr_CA.java: New file. * gnu/java/locale/LocaleInformation_fr_CH.java: New file. * gnu/java/locale/LocaleInformation_fr_FR.java: New file. * gnu/java/locale/LocaleInformation_fr_LU.java: New file. * gnu/java/locale/LocaleInformation_ga_IE.java: New file. * gnu/java/locale/LocaleInformation_gd_GB.java: New file. * gnu/java/locale/LocaleInformation_gl_ES.java: New file. * gnu/java/locale/LocaleInformation_gv_GB.java: New file. * gnu/java/locale/LocaleInformation_he_IL.java: New file. * gnu/java/locale/LocaleInformation_hi_IN.java: New file. * gnu/java/locale/LocaleInformation_hr_HR.java: New file. * gnu/java/locale/LocaleInformation_hu_HU.java: New file. * gnu/java/locale/LocaleInformation_id_ID.java: New file. * gnu/java/locale/LocaleInformation_it_CH.java: New file. * gnu/java/locale/LocaleInformation_it_IT.java: New file. * gnu/java/locale/LocaleInformation_iw_IL.java: New file. * gnu/java/locale/LocaleInformation_ja_JP.java: New file. * gnu/java/locale/LocaleInformation_ka_GE.java: New file. * gnu/java/locale/LocaleInformation_kl_GL.java: New file. * gnu/java/locale/LocaleInformation_ko_KR.java: New file. * gnu/java/locale/LocaleInformation_kw_GB.java: New file. * gnu/java/locale/LocaleInformation_lt_LT.java: New file. * gnu/java/locale/LocaleInformation_lv_LV.java: New file. * gnu/java/locale/LocaleInformation_mi_NZ.java: New file. * gnu/java/locale/LocaleInformation_mk_MK.java: New file. * gnu/java/locale/LocaleInformation_mr_IN.java: New file. * gnu/java/locale/LocaleInformation_mt_MT.java: New file. * gnu/java/locale/LocaleInformation_nl_BE.java: New file. * gnu/java/locale/LocaleInformation_nl_NL.java: New file. * gnu/java/locale/LocaleInformation_nn_NO.java: New file. * gnu/java/locale/LocaleInformation_no_NO.java: New file. * gnu/java/locale/LocaleInformation_oc_FR.java: New file. * gnu/java/locale/LocaleInformation_pl_PL.java: New file. * gnu/java/locale/LocaleInformation_pt_BR.java: New file. * gnu/java/locale/LocaleInformation_pt_PT.java: New file. * gnu/java/locale/LocaleInformation_ro_RO.java: New file. * gnu/java/locale/LocaleInformation_ru_RU.java: New file. * gnu/java/locale/LocaleInformation_ru_UA.java: New file. * gnu/java/locale/LocaleInformation_se_NO.java: New file. * gnu/java/locale/LocaleInformation_sk_SK.java: New file. * gnu/java/locale/LocaleInformation_sl_SI.java: New file. * gnu/java/locale/LocaleInformation_sq_AL.java: New file. * gnu/java/locale/LocaleInformation_sr_YU.java: New file. * gnu/java/locale/LocaleInformation_sv_FI.java: New file. * gnu/java/locale/LocaleInformation_sv_SE.java: New file. * gnu/java/locale/LocaleInformation_ta_IN.java: New file. * gnu/java/locale/LocaleInformation_te_IN.java: New file. * gnu/java/locale/LocaleInformation_tg_TJ.java: New file. * gnu/java/locale/LocaleInformation_tl_PH.java: New file. * gnu/java/locale/LocaleInformation_tr_TR.java: New file. * gnu/java/locale/LocaleInformation_uk_UA.java: New file. * gnu/java/locale/LocaleInformation_ur_PK.java: New file. * gnu/java/locale/LocaleInformation_uz_UZ.java: New file. * gnu/java/locale/LocaleInformation_vi_VN.java: New file. * gnu/java/locale/LocaleInformation_yi_US.java: New file. * gnu/java/locale/LocaleInformation_zh_CN.java: New file. * gnu/java/locale/LocaleInformation_zh_HK.java: New file. * gnu/java/locale/LocaleInformation_zh_SG.java: New file. * gnu/java/locale/LocaleInformation_zh_TW.java: New file. From-SVN: r48668
2002-01-08For PR libgcj/5031:Tom Tromey2-1/+10
* java/lang/natSystem.cc (init_properties): Use LC_MESSAGES to choose default locale. From-SVN: r48664
2002-01-08Makefile.in: Rebuilt.Tom Tromey3-5/+7
* Makefile.in: Rebuilt. * Makefile.am (jv_convert_LDADD): Removed convert_source_files. From-SVN: r48663
2002-01-08natPlainSocketImpl.cc: Added timeout handling for sockets.Nic Ferrier3-15/+381
2002-01-08 Nic Ferrier <nferrier@tf1.tapsellferrier.co.uk> * java/net/natPlainSocketImpl.cc: Added timeout handling for sockets. (close): New function closes the socket. (write): New functions for output to socket. (read): New functions for reading from socket. * java/net/PlainSocketImpl.java: Glue for new timeout implementation. (write): Call the native impl. (read): Likewise. (getInputStream): Get a stream to read from the socket. (getOutputStream): Get a stream to write to the socket. From-SVN: r48662
2002-01-08* resolve.cc (_Jv_PrepareClass): Enable verifier.Tom Tromey2-3/+6
From-SVN: r48660
2002-01-08natMethod.cc: Don't include alloca.h.Andreas Tobler2-9/+10
2002-01-07 Andreas Tobler <a.tobler@schweiz.ch> * java/lang/reflect/natMethod.cc: Don't include alloca.h. (_Jv_CallAnyMethodA): Convert alloca to __builtin_alloca. From-SVN: r48656
2002-01-08interpret.cc (ARRAYBOUNDSCHECK): New macro.Chris Sears2-65/+34
2002-01-08 Chris Sears <cbsears_sf@yahoo.com> * interpret.cc (ARRAYBOUNDSCHECK): New macro. (continue1) [insn_iaload, insn_laload, insn_faload, insn_daload, insn_aaload, insn_baload, insn_caload, insn_saload, insn_iastore, insn_lastore, insn_fastore, insn_dastore, insn_aastore, insn_bastore, insn_castore, insn_sastore]: Use it. (continue1) [insn_arraylength]: Check for null array. From-SVN: r48652
2002-01-06configure, [...]: Rebuilt.Andreas Tobler5-198/+314
2002-01-06 Andreas Tobler <a.tobler@schweiz.ch> * configure, include/config.h.in: Rebuilt. * java/lang/natSystem.cc (getSystemTimeZone): Check HAVE_TM_ZONE. * configure.in: Call AC_STRUCT_TIMEZONE. From-SVN: r48588
2002-01-05jni.exp: Add -I..H.J. Lu2-1/+5
2002-01-05 H.J. Lu <hjl@gnu.org> * libjava.jni/jni.exp: Add -I.. for generated header. From-SVN: r48571
2002-01-05configure.host: Disable the interpreter for Darwin.Andreas Tobler2-1/+8
2002-01-02 Andreas Tobler <a.tobler@schweiz.ch> * configure.host: Disable the interpreter for Darwin. From-SVN: r48557
2002-01-04Thread.java (stop): No longer synchronized.Tom Tromey2-3/+8
* java/lang/Thread.java (stop): No longer synchronized. (start): Likewise. From-SVN: r48540
2002-01-02ieeefp.h: Fix bug in my hand-application of previous patch.Tom Tromey2-1/+6
* java/lang/ieeefp.h: Fix bug in my hand-application of previous patch. From-SVN: r48475
2002-01-022002-1-1 Andrew Pinski <pinskia@physics.uc.edu>Andrew Pinski2-5/+7
* libjava/java/lang/ieeefp.h: Define __IEEE_BIG_ENDIAN for PPC Darwin, not for all of Darwin. From-SVN: r48473
2002-01-01ieeefp.h: Define __IEEE_BIG_ENDIAN for Darwin.Andreas Tobler2-0/+9
2001-12-29 Andreas Tobler <a.tobler@schweiz.ch> * libjava/java/lang/ieeefp.h: Define __IEEE_BIG_ENDIAN for Darwin. From-SVN: r48455
2001-12-21ObjectInputStream.java (enableResolveObject): Use correct security check.Tom Tromey3-5/+16
* java/io/ObjectInputStream.java (enableResolveObject): Use correct security check. * java/io/ObjectOutputStream.java (enableReplaceObject): Use correct security check. From-SVN: r48256
2001-12-21re PR java/5165 (Loading class fields with a ConstantValue attribute)Tom Tromey2-5/+8
Fix for PR java/5165: * java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): Convert any constant string field to a String; not just final fields. From-SVN: r48255
2001-12-21re PR libgcj/2428 (Classloader is not set)Tom Tromey3-4/+36
Fix for PR libgcj/2428: * java/lang/natClass.cc: Include RuntimePermission.h. (getClassLoader): Define. * java/lang/Class.h (Class.getClassLoader): Only declare. From-SVN: r48253
2001-12-20For PR java/4766:Tom Tromey2-0/+30
* libjava.compile/PR4766.java: New file. From-SVN: r48209
2001-12-20FileHandleGcTest.out: New file.Andrew Haley5-0/+90
2001-12-20 Andrew Haley <aph@redhat.com> * libjava.lang/FileHandleGcTest.out: New file. * libjava.lang/FileHandleGcTest.java: New file. * libjava.lang/Array_3.out: New file. * libjava.lang/Array_3.java: New file. From-SVN: r48201
2001-12-19FlowLayout.java (FlowLayout(), [...]): Set gaps to 5.Tom Tromey2-26/+42
* java/awt/FlowLayout.java (FlowLayout(), FlowLayout(int)): Set gaps to 5. (FlowLayout(int,int,int)): Use methods to set fields. (getSize): Skip invisible components. (layoutContainer): Skip invisible components. From-SVN: r48182
2001-12-19* boehm.cc (_Jv_BuildGCDescr): Define unconditionally.Bryce McKinlay2-4/+3
From-SVN: r48170
2001-12-19jvm.h (_Jv_BuildGCDescr): Declare unconditionally.Bryce McKinlay3-4/+5
* include/jvm.h (_Jv_BuildGCDescr): Declare unconditionally. * nogc.cc (_Jv_BuildGCDescr): Define unconditionally. From-SVN: r48169
2001-12-18CollationElementIterator.java (secondaryOrder): Cast result to `short'.Tom Tromey2-3/+9
* java/text/CollationElementIterator.java (secondaryOrder): Cast result to `short'. (tertiaryOrder): Likewise. From-SVN: r48162
2001-12-18For PR java/3417:Tom Tromey3-0/+13
* libjava.compile/PR3417.xfail: New file. * libjava.compile/PR3417.java: New file. From-SVN: r48161
2001-12-18* libjava.lang/PR3731.xfail: Removed.Tom Tromey2-1/+2
From-SVN: r48144
2001-12-18Inspired by PR java/5057:Tom Tromey3-0/+24
* libjava.lang/PR5057_2.java: New file. * libjava.lang/PR5057_2.out: New file. From-SVN: r48142
2001-12-18For PR java/5057:Tom Tromey3-0/+23
* libjava.lang/PR5057.out: New file. * libjava.lang/PR5057.java: New file. From-SVN: r48141
2001-12-16For PR libgcj/5103:Tom Tromey8-316/+493
* include/jvm.h (__GCJ_JNI_IMPL__): Define. * include/config.h.in: Rebuilt. * configure: Rebuilt. * configure.in: Define JV_HAVE_INTTYPES_H if inttypes.h found. Added comment for HAVE_DLOPEN to avoid autoheader error. * gcj/libgcj-config.h.in (JV_HAVE_INTTYPES_H): Added. * include/jni.h: Include <gcj/libgcj-config.h>. Don't include CNI-specific headers if we are compiling ordinary JNI code with a C++ compiler. Include <inttypes.h> and JNIWeakRef.h when appropriate. * jni.cc: Don't include JNIWeakRef.h. From-SVN: r48082
2001-12-16For PR java/5088:Tom Tromey4-26/+43
* java/lang/natClassLoader.cc (_Jv_InitNewClassFields): New function. (_Jv_NewClass): Use it. (defineClass0): Use it. * prims.cc (_Jv_InitPrimClass): Adjust vtable here. (_Jv_InitPrimClass): Use _Jv_InitNewClassFields. (_Jv_NewArray): Don't abort; just throw exception. Include InternalError.h. * java/lang/Class.h (Class::Class): Declare, don't define. (Class): Declare _Jv_InitNewClassFields as a friend. (union _Jv_Self): Removed. From-SVN: r48081
2001-12-16Makefile.in: Rebuilt.Tom Tromey5-42/+99
* Makefile.in: Rebuilt. * Makefile.am (ordinary_java_source_files): Removed old file; added new file. * gnu/java/math/MPN.java: New file. * gnu/gcj/math/MPN.java: Removed. * java/math/BigInteger.java: Merged with Classpath. From-SVN: r48080
2001-12-16DataOutputStream (write (byte[], int, int)): Update "written" correctly.Bryce McKinlay2-1/+6
* java/io/DataOutputStream (write (byte[], int, int)): Update "written" correctly. Fix from the ORP team. From-SVN: r48050
2001-12-15java-tree.h (otable_methods, [...]): New field/global tree definitions.Bryce McKinlay5-2/+243
gcc/java: * java-tree.h (otable_methods, otable_decl, otable_syms_decl, otable_type, otable_ptr_type, method_symbol_type, method_symbols_array_type, method_symbols_array_ptr_type): New field/global tree definitions. (flag_indirect_dispatch): New flag. * decl.c (java_init_decl_processing): Initialize new otable and otable_syms type nodes and decls. Add new field "index" to method_type_node. * class.c (build_method_symbols_entry): New function. (make_method_value): Set "index" to to method's vtable index for virtual methods when indirect-dispatch is not used. (make_class_data): For indirect-dispatch, dont emit the dtable_decl, and set vtable_method_count to -1. Set otable and otable_syms field if indirect-dispatch is used and there was something to put in them. (build_method_symbols_entry): New function. (emit_offset_symbol_table): New function. * expr.c (get_offset_table_index): New function. (build_invokevirtual): Build array reference to otable at the index returned by get_offset_table_index, and use the result as the vtable offset. (build_invokeinterface): Similar. * jcf-parse.c (yyparse): If indirect-dispatch, call emit_offset_symbol_table at the end of compilation, after all classes have been generated. * jvspec.c: Don't pass findirect-dispatch to jvgenmain. * lang.c (flag_indirect_dispatch): Define. (lang_f_options): Add indirect-dispatch flag. libjava: * include/jvm.h (_Jv_VTable::idx_to_offset): New method. * java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): Call _Jv_MakeVTable and _Jv_LinkOffsetTable if needed. * java/lang/Class.h (_Jv_Method): Add "index" field. (_Jv_MethodSymbol): New struct type. (_Jv_LinkOffsetTable, _Jv_LayoutVTableMethods, _Jv_SetVTableEntries, _Jv_MakeVTable): Friends. (otable, otable_syms): New Class fields. * java/lang/natClass.cc (_Jv_LinkOffsetTable): New function. (isVirtualMethod): New static function. (_Jv_LayoutVTableMethods): New function. (_Jv_SetVTableEntries): New function. (_Jv_MakeVTable): New function. From-SVN: r48038
2001-12-15Collections drop from Classpath:Bryce McKinlay27-6159/+11473
2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * java/util/BitSet.java (and): Fix off-by-one bug, don't skip part of the bitset. (andNot): Likewise. (xor): Likewise. 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * java/util/LinkedList.java (LinkedListItr.add): Don't skip the next entry. 2001-12-15 Eric Blake <ebb9@email.byu.edu> * java/util/TreeMap.java (removeNode): Fix bug in node removal. 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * java/util/AbstractCollection.java (containsAll): Use size of the correct collection for loop bound. * java/util/AbstractList.java (iterator.next): Increment pos after calling get on backing list. (listIterator.next): Likewise. * java/util/LinkedList.java (addLastEntry): Don't increment size before checking for size == 0. (addFirstEntry): Rearrange to match addLastEntry. (add): Do not increment size before inserting the new entry. * java/util/AbstractCollection.java (addAll): Use size of the correct collection for loop bound. 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * java/util/AbstractSet.java (removeAll): Fix scoping thinko. * java/util/HashMap.java (putAllInternal): Set size here. * java/util/Hashtable.java (putAllInternal): New method. Copy contents of a map efficiently without calling put() or putAll(). (Hashtable (map)): Use putAllInternal. (clone): Likewise. 2001-12-15 Eric Blake <ebb9@email.byu.edu> * java/util/Collections.java: * java/util/Vector.java: * java/util/WeakHashMap.java: Fix spelling errors. 2001-12-15 Eric Blake <ebb9@email.byu.edu> * java/util/AbstractCollection.java (removeAllInternal), (retainAllInternal): Add hooks for use by ArrayList. * java/util/AbstractList.java: Minor code updates. Fix some scoping. * java/util/AbstractMap.java: ditto * java/util/ArrayList.java (readObject, writeObject): ditto (removeAllInternal, retainAllInternal): Optimize. * java/util/Arrays.java: ditto * java/util/Collections.java: ditto. Change order of parameters to equals(Object, Object) to match specs. * java/util/Dictionary.java: Improve javadoc. (Dictionary): Add explicit constructor. * java/util/HashMap.java: Improve javadoc. Rearrange methods to follow order in JDK. Cleanups related to recent code migration to AbstractMap. Fix some scoping. (entrySet): Cache the result. (modCount): Ensure that this is updated correctly. * java/util/HashSet.java: Improve javadoc. Fix some scoping. (init): Add hooks for LinkedHashSet. (map): Use "" instead of Boolean.TRUE in backing map. Use package-private API where possible for less overhead. (readObject, writeObject): Fix serialization. * java/util/Hashtable.java: Improve javadoc. Fix some scoping. (entrySet, keySet, values): Cache the result. (modCount): Ensure that this is updated correctly. (contains, remove): Fix NullPointer checking to match specs. (class Enumeration): Make more like HashIterator. * java/util/IdentityHashMap.java: Minor code updates. (modCount): Ensure that this is updated correctly. (readObject, writeObject): Fix serialization. * java/util/LinkedHashMap.java: Minor code updates. Cleanups related to recent code migration to AbstractMap. * java/util/LinkedHashSet.java: New file. * java/util/LinkedList.java: (readObject, writeObject): Fix serialization. * java/util/Makefile.am: List recently added files. * java/util/Stack.java: Minor code updates. * java/util/TreeMap.java: Improve javadoc. Overhaul the class to be more efficient. Fix some scoping. Rearrange the methods. (nil): Ensure that this can be thread-safe, and make it a static final. Initialize it to be more useful as a sentinal node. (Node): Specify color in constructor. (deleteFixup, insertFixup): Improve comments and algorithm. (fabricateTree): Redesign with less overhead. (lowestGreaterThan): Add parameter first to make SubMap easier. (removeNode): Patch hole where nil was being modified. Choose predecessor instead of successor so in-place swap works. (class VerifyResult, verifyTree, verifySub, verifyError): Remove this dead code after verifying the class works. (class SubMap): Rewrite several algorithms to avoid problems with comparing nil. * java/util/TreeSet.java: Improve javadoc. Fix some scoping. (clone): Fix ClassCastException when cloning subSet(). (readObject, writeObject): Fix serialization. * java/util/WeakHashMap.java: Improve javadoc. Fix some scoping. (NULL_KEY): Make it compare as null, for ease elsewhere. (Class WeakEntry): Rename from Entry, to avoid shadowing Map.Entry. Add missing toString. (modCount): Ensure that this is updated correctly. (clear, containsValue, keySet, putAll, values, WeakHashMap(Map)): Add missing methods and constructor. 2001-12-15 Eric Blake <ebb9@email.byu.edu> * java/util/ArrayList.java (checkBoundExclusive), (checkBoundInclusive): Rename from range??clusive, to match AbstractList. * java/util/LinkedList.java (checkBoundsExclusive), (checkBoundsInclusive): ditto * java/util/Vector.java (checkBoundExclusive), (checkBoundInclusive): Move bounds checking into common methods. 2001-12-15 Eric Blake <ebb9@email.byu.edu> * java/util/AbstractList.java: (modCount): Make sure it is updated in all needed places. * java/util/ArrayList.java: Improve javadoc. Implements RandomAccess. Add serialVersionUID. Reorder methods. (modCount): Make sure it is updated in all needed places. (rangeExclusive, rangeInclusive): Add common methods for bounds check. (isEmpty): Add missing method. * java/util/Collections.java: (class SynchronizedList): Make package visible. * java/util/ConcurrentModificationException.java: Improve javadoc. * java/util/EmptyStackException.java: Improve javadoc. * java/util/LinkedList.java: Improve javadoc. (modCount): Make sure it is updated in all needed places. (rangeExclusive, rangeInclusive): Add common methods for bounds check. * java/util/NoSuchElementException.java: Improve javadoc. * java/util/Stack.java: Improve javadoc. Fix synchronization issues. (modCount): Make sure it is updated in all needed places. * java/util/Vector.java: Improve javadoc. Fix synchronization issues. Implements RandomAccess. Reorder methods. (modCount): Make sure it is updated in all needed places. (setSize): Fix according to specifications: this does not dictate the backing array size. (removeAll, retainAll): Faster implementations. 2001-12-15 Eric Blake <ebb9@email.byu.edu> * java/util/BitSet.java: Improve javadoc. (cardinality(), clear(), clear(int, int), flip(int)), (flip(int, int), get(int, int), intersects(BitSet), isEmpty()), (nextClearBit(int), nextSetBit(int), set(int, boolean)), (set(int, int), set(int, int, boolean)): Add new JDK 1.4 methods. (clone): Fix so subclasses clone correctly. 2001-12-15 Eric Blake <ebb9@email.byu.edu> * java/util/AbstractCollection.java: Improve javadoc. (AbstractCollection()): Make constructor protected. (equals(Object, Object), hashCode(Object)): Add utility methods. * java/util/AbstractList.java: Improve javadoc. (AbstractList()): Make constructor protected. (indexOf(Object)): Call listIterator(), not listIterator(int). (iterator()): Follow Sun's requirement to not use listIterator(0). (listIterator(int)): Make AbstractListItr anonymous. (subList(int, int)): Add support for RandomAccess. (SubList.add(int, Object), SubList.remove(Object)): Fix bug with modCount tracking. (SubList.addAll(Collection)): Add missing method. (SubList.listIterator(int)): Fix bugs in indexing, modCount tracking. (class RandomAccessSubList): Add new class. * java/util/AbstractMap.java: Improve javadoc. (keys, values, KEYS, VALUES, ENTRIES): Consolidate common map fields. (AbstractMap()): Make constructor protected. (equals(Object, Object), hashCode(Object)): Add utility methods. (equals(Object)): Change algorithm to entrySet().equals(m.entrySet()), as documented by Sun. (keySet(), values()): Cache the collections. * java/util/AbstractSequentialList.java: Improve javadoc. (AbstractSequentialList()): Make constructor protected. * java/util/AbstractSet.java: Improve javadoc. (AbstractSet()): Make constructor protected. (removeAll(Collection)): Add missing method. * java/util/Arrays.java: Improve javadoc, rearrange method orders. (defaultComparator): Remove, in favor of Collections.compare(Object, Object, Comparator). (binarySearch, equals, sort): Fix natural order comparison of floats and doubles. Also improve Object comparison - when comparator is null, use natural order. (fill, sort): Add missing checks for IllegalArgumentException. (sort, qsort): Fix sorting bugs, rework the code for more legibility. (mergeSort): Inline into sort(Object[], int, int, Comparator). (class ArrayList): Rename from ListImpl, and make compatible with JDK serialization. Add methods which more efficiently override those of AbstractList. * java/util/Collections: Improve javadoc. (isSequential(List)): Add and use a method for deciding between RandomAccess and sequential algorithms on lists. (class Empty*, class Synchronized*, class Unmodifiable*): Make compliant with JDK serializability. (class Singleton*, class CopiesList, class RevereseComparator), (class UnmodifiableMap.UnmodifiableEntrySet), (class *RandomAccessList): New classes for serial compatibility. (class Empty*, class Singleton*, class CopiesList): Add methods which more efficiently override those of Abstract*. (search): Inline into binarySearch(List, Object, Comparator). (binarySearch): Make sequential search only do log(n) comparisons, instead of n. (copy(List, List)): Do bounds checking before starting. (indexOfSubList, lastIndexOfSubList, list, replaceAll, rotate), (swap): Add new JDK 1.4 methods. (binarySearch, max, min, sort): Allow null comparator to represent natural ordering. (reverse(List)): Avoid unnecessary swap. (shuffle(List, Random)): Do shuffle in-place for RandomAccess lists. (SingletonList.get): Fix logic bug. (SingletonMap.entrySet): Make the entry immutable, and cache the returned set. (SynchronizedCollection, SynchronizedMap, UnmodifiableCollection), (UnmodifiableMap): Detect null pointer in construction. (SynchronizedMap, UnmodifiableMap): Cache collection views. * java/util/BasicMapEntry: Improve javadoc. From-SVN: r48035
2001-12-14For PR libgcj/5103:Tom Tromey5-1/+67
* libjava.jni/cxxtest.out: New file. * libjava.jni/cxxtest.cc: New file. * libjava.jni/cxxtest.java: New file. * libjava.jni/jni.exp (gcj_jni_test_one): If there is no .c file, assume there is a .cc file. From-SVN: r48012
2001-12-14prims.cc: Some old cleanups.Hans Boehm5-37/+79
* 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-13prims.cc (_Jv_RunMain): Use `using' to simplify code.Tom Tromey2-12/+11
* prims.cc (_Jv_RunMain): Use `using' to simplify code. Set _Jv_Jar_Class_Path early. From-SVN: r47965
2001-12-12* jni.cc (call): Synchronize if required.Tom Tromey2-0/+16
From-SVN: r47949
2001-12-12* gij.cc (main): Clarify --help output.Tom Tromey2-1/+3
From-SVN: r47948
2001-12-12* gnu/gcj/runtime/StringBuffer.javaTom Tromey2-1/+7
(ensureCapacity_unsynchronized): Ensure we always get at least `minimumCapacity' characters in new buffer. From-SVN: r47940
2001-12-11String.java (String): New constructor.Tom Tromey6-2/+253
* 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-11For PR libgcj/1147:Tom Tromey2-4/+18
* prims.cc (JvConvertArgv): Convert using current locale's encoding. From-SVN: r47862
2001-12-11re PR libgcj/5064 (java/lang/natClassLoader.cc doesn't compile on systems ↵Tom Tromey2-3/+12
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-09* gnu/gcj/xlib/XImage.java (toString): Add missing initialization.Per Bothner2-0/+13
From-SVN: r47834
2001-12-10resolve.cc (_Jv_PrepareClass): Verify method here...Tom Tromey4-39/+105
* resolve.cc (_Jv_PrepareClass): Verify method here... * defineclass.cc (handleMethodsEnd): ... not here. * verify.cc (_Jv_BytecodeVerifier::initialize_stack): New method. (_Jv_BytecodeVerifier::verify_instructions_0) [op_return]: Ensure there are no uninitialized objects. (_Jv_BytecodeVerifier::state::this_type): New field. (_Jv_BytecodeVerifier::state::state): Initialize this_type. (_Jv_BytecodeVerifier::state::copy): Copy this_type. (_Jv_BytecodeVerifier::state::merge): Merge this_type. (_Jv_BytecodeVerifier::state::check_no_uninitialized_objects): Handle this_type. (_Jv_BytecodeVerifier::state::check_this_initialized): New method. (_Jv_BytecodeVerifier::state::set_initialized): Handle this_type. (_Jv_BytecodeVerifier::state::set_this_type): New method. (_Jv_BytecodeVerifier::verify_instructions_0) [op_putfield]: Allow assignment to fields of `this' before another initializer is run. From-SVN: r47826
2001-12-10Makefile.in: Rebuilt.Tom Tromey3-2/+7
* Makefile.in: Rebuilt. * Makefile.am (gnu/gcj/runtime/VMClassLoader.h): Use `::java'. From-SVN: r47824