Commit Graph

1148 Commits

Author SHA1 Message Date
Tom Tromey 1ec968465b ChangeLog rotation
From-SVN: r49061
2002-01-22 00:20:23 +00:00
Andreas Schwab 464115ce93 natPlainSocketImpl.cc (_Jv_recv): Change return type of function and of parameter recv_func to ssize_t...
* java/net/natPlainSocketImpl.cc (_Jv_recv): Change return type of
function and of parameter recv_func to ssize_t, as specified by
POSIX.

From-SVN: r49020
2002-01-20 16:34:07 +00:00
Per Bothner e5550355c8 ZipOutputStream.java (putNextEntry): Clear uncompressed_size in readiness for next entry.
* java/util/zip/ZipOutputStream.java (putNextEntry):  Clear
	uncompressed_size in readiness for next entry.

From-SVN: r49014
2002-01-19 12:51:48 -08:00
Tom Tromey 80d1ee91f9 natPlainSocketImpl.cc: Include IllegalArgumentException.h.
* java/net/natPlainSocketImpl.cc: Include
	IllegalArgumentException.h.
	(_Jv_recv): New template function.
	(BooleanClass): Removed.
	(read): Use _Jv_recv.
	(setOption): Use Boolean::class$.  Throw exception if object is
	not Boolean or Integer.

From-SVN: r48992
2002-01-18 17:23:23 +00:00
Tom Tromey 10185e3886 MenuComponent.java: Merged with Classpath.
* java/awt/MenuComponent.java: Merged with Classpath.
	* java/awt/MenuItem.java: Merged with Classpath.
	* java/awt/Button.java: Merged with Classpath.

From-SVN: r48975
2002-01-18 01:01:58 +00:00
Tom Tromey 16348d58cd * java/awt/ActiveEvent.java: Updated copyright.
From-SVN: r48972
2002-01-17 23:23:29 +00:00
Tom Tromey c56664e09e AWTError.java: Replaced with Classpath version.
* java/awt/AWTError.java: Replaced with Classpath version.
	* java/awt/AWTException.java: Replaced with Classpath version.
	* java/awt/IllegalComponentStateException.java: Replaced with
	Classpath version.

From-SVN: r48961
2002-01-17 17:35:28 +00:00
Tom Tromey 4cd533411e Canvas.java (serialVersionUID): New constant.
* java/awt/Canvas.java (serialVersionUID): New constant.
	Updated copyright.  Added javadoc from Classpath.
	* java/awt/ItemSelectable.java: Replaced with Classpath version.

From-SVN: r48934
2002-01-16 23:56:25 +00:00
Tom Tromey d8d27d73b0 CheckboxGroup.java: Merged with Classpath.
* java/awt/CheckboxGroup.java: Merged with Classpath.
	* java/awt/Checkbox.java: Merged with Classpath.

From-SVN: r48933
2002-01-16 23:40:04 +00:00
Tom Tromey a82484a674 Dimension.java: Updated copyright.
* java/awt/Dimension.java: Updated copyright.  Added javadoc from
	Classpath.
	* java/awt/Point.java: Updated copyright.

From-SVN: r48932
2002-01-16 23:10:11 +00:00
Tom Tromey a53c400d2a Point.java (toString): Use getClass().getName().
* java/awt/Point.java (toString): Use getClass().getName().
	Added javadoc.

From-SVN: r48929
2002-01-16 21:35:51 +00:00
Tom Tromey 510e283256 IdentityHashMap.java (IdentityHashMap): Removed commented code.
* java/util/IdentityHashMap.java (IdentityHashMap): Removed
	commented code.
	(hash): Correctly compute initial value for `h'.

From-SVN: r48925
2002-01-16 20:56:38 +00:00
Tom Tromey 54c5eaff95 * java/awt/Label.java: Merged with Classpath.
From-SVN: r48913
2002-01-16 16:50:03 +00:00
Tom Tromey 7adf768017 * java/awt/AWTPermission.java: Updated copyright.
From-SVN: r48900
2002-01-16 05:48:49 +00:00
Tom Tromey 0e1c7a5f36 LayoutManager2.java: Merged with Classpath.
* java/awt/LayoutManager2.java: Merged with Classpath.
	* java/awt/LayoutManager.java: Merged with Classpath.
	* java/awt/GridLayout.java: Updated copyright and javadoc.
	(getSize): Use `parent.ncomponents'.  Handle insets.
	(layoutContainer): Use `parent.ncomponents'.  Handle case where
	there are fewer children than columns.  Correctly compute size of
	each cell in the grid.  Handle case where there isn't enough
	space.
	* java/awt/CardLayout.java (tab): Renamed from `map'.  Updated
	all users.
	(gotoComponent): Use parent.ncomponents.  Ensure child exists
	before calling setVisible() on it.  Last item is `num - 1', not
	`num'.
	(layoutContainer): Hoist invariants out of loop.

From-SVN: r48898
2002-01-16 05:32:51 +00:00
Tom Tromey 3bd483f2a1 Start of AWT merge with Classpath:
* Makefile.in: Rebuilt.
	* Makefile.am (awt_java_source_files): Reference files in
	gnu/java/awt, not gnu/gcj/awt.
	* java/awt/image/BufferedImage.java: Updated copyright.
	* java/awt/image/ComponentColorModel.java: Updated copyright.
	* java/awt/image/ComponentSampleModel.java: Updated copyright.
	* java/awt/image/DataBuffer.java: Updated copyright.
	* java/awt/image/DataBufferByte.java: Updated copyright.
	* java/awt/image/DataBufferInt.java: Updated copyright.
	* java/awt/image/DataBufferUShort.java: Updated copyright.
	* java/awt/image/IndexColorModel.java: Updated copyright.
	* java/awt/image/PackedColorModel.java: Updated copyright.
	* java/awt/image/Raster.java: Updated copyright.
	* java/awt/image/RasterOp.java: Updated copyright.
	* java/awt/image/SampleModel.java: Updated copyright.
	* java/awt/image/SinglePixelPackedSampleModel.java: Updated copyright.
	* java/awt/image/WritableRaster.java: Updated copyright.
	* java/awt/color/ColorSpace.java: Updated copyright.
	* java/awt/color/ICC_ColorSpace.java: Updated copyright
	* java/awt/color/ICC_Profile.java: Updated copyright.
	* java/awt/event/HierarchyBoundsAdapter.java: Updated copyright.
	* java/awt/event/HierarchyBoundsListener.java: Updated copyright.
	* java/awt/event/HierarchyEvent.java: Updated copyright.
	* java/awt/event/HierarchyListener.java: Updated copyright.
	* java/awt/geom/AffineTransform.java: Updated copyright.
	* java/awt/geom/Dimension2D.java: Updated copyright.
	* java/awt/geom/Ellipse2D.java: Updated copyright.
	* java/awt/geom/IllegalPathStateException.java: Updated copyright.
	* java/awt/geom/Line2D.java: Updated copyright.
	* java/awt/geom/NoninvertibleTransformException.java: Updated
	copyright.
	* java/awt/geom/PathIterator.java: Updated copyright.
	* java/awt/geom/Point2D.java: Updated copyright.
	* java/awt/geom/Rectangle2D.java: Updated copyright.
	* java/awt/geom/RectangularShape.java: Updated copyright.
	* java/awt/geom/RoundRectangle2D.java: Updated copyright.
	* java/awt/Toolkit.java: Updated import for file moves.
	* java/awt/Rectangle.java: Updated copyright; added javadoc from
	Classpath.
	(hashCode): New method from Classpath.
	* java/awt/Graphics2D.java: Updated copyright.
	* java/awt/Transparency.java: Updated copyright.
	* java/awt/Paint.java: Updated copyright.
	* java/awt/Graphics.java: New version from Classpath.
	* java/awt/EventDispatchThread.java: Updated copyright.
	* java/awt/CardLayout.java (layoutContainer): Don't skip invisible
	children.
	(gotoComponent): Wrap around on next/previous.
	* gnu/gcj/awt/BitMaskExtent.java: Removed.
	* gnu/gcj/awt/Buffers.java: Removed.
	* gnu/gcj/awt/ComponentDataBlitOp.java: Removed.
	* gnu/gcj/awt/GLightweightPeer.java: Removed.
	* gnu/java/awt/BitMaskExtent.java: Added.
	* gnu/java/awt/Buffers.java: Added.
	* gnu/java/awt/ComponentDataBlitOp.java: Added.
	* gnu/java/awt/GLightweightPeer.java: Added.
	* java/awt/geom/Line2D.java (clone): Ignore
	CloneNotSupportedException.
	* gnu/gcj/awt/GLightweightPeer.java (getColorModel): New method.
	* java/awt/Frame.java: Merged with Classpath.
	* java/awt/RenderingHints.java: Copyright update.
	* java/awt/Paint.java: Copyright update.
	* java/awt/image/DirectColorModel.java: Merged with Classpath.
	* java/awt/image/ColorModel.java: Merged with Classpath.
	* java/awt/Window.java (show): New Implementation from Classpath.
	(isShowing): Use super.isShowing().
	* java/awt/EventQueue.java: Merged with Classpath.
	* java/awt/AWTEventMulticaster.java (save): Throw
	RuntimeException.
	(saveInternal): Likewise.
	* java/awt/AWTEvent.java: Now implements Serializable.
	* java/awt/Event.java: Copyright update.
	* java/awt/peer/ComponentPeer.java: Merged with Classpath.
	* java/awt/image/BufferedImage.java: Copyright update.
	* java/awt/GraphicsConfiguration.java: Copyright update.
	* java/awt/Component.java: (addNotify): Don't call
	addNotifyContainerChildren().
	(addNotifyContainerChildren): Removed.
	(setPeer): New method from Classpath.
	(setTreeLock): Likewise.
	(setVisible): Rewrote.
	(show): Use it.
	(hide): Likewise.
	(validate): Set `valid'.
	(checkImage(Image,ImageObserver)): Implementation from Classpath.
	(createImage(ImageProducer)): Likewise.
	(prepareImage): Likewise.
	* java/awt/Container.java (addImpl): Handle case where constraint
	is not a String.  Post event via system event queue.
	(remove): Post event via system event queue.
	(validateTree): Only validate child if it is invalid.
	(getAlignmentX): Call super method as default.
	(getAlignmentY): Likewise.
	(addContainerListener): Now synchronized.
	(removeContainerListener): Likewise.
	(addNotifyContainerChildren): Now private.
	* java/awt/ComponentOrientation.java: Updated copyright.  Added
	@author.
	* java/awt/FlowLayout.java (serialVersionUID): New field.
	(setAlignment): Better exception message.
	(layoutContainer): Don't compute component's preferred size unless
	we're going to use it.
	* java/awt/BorderLayout.java (AFTER_LAST_LINE, AFTER_LINE_ENDS,
	BEFORE_FIRST_LINE, BEFORE_LINE_BEGINS): New constants.
	(firstLine, lastLine, firstItem, lastItem): New fields.
	(addLayoutComponent): Handle case where constraints is null.
	Also, handle relative locations.
	(removeLayoutComponent): Handle relative locations.
	(MIN, MAX, PREF): New constants.
	(calcCompSize): New method.
	(calcSize): New method.
	(minimumLayoutSize): Use it.
	(preferredLayoutSize): Likewise.
	(maximumLayoutSize): Likewise.
	(toString): Include more information.
	(setBounds): New method.
	(layoutContainer): Use libgcj implementation; extended to handle
	relative locations.

From-SVN: r48896
2002-01-16 04:21:35 +00:00
Tom Tromey c342f12677 [multiple changes]
2002-01-15  Tom Tromey  <tromey@redhat.com>

	* java/lang/Float.java (equals): Preserve old code.
	* java/lang/Double.java (equals): Preserve old code.

2002-01-15  Eric Blake  <ebb9@email.byu.edu>

	* java/lang/Double.java (equals, compare): Fix 0.0 vs. -0.0 math.
	* java/lang/Float.java (equals, compare): Ditto.

From-SVN: r48895
2002-01-16 04:06:33 +00:00
Mark Wielaard 1536ef88f1 DatagramSocket.java (getReceiveBufferSize): new 1.2 method.
* java/net/DatagramSocket.java (getReceiveBufferSize): new 1.2 method.
	* java/net/DatagramSocket.java (getSendBufferSize): Likewise.
	* java/net/DatagramSocket.java (setReceiveBufferSize): Likewise.
	* java/net/DatagramSocket.java (setSendBufferSize): Likewise.

From-SVN: r48814
2002-01-13 11:59:37 +00:00
Mark Wielaard 9566a90c6b InetAddress.java (ANY_IF): moved from ServerSocket.
* java/net/InetAddress.java (ANY_IF): moved from ServerSocket.
        * java/net/DatagramSocket.java (DatagramSocket): use ANY_IF from
        InetAddress.
        * java/net/MulticastSocket.java (MulticastSocket): Likewise.
        * java/net/Socket.java: Merge with Classpath.
        * java/net/ServerSocket.java: Likewise.

From-SVN: r48797
2002-01-12 10:11:13 +00:00
Chris Sears cec718682b interpret.cc (NULLARRAYCHECK): New macro.
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-12 00:19:05 +00:00
Tom Tromey 999825b056 natSystem.cc (init_properties): Only look for default locale if LC_MESSAGES 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-11 23:00:58 +00:00
Tom Tromey ac2ee9b7e7 For PR libgcj/5303:
* 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-10 18:01:05 +00:00
Tom Tromey 346a81f0a5 Convert.java (version): Use java.vm.name property.
* gnu/gcj/convert/Convert.java (version): Use java.vm.name
	property.
	(help, version): Use println(), not println("").

From-SVN: r48739
2002-01-10 17:56:26 +00:00
Tom Tromey 54a8a50f80 For PR libgcj/5303:
* 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-10 00:39:16 +00:00
Tom Tromey 35484f777f Makefile.in: Rebuilt.
* 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-08 23:56:23 +00:00
Tom Tromey d9df09cce8 For PR libgcj/5031:
* java/lang/natSystem.cc (init_properties): Use LC_MESSAGES to
	choose default locale.

From-SVN: r48664
2002-01-08 21:59:32 +00:00
Tom Tromey 1e7fcb11d0 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (jv_convert_LDADD): Removed convert_source_files.

From-SVN: r48663
2002-01-08 21:34:59 +00:00
Nic Ferrier 2b521fa72e natPlainSocketImpl.cc: Added timeout handling for sockets.
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 21:14:58 +00:00
Tom Tromey bd917d3a24 * resolve.cc (_Jv_PrepareClass): Enable verifier.
From-SVN: r48660
2002-01-08 20:51:45 +00:00
Andreas Tobler 66839ef65e natMethod.cc: Don't include alloca.h.
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-08 20:00:50 +00:00
Chris Sears 00cc944db9 interpret.cc (ARRAYBOUNDSCHECK): New macro.
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-08 19:07:46 +00:00
Andreas Tobler ebecd56de9 configure, [...]: Rebuilt.
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-06 21:38:15 +00:00
Andreas Tobler c6c3221d21 configure.host: Disable the interpreter for Darwin.
2002-01-02 Andreas Tobler <a.tobler@schweiz.ch>

	* configure.host: Disable the interpreter for Darwin.

From-SVN: r48557
2002-01-05 04:00:32 +00:00
Tom Tromey 81550d0e5f Thread.java (stop): No longer synchronized.
* java/lang/Thread.java (stop): No longer synchronized.
	(start): Likewise.

From-SVN: r48540
2002-01-04 20:38:20 +00:00
Tom Tromey 95574a4c76 ieeefp.h: Fix bug in my hand-application of previous patch.
* java/lang/ieeefp.h: Fix bug in my hand-application of previous
	patch.

From-SVN: r48475
2002-01-02 15:58:39 +00:00
Andrew Pinski 0beb74f25c 2002-1-1 Andrew Pinski <pinskia@physics.uc.edu>
* libjava/java/lang/ieeefp.h: Define __IEEE_BIG_ENDIAN for
	PPC Darwin, not for all of Darwin.

From-SVN: r48473
2002-01-02 15:07:16 +00:00
Andreas Tobler 6180abdb9d ieeefp.h: Define __IEEE_BIG_ENDIAN for Darwin.
2001-12-29 Andreas Tobler <a.tobler@schweiz.ch>

	* libjava/java/lang/ieeefp.h: Define __IEEE_BIG_ENDIAN for
	Darwin.

From-SVN: r48455
2002-01-01 23:36:11 +00:00
Tom Tromey e3109d4c17 ObjectInputStream.java (enableResolveObject): Use correct security check.
* java/io/ObjectInputStream.java (enableResolveObject): Use
	correct security check.
	* java/io/ObjectOutputStream.java (enableReplaceObject): Use
	correct security check.

From-SVN: r48256
2001-12-21 22:51:41 +00:00
Tom Tromey d47eb5d3f2 re PR java/5165 (Loading class fields with a ConstantValue attribute)
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-21 21:59:27 +00:00
Tom Tromey 83d9978859 re PR libgcj/2428 (Classloader is not set)
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-21 19:47:50 +00:00
Tom Tromey ed178abb75 FlowLayout.java (FlowLayout(), [...]): Set gaps to 5.
* 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 19:38:25 +00:00
Bryce McKinlay 619c238cb9 * boehm.cc (_Jv_BuildGCDescr): Define unconditionally.
From-SVN: r48170
2001-12-19 02:45:20 +00:00
Bryce McKinlay 726abf5d79 jvm.h (_Jv_BuildGCDescr): Declare unconditionally.
* include/jvm.h (_Jv_BuildGCDescr): Declare unconditionally.
	* nogc.cc (_Jv_BuildGCDescr): Define unconditionally.

From-SVN: r48169
2001-12-19 01:59:28 +00:00
Tom Tromey e964a852b2 CollationElementIterator.java (secondaryOrder): Cast result to `short'.
* java/text/CollationElementIterator.java (secondaryOrder): Cast
	result to `short'.
	(tertiaryOrder): Likewise.

From-SVN: r48162
2001-12-18 17:27:43 +00:00
Tom Tromey 04942eac9b For PR libgcj/5103:
* 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-16 22:33:02 +00:00
Tom Tromey 68940f3f3c For PR java/5088:
* 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-16 22:28:35 +00:00
Tom Tromey 495513eea6 Makefile.in: Rebuilt.
* 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-16 22:25:14 +00:00
Bryce McKinlay 1e2bba3565 DataOutputStream (write (byte[], int, int)): Update "written" correctly.
* java/io/DataOutputStream (write (byte[], int, int)): Update
	"written" correctly. Fix from the ORP team.

From-SVN: r48050
2001-12-16 00:14:57 +00:00
Bryce McKinlay 861ef92859 java-tree.h (otable_methods, [...]): New field/global tree definitions.
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-15 08:31:49 +00:00
Bryce McKinlay d9fd7154ec Collections drop from Classpath:
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-15 07:47:03 +00:00
Hans Boehm 938f37772e prims.cc: Some old cleanups.
* 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-14 18:43:55 +00:00
Tom Tromey 4e41d14893 prims.cc (_Jv_RunMain): Use `using' to simplify code.
* prims.cc (_Jv_RunMain): Use `using' to simplify code.  Set
	_Jv_Jar_Class_Path early.

From-SVN: r47965
2001-12-13 04:19:36 +00:00
Tom Tromey 415791dba8 * jni.cc (call): Synchronize if required.
From-SVN: r47949
2001-12-12 20:58:41 +00:00
Tom Tromey 242f4945ac * gij.cc (main): Clarify --help output.
From-SVN: r47948
2001-12-12 20:56:08 +00:00
Tom Tromey a46ce590a8 * gnu/gcj/runtime/StringBuffer.java
(ensureCapacity_unsynchronized): Ensure we always get at least
	`minimumCapacity' characters in new buffer.

From-SVN: r47940
2001-12-12 16:50:01 +00:00
Tom Tromey 50cc5dd29b String.java (String): New constructor.
* 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-11 18:01:40 +00:00
Tom Tromey 1ca1c91bd9 For PR libgcj/1147:
* prims.cc (JvConvertArgv): Convert using current locale's
	encoding.

From-SVN: r47862
2001-12-11 04:03:57 +00:00
Tom Tromey d12a187337 re PR libgcj/5064 (java/lang/natClassLoader.cc doesn't compile on systems 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-11 03:58:40 +00:00
Per Bothner 6cc49add9c * gnu/gcj/xlib/XImage.java (toString): Add missing initialization.
From-SVN: r47834
2001-12-09 23:59:48 -08:00
Tom Tromey 6d8b12448d resolve.cc (_Jv_PrepareClass): Verify method here...
* 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-10 01:18:30 +00:00
Tom Tromey cca9fe755e Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (gnu/gcj/runtime/VMClassLoader.h): Use `::java'.

From-SVN: r47824
2001-12-10 00:30:24 +00:00
Tom Tromey 91c6dda6c7 Makefile.in: Rebuilt.
* 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-09 00:17:07 +00:00
Tom Tromey 3297bb4667 verify.cc (_Jv_BytecodeVerifier::is_assignable_from_slow): Handle case of array whose component type is not prepared.
* verify.cc (_Jv_BytecodeVerifier::is_assignable_from_slow):
	Handle case of array whose component type is not prepared.

From-SVN: r47799
2001-12-09 00:14:00 +00:00
Tom Tromey 941a878b35 ClassLoader.java (defineClass): Rethrow any LinkageError.
* java/lang/ClassLoader.java (defineClass): Rethrow any
	LinkageError.

From-SVN: r47780
2001-12-07 23:34:12 +00:00
Tom Tromey cb47fb054c ThreadGroup.java (uncaughtException): Print message to System.err.
* java/lang/ThreadGroup.java (uncaughtException): Print message to
	System.err.  Required by spec.

From-SVN: r47779
2001-12-07 23:32:24 +00:00
Tom Tromey 286f759e56 verify.cc (_Jv_BytecodeVerifier::branch_prepass): Set start_PC earlier, for error handling.
* verify.cc (_Jv_BytecodeVerifier::branch_prepass): Set start_PC
	earlier, for error handling.
	(_Jv_BytecodeVerifier::note_branch_target): Fixed branch target
	check.

From-SVN: r47769
2001-12-07 19:53:34 +00:00
Tom Tromey 21366e6fe5 verify.cc (_Jv_BytecodeVerifier::FLAG_JSR_TARGET): Removed.
* verify.cc (_Jv_BytecodeVerifier::FLAG_JSR_TARGET): Removed.
	(_Jv_BytecodeVerifier::note_branch_target): Likewise.

From-SVN: r47745
2001-12-07 03:30:47 +00:00
Tom Tromey c1bf99a2ab verify.cc (_Jv_BytecodeVerifier::type_val): Added unused_by_subroutine_type.
* verify.cc (_Jv_BytecodeVerifier::type_val): Added
	unused_by_subroutine_type.
	(_Jv_BytecodeVerifier::type::merge): Handle
	unused_by_subroutine_type.
	(_Jv_BytecodeVerifier::state::state): Added `ret_semantics'
	argument.
	(_Jv_BytecodeVerifier::state::copy): Likewise.
	(_Jv_BytecodeVerifier::push_jump_merge): Pass `ret_semantics' to
	state constructor.
	(_Jv_BytecodeVerifier::state::is_unmerged_ret_state): New method.
	(_Jv_BytecodeVerifier::pop_jump): Don't accept a jump which is
	from an unmerged ret.
	(_Jv_BytecodeVerifier::verify_instructions_0): Don't let an
	unmerged ret state skip verification in the fall-through case.
	(debug_print): New function.
	(_Jv_BytecodeVerifier::type::print): New method.
	(_Jv_BytecodeVerifier::state::print): New method.
	(_Jv_BytecodeVerifier::push_jump_merge): Print state.
	(_Jv_BytecodeVerifier::verify_instructions_0): Likewise.
	(_Jv_BytecodeVerifier::get_variable): Don't call note_variable.
	(_Jv_BytecodeVerifier::_Jv_BytecodeVerifier): Print debug
	information.

From-SVN: r47734
2001-12-06 23:06:11 +00:00
Tom Tromey 82ae782274 defineclass.cc (character): Removed.
* defineclass.cc (character): Removed.
	(prepare_character): Removed.
	(is_identifier_start): Use Character, not character.
	(is_identifier_part): Likewise.

From-SVN: r47684
2001-12-05 19:28:16 +00:00
Tom Tromey 0c88d7f819 verify.cc (_Jv_BytecodeVerifier::linked_utf8): New structure.
* verify.cc (_Jv_BytecodeVerifier::linked_utf8): New structure.
	(_Jv_BytecodeVerifier::utf8_list): New field.
	(_Jv_BytecodeVerifier::_Jv_BytecodeVerifier): Initialize it.
	(_Jv_BytecodeVerifier::~_Jv_BytecodeVerifier): Free it.
	(_Jv_BytecodeVerifier::make_utf8_const): New method.
	(_Jv_BytecodeVerifier::get_one_type): Use it.
	(_Jv_BytecodeVerifier::type::merge): When using local semantics,
	if the destination type is already unsuitable then we didn't
	change.

From-SVN: r47634
2001-12-04 23:54:43 +00:00
Tom Tromey ef9f3bc449 defineclass.cc (read_one_method_attribute): `end_pc' for an exception can be equal to code length.
* defineclass.cc (read_one_method_attribute): `end_pc' for an
	exception can be equal to code length.
	* verify.cc (_Jv_BytecodeVerifier::verify_instructions_0): Removed
	`start_PC' from error invocation where it didn't make sense, and
	updated error message.  Use `copy' to copy a state.  Only try to
	merge current state with saved state when we've fallen through
	from the previous instruction.
	(_Jv_BytecodeVerifier::pop_ref_or_return): New method.
	(_Jv_BytecodeVerifier::verify_instructions_0) [op_astore_0]: Use
	pop_ref_or_return.
	(_Jv_BytecodeVerifier::verify_instructions_0) [op_astore]:
	Likewise.
	(_Jv_BytecodeVerifier::push_jump_merge): Pass max_locals, not
	max_stack, to merge.
	(_Jv_BytecodeVerifier::verify_instructions_0): Likewise.
	(_Jv_BytecodeVerifier::push_jump_merge): Merge from new state into
	state at branch target, not vice versa.
	(_Jv_BytecodeVerifier::branch_prepass): Allow end of exception to
	be equal to code length.  Removed redundant test to see if
	exception start is after exception end.
	(_Jv_BytecodeVerifier::verify_instructions_0): Type of argument to
	`finally' is Throwable.

From-SVN: r47623
2001-12-04 20:18:35 +00:00
Bryce McKinlay 83de3bc47f * Makefile.in: Rebuilt with automake-gcj.
From-SVN: r47593
2001-12-04 07:21:25 +00:00
Tom Tromey 64d3a1b48e defineclass.cc (handleMethodsEnd): Invoke verifier here...
* defineclass.cc (handleMethodsEnd): Invoke verifier here...
	(handleCodeAttribute): ... not here.
	* verify.cc (_Jv_BytecodeVerifier::state::state): Use `copy', not
	structure assignment.

From-SVN: r47591
2001-12-04 06:37:53 +00:00
Bryce McKinlay c4d7a90e8a Makefile.am (nat_files, [...]): Make sure the dependencies don't get deleted if compilation fails.
* Makefile.am (nat_files, x_nat_files): Make sure the dependencies
	don't get deleted if compilation fails.
	* Makefile.in: Rebuilt.

From-SVN: r47520
2001-12-02 04:29:16 +00:00
Bryce McKinlay fc6e87b33f Remove ">>>"
From-SVN: r47472
2001-11-30 03:05:09 +00:00
Bryce McKinlay 9dd668d2fc Makefile.am (nat_headers, [...]): Depend on .class files, not libgcj.jar.
* Makefile.am (nat_headers, x_nat_headers): Depend on .class files, not
	libgcj.jar.
	(nat_files, x_nat_files): Build native files in subdirectories using
	the same dependency options as the java files.
	(gnu/gcj/runtime/FirstThread.h): Remove explicit rule and friend
	declarations.
	* configure.in: Put dependencies for .cc files in deps.mak.
	* Makefile.in: Rebuilt.
	* configure: Rebuilt.

From-SVN: r47471
2001-11-30 03:04:01 +00:00
Tom Tromey bea31ffbcb Fix for PR libgcj/2024, plus other class name cleanups:
* 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-26 06:40:06 +00:00
Tom Tromey fa88ce26e5 verify.cc (_Jv_BytecodeVerifier::branch_prepass): Use java_opcode as type for switch.
* verify.cc (_Jv_BytecodeVerifier::branch_prepass): Use
	java_opcode as type for switch.
	[op_wide]: Likewise.
	(_Jv_BytecodeVerifier::verify_instructions_0): Likewise.
	[op_invokevirtual]: Likewise.
	* include/java-insns.h (java_opcode): Give enum a name.

From-SVN: r47330
2001-11-25 19:48:19 +00:00
Tom Tromey 200f4143a2 re PR libgcj/4583 (problems BigDecimal(double) ctor.)
Fix for PR libgcj/4583:
	* java/math/BigDecimal.java (BigDecimal(double)): Rewrote.
	(BigDecimal(String)): Likewise.

From-SVN: r47329
2001-11-25 19:32:28 +00:00
Tom Tromey 8051c3d633 verify.cc (_Jv_BytecodeVerifier::branch_prepass): Uses two operand bytes, not one.
* verify.cc (_Jv_BytecodeVerifier::branch_prepass) [op_iinc]:
	Uses two operand bytes, not one.
	[op_arraylength]: Has no operands in bytecode.
	(_Jv_BytecodeVerifier::push_jump): Fixed call to
	check_no_uninitialized_objects.
	(_Jv_BytecodeVerifier::push_exception_jump): Likewise.
	(_Jv_BytecodeVerifier::handle_ret_insn): Likewise.
	(_Jv_BytecodeVerifier::handle_jsr_insn): Likewise.

From-SVN: r47202
2001-11-20 05:16:17 +00:00
Tom Tromey 1578fa9545 verify.cc (_Jv_BytecodeVerifier::require_array_type): Special case for boolean arrays.
* verify.cc (_Jv_BytecodeVerifier::require_array_type): Special
	case for boolean arrays.

	* verify.cc (_Jv_BytecodeVerifier::compute_jump): Put PC into
	error message.

From-SVN: r47190
2001-11-20 00:38:40 +00:00
Tom Tromey 94e1e142fa verify.cc (_Jv_BytecodeVerifier::verify_instructions_0): Shift argument is an int, not a long.
* verify.cc (_Jv_BytecodeVerifier::verify_instructions_0)
	[op_lshl, op_lshr, op_lushr]: Shift argument is an int, not a
	long.

From-SVN: r47177
2001-11-19 18:28:28 +00:00
Tom Tromey d68e5f555d verify.cc (type::to_array): New method.
* verify.cc (type::to_array): New method.
	(_Jv_BytecodeVerifier::verify_instructions_0) [op_anewarray]:
	Construct new array type.

From-SVN: r47165
2001-11-19 07:08:36 +00:00
Tom Tromey 7db43d37b1 verify.cc (_Jv_BytecodeVerifier::branch_prepass): Skip a short, not a byte.
* verify.cc (_Jv_BytecodeVerifier::branch_prepass) [op_sipush]:
	Skip a short, not a byte.
	[op_newarray]: Skip a byte, not a short.

From-SVN: r47163
2001-11-19 02:13:08 +00:00
Tom Tromey 4c6d901a76 verify.cc (_Jv_BytecodeVerifier::get_type_val_for_signature): Added `B' case.
* verify.cc (_Jv_BytecodeVerifier::get_type_val_for_signature):
	Added `B' case.

From-SVN: r47162
2001-11-19 01:37:28 +00:00
Tom Tromey 590077b070 verify.cc (_Jv_BytecodeVerifier::get_ushort): Use `jint' for temporary values.
* verify.cc (_Jv_BytecodeVerifier::get_ushort): Use `jint' for
	temporary values.
	(_Jv_BytecodeVerifier::get_short): Likewise.
	(_Jv_BytecodeVerifier::get_int): Likewise.
	(_Jv_BytecodeVerifier::check_return_type): Reverse ordering of
	`compatible' call.

From-SVN: r47161
2001-11-19 01:04:15 +00:00
Tom Tromey e7b35eec24 verify.cc (_Jv_BytecodeVerifier::pop_type): Put PC into error message.
* verify.cc (_Jv_BytecodeVerifier::pop_type): Put PC into error
	message.
	(_Jv_BytecodeVerifier::pop64): Likewise.
	(_Jv_BytecodeVerifier::pop32): Likewise.
	(_Jv_BytecodeVerifier::pop_raw): Likewise.
	(_Jv_BytecodeVerifier::pop_type): Promote the match type.
	(type::set_initialized): Only modify uninitialized types.
	(type::set_uninitialized): Fix shadowing bug.  Simplify code.

From-SVN: r47158
2001-11-19 00:31:37 +00:00
Tom Tromey 604407070b verify.cc: Include StringBuffer.h.
* verify.cc: Include StringBuffer.h.
	(verify_fail): Added pc argument.  Use StringBuffer to construct
	exception message.
	(_Jv_BytecodeVerifier::verify_instructions_0): Put PC into error
	message.
	(_Jv_BytecodeVerifier::check_return_type): Likewise.
	(_Jv_BytecodeVerifier::handle_field_or_method): Likewise.
	(_Jv_BytecodeVerifier::check_constant): Likewise.
	(_Jv_BytecodeVerifier::check_class_constant): Likewise.
	(_Jv_BytecodeVerifier::check_pool_index): Likewise.
	(_Jv_BytecodeVerifier::get_variable): Likewise.
	(_Jv_BytecodeVerifier::branch_prepass): Likewise.  Also, correctly
	check exception handler endpoint.
	(_Jv_BytecodeVerifier::verify_instructions_0): Correctly handle
	wide arguments to current method.
	(_Jv_BytecodeVerifier::check_wide_constant): New method.
	(_Jv_BytecodeVerifier::verify_instructions_0) [op_ldc2_w]: Use
	it.

From-SVN: r47155
2001-11-18 23:04:28 +00:00
Anthony Green aee4201707 Obvious jni weak reference fix
From-SVN: r47128
2001-11-17 21:32:22 +00:00
Tom Tromey b34e9a5b9f verify.cc (_Jv_BytecodeVerifier::check_field_constant): Handle case where field has primitive type.
* verify.cc (_Jv_BytecodeVerifier::check_field_constant): Handle
	case where field has primitive type.

From-SVN: r47112
2001-11-16 23:39:34 +00:00
Tom Tromey f6b733ed1f verify.cc (_Jv_BytecodeVerifier::is_assignable_from_slow): New method.
* verify.cc (_Jv_BytecodeVerifier::is_assignable_from_slow): New
	method.
	(type::compatible): Use it.
	(type::merge): Likewise.
	(type::promote): Return a `type&'.
	(get_one_type): Promote return value.

From-SVN: r47097
2001-11-16 19:59:16 +00:00
Tom Tromey 54b6b24152 Re-merge with Classpath, from Brian Jones:
* 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-16 19:52:24 +00:00
Mark Wielaard 74808218ae Timer.java (TaskQueue.isStopped): Remove method.
* 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-16 19:00:47 +00:00
Tom Tromey f50e7a2d92 verify.cc (type::compatible): Use _Jv_IsAssignableFrom.
* verify.cc (type::compatible): Use _Jv_IsAssignableFrom.
	(type::merge): Likewise.

From-SVN: r47077
2001-11-16 01:28:55 +00:00
Hans Boehm aa0149ff0c natString.cc: correct argument order for _Jv_AllocPtrFreeObj
* java/lang/natString.cc: correct argument order for
	_Jv_AllocPtrFreeObj

From-SVN: r47035
2001-11-15 02:22:52 +00:00
Tom Tromey 6c5a8271d4 verify.cc (class _Jv_BytecodeVerifier): Fixed logic.
* verify.cc (class _Jv_BytecodeVerifier) [op_dup2]: Fixed logic.
	[op_dup_x2]: Likewise.
	[op_dup2_x1]: Likewise.
	[op_dup2_x2]: Likewise.
	(branch_prepass): Added `op_newarray' case.  Updated unrecognized
	instruction error.
	(verify_instructions_0): Updated unrecognized instruction error.

From-SVN: r47033
2001-11-15 00:24:38 +00:00
Tom Tromey 6d88e1c332 Constructor.java (toString): Use more efficient form of Modifier.toString().
* java/lang/reflect/Constructor.java (toString): Use more
	efficient form of Modifier.toString().

From-SVN: r47031
2001-11-14 23:42:38 +00:00
Tom Tromey 81bc01c265 Re-merges with Classpath, from various people:
* 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-14 22:42:42 +00:00
Tom Tromey 852d3dad0d Re-merges with Classpath, from various people:
* 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-14 19:11:52 +00:00
Tom Tromey f9d44b00b6 re PR libgcj/4859 (java.util.Timer class throw IllegalStateException on 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-13 23:09:23 +00:00