Commit Graph

2238 Commits

Author SHA1 Message Date
Tom Tromey
9e01bff779 OutputStreamWriter.java (writeChars): Use a 'do' loop.
* java/io/OutputStreamWriter.java (writeChars): Use a 'do' loop.
	Set 'out.count' earlier.
	(close): Call setFinished on converter.
	(flush): Always write work buffer.
	* java/io/PrintStream.java (writeChars): Do 'do' loop.
	(close): Call setFinished on converter.  Write a 'flush' array.
	* java/lang/natString.cc (getBytes): Call setFinished on
	converter.
	* gnu/gcj/convert/CharsetToBytesAdaptor.java (hasBytes): New
	field.
	(write): Set hasBytes.  Changed 'finished' logic.
	(havePendingBytes): Rewrote.
	(setFinished): New method.
	* gnu/gcj/convert/UnicodeToBytes.java (setFinished): New method.
	* testsuite/libjava.lang/RH194522.java: New file.
	* testsuite/libjava.lang/RH194522.out: New file.

From-SVN: r115039
2006-06-27 20:38:10 +00:00
Tom Tromey
6d82bb8521 natField.cc (getAddr): Allow setting of final field when it is accessible.
* java/lang/reflect/natField.cc (getAddr): Allow setting of final
	field when it is accessible.

From-SVN: r114896
2006-06-22 16:59:15 +00:00
Andrew Haley
e046c56eee class.c (make_class_data): When using flag_indirect_classes, don't initialize the vtable of Class instances.
2006-06-16  Andrew Haley  <aph@redhat.com>

        * class.c (make_class_data): When using flag_indirect_classes,
        don't initialize the vtable of Class instances.

2006-06-16  Andrew Haley  <aph@redhat.com>

        * java/lang/natClassLoader.cc (_Jv_NewClassFromInitializer): Don't
        copy the whole Class instance from the initializer: instead, copy
        everything but the first word (the vtable pointer).
        Change prototype to (const char* class_initializer).
        (_Jv_RegisterNewClasses): Change prototype to (const char**).
        * java/lang/Class.h (_Jv_RegisterNewClasses): Change prototype to
        (const char**).

From-SVN: r114714
2006-06-16 08:56:29 +00:00
Tom Tromey
45559ef181 re PR libgcj/27730 (Thread.getId() needs implemented)
PR libgcj/27730:
	* java/lang/Thread.java (threadId): New field.
	(nextThreadId): New static field.
	(Thread): Initialize new field.
	(getId): New method.

From-SVN: r114524
2006-06-09 21:37:32 +00:00
Tom Tromey
0cf32584ca * java/lang/Class.java (getClassLoaderInternal): Now native.
From-SVN: r114523
2006-06-09 21:33:32 +00:00
Thomas Fitzsimmons
02440ca432 String.java, [...]: Merge from GNU Classpath HEAD.
2006-06-09  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* java/lang/String.java, classpath/native/jni/classpath/jcl.h,
	classpath/native/jni/qt-peer/eventmethods.h,
	classpath/native/jni/qt-peer/qtmenupeer.cpp,
	classpath/native/jni/qt-peer/.cvsignore,
	classpath/native/jni/gtk-peer/gdkdisplay.h,
	classpath/native/jni/gtk-peer/cairographics2d.h,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_FreetypeGlyphVector.c,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.c,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphicsCopy.c,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c,
	classpath/native/jni/gtk-peer/.cvsignore,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkVolatileImage.c,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCanvasPeer.c,
	classpath/native/jni/gtk-peer/gtkpeer.h,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoSurface.c,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice.c,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFramePeer.c,
	classpath/native/jni/gtk-peer/Makefile.am,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c,
	classpath/native/jawt/Makefile.am,
	classpath/native/jawt/.cvsignore,
	classpath/native/target/Linux/Makefile.in,
	classpath/native/plugin/gcjwebplugin.cc,
	classpath/native/plugin/Makefile.am,
	classpath/native/plugin/.cvsignore,
	classpath/resource/Makefile.in,
	classpath/gnu/java/awt/peer/gtk/VolatileImageGraphics.java,
	classpath/gnu/java/awt/peer/gtk/CairoGraphics2D.java,
	classpath/gnu/java/awt/peer/gtk/CairoSurface.java,
	classpath/gnu/java/awt/peer/gtk/GdkFontPeer.java,
	classpath/gnu/java/awt/peer/gtk/GdkPixbufDecoder.java,
	classpath/gnu/java/awt/peer/gtk/FreetypeGlyphVector.java,
	classpath/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java,
	classpath/gnu/java/awt/peer/gtk/GdkGraphics2D.java,
	classpath/gnu/java/awt/peer/gtk/ComponentGraphicsCopy.java,
	classpath/gnu/java/awt/peer/gtk/GtkComponentPeer.java,
	classpath/gnu/java/awt/peer/gtk/GdkGraphics.java,
	classpath/gnu/java/awt/peer/gtk/GtkToolkit.java,
	classpath/gnu/java/awt/peer/gtk/GdkScreenGraphicsDevice.java,
	classpath/gnu/java/awt/peer/gtk/BufferedImageGraphics.java,
	classpath/gnu/java/awt/peer/gtk/GdkTextLayout.java,
	classpath/gnu/java/awt/peer/gtk/GdkGraphicsConfiguration.java,
	classpath/gnu/java/awt/peer/gtk/ComponentGraphics.java,
	classpath/gnu/java/awt/peer/gtk/CairoSurfaceGraphics.java,
	classpath/gnu/java/awt/peer/gtk/GtkImage.java,
	classpath/gnu/java/awt/peer/gtk/GtkVolatileImage.java,
	classpath/gnu/java/awt/peer/gtk/GdkGlyphVector.java,
	classpath/gnu/java/awt/peer/gtk/GtkCanvasPeer.java,
	classpath/gnu/java/awt/peer/swing/SwingContainerPeer.java,
	classpath/gnu/java/awt/peer/swing/SwingComponent.java,
	classpath/gnu/java/awt/peer/swing/SwingTextFieldPeer.java,
	classpath/gnu/java/awt/peer/swing/SwingMenuBarPeer.java,
	classpath/gnu/java/awt/peer/swing/SwingFramePeer.java,
	classpath/gnu/java/awt/peer/swing/SwingComponentPeer.java,
	classpath/gnu/java/awt/peer/swing/SwingWindowPeer.java,
	classpath/gnu/java/awt/print/JavaPrinterJob.java,
	classpath/gnu/java/awt/print/PostScriptGraphics2D.java,
	classpath/gnu/java/awt/print/SpooledDocument.java,
	classpath/gnu/java/awt/print/JavaPrinterGraphics.java,
	classpath/gnu/java/awt/BitwiseXORComposite.java,
	classpath/gnu/java/awt/font/GNUGlyphVector.java,
	classpath/gnu/java/awt/font/opentype/NameDecoder.java,
	classpath/gnu/java/awt/java2d/RasterGraphics.java,
	classpath/gnu/java/awt/java2d/TexturePaintContext.java,
	classpath/gnu/java/awt/java2d/PolyEdge.java,
	classpath/gnu/java/awt/java2d/AbstractGraphics2D.java,
	classpath/gnu/java/awt/java2d/AlphaCompositeContext.java,
	classpath/gnu/java/awt/java2d/ImagePaint.java,
	classpath/gnu/java/awt/Buffers.java,
	classpath/gnu/classpath/Configuration.java.in,
	classpath/gnu/javax/swing/text/html/CombinedAttributes.java,
	classpath/gnu/javax/swing/text/html/CharacterAttributeTranslator.java,
	classpath/gnu/javax/swing/text/html/parser/htmlAttributeSet.java,
	classpath/gnu/javax/swing/text/html/parser/SmallHtmlAttributeSet.java,
	classpath/gnu/javax/swing/text/html/ImageViewIconFactory.java,
	classpath/tools/toolwrapper.c,
	classpath/tools/gnu/classpath/tools/native2ascii/Native2ASCII.java,
	classpath/tools/gnu/classpath/tools/native2ascii/Messages.java,
	classpath/tools/gnu/classpath/tools/getopt/FileArgumentCallback.java,
	classpath/tools/gnu/classpath/tools/getopt/OptionGroup.java,
	classpath/tools/gnu/classpath/tools/getopt/OptionException.java,
	classpath/tools/gnu/classpath/tools/getopt/Messages.java,
	classpath/tools/gnu/classpath/tools/getopt/Option.java,
	classpath/tools/gnu/classpath/tools/getopt/Parser.java,
	classpath/tools/gnu/classpath/tools/getopt/ClasspathToolParser.java,
	classpath/tools/gnu/classpath/tools/jarsigner/JarSigner.java,
	classpath/tools/gnu/classpath/tools/jarsigner/Main.java,
	classpath/tools/gnu/classpath/tools/jarsigner/Messages.java,
	classpath/tools/gnu/classpath/tools/jarsigner/package.html,
	classpath/tools/gnu/classpath/tools/keytool/ListCmd.java,
	classpath/tools/gnu/classpath/tools/keytool/StorePasswdCmd.java,
	classpath/tools/gnu/classpath/tools/keytool/ExportCmd.java,
	classpath/tools/gnu/classpath/tools/keytool/GenKeyCmd.java,
	classpath/tools/gnu/classpath/tools/keytool/Messages.java,
	classpath/tools/gnu/classpath/tools/keytool/package.html,
	classpath/tools/gnu/classpath/tools/keytool/Command.java,
	classpath/tools/gnu/classpath/tools/keytool/IdentityDBCmd.java,
	classpath/tools/gnu/classpath/tools/keytool/Main.java,
	classpath/tools/gnu/classpath/tools/keytool/DeleteCmd.java,
	classpath/tools/gnu/classpath/tools/keytool/CertReqCmd.java,
	classpath/tools/gnu/classpath/tools/keytool/SelfCertCmd.java,
	classpath/tools/gnu/classpath/tools/keytool/KeyCloneCmd.java,
	classpath/tools/gnu/classpath/tools/keytool/KeyPasswdCmd.java,
	classpath/tools/gnu/classpath/tools/keytool/ImportCmd.java,
	classpath/tools/gnu/classpath/tools/keytool/PrintCertCmd.java,
	classpath/tools/gnu/classpath/tools/rmi/registry/package.html,
	classpath/tools/gnu/classpath/tools/rmi/RMIC.txt,
	classpath/tools/gnu/classpath/tools/rmi/RMIC.java,
	classpath/tools/gnu/classpath/tools/appletviewer/ErrorApplet.java,
	classpath/tools/gnu/classpath/tools/appletviewer/AppletClassLoader.java,
	classpath/tools/gnu/classpath/tools/appletviewer/CommonAppletContext.java,
	classpath/tools/gnu/classpath/tools/appletviewer/StandaloneAppletContext.java,
	classpath/tools/gnu/classpath/tools/appletviewer/AppletSecurityManager.java,
	classpath/tools/gnu/classpath/tools/appletviewer/PluginAppletContext.java,
	classpath/tools/gnu/classpath/tools/appletviewer/AppletWarning.java,
	classpath/tools/gnu/classpath/tools/appletviewer/StandaloneAppletViewer.java,
	classpath/tools/gnu/classpath/tools/appletviewer/AppletTag.java,
	classpath/tools/gnu/classpath/tools/appletviewer/ConsoleDialog.java,
	classpath/tools/gnu/classpath/tools/appletviewer/Main.java,
	classpath/tools/gnu/classpath/tools/appletviewer/StandaloneAppletWindow.java,
	classpath/tools/gnu/classpath/tools/appletviewer/PluginAppletViewer.java,
	classpath/tools/gnu/classpath/tools/appletviewer/TagParser.java,
	classpath/tools/gnu/classpath/tools/appletviewer/PluginAppletWindow.java,
	classpath/tools/gnu/classpath/tools/appletviewer/CommonAppletStub.java,
	classpath/tools/gnu/classpath/tools/serialver/Messages.java,
	classpath/tools/gnu/classpath/tools/serialver/SerialVer.java,
	classpath/tools/gnu/classpath/tools/jar/Creator.java,
	classpath/tools/gnu/classpath/tools/jar/Entry.java,
	classpath/tools/gnu/classpath/tools/jar/Lister.java,
	classpath/tools/gnu/classpath/tools/jar/Main.java,
	classpath/tools/gnu/classpath/tools/jar/Updater.java,
	classpath/tools/gnu/classpath/tools/jar/Messages.java,
	classpath/tools/gnu/classpath/tools/jar/Extractor.java,
	classpath/tools/gnu/classpath/tools/jar/Action.java,
	classpath/tools/gnu/classpath/tools/jar/Indexer.java,
	classpath/tools/gnu/classpath/tools/jar/WorkSet.java,
	classpath/tools/gnu/classpath/tools/giop/GRMIC.txt,
	classpath/tools/gnu/classpath/tools/giop/grmic/GiopRmicCompiler.java,
	classpath/tools/gnu/classpath/tools/giop/GRMIC.java,
	classpath/tools/Makefile.am, classpath/tools/jarsigner.in,
	classpath/tools/keytool.in, classpath/tools/appletviewer.in,
	classpath/tools/.cvsignore, classpath/configure.ac,
	classpath/javax/swing/JTabbedPane.java,
	classpath/javax/swing/AbstractButton.java,
	classpath/javax/swing/JViewport.java,
	classpath/javax/swing/KeyboardManager.java,
	classpath/javax/swing/JMenuItem.java,
	classpath/javax/swing/JMenuBar.java,
	classpath/javax/swing/MenuSelectionManager.java,
	classpath/javax/swing/JOptionPane.java,
	classpath/javax/swing/JSpinner.java,
	classpath/javax/swing/JCheckBoxMenuItem.java,
	classpath/javax/swing/JEditorPane.java,
	classpath/javax/swing/JFormattedTextField.java,
	classpath/javax/swing/JTree.java,
	classpath/javax/swing/CellRendererPane.java,
	classpath/javax/swing/JScrollPane.java,
	classpath/javax/swing/tree/VariableHeightLayoutCache.java,
	classpath/javax/swing/tree/TreeNode.java,
	classpath/javax/swing/tree/FixedHeightLayoutCache.java,
	classpath/javax/swing/tree/DefaultTreeCellEditor.java,
	classpath/javax/swing/tree/TreePath.java,
	classpath/javax/swing/tree/RowMapper.java,
	classpath/javax/swing/tree/DefaultMutableTreeNode.java,
	classpath/javax/swing/tree/DefaultTreeModel.java,
	classpath/javax/swing/tree/AbstractLayoutCache.java,
	classpath/javax/swing/tree/TreeSelectionModel.java,
	classpath/javax/swing/tree/DefaultTreeSelectionModel.java,
	classpath/javax/swing/tree/DefaultTreeCellRenderer.java,
	classpath/javax/swing/tree/ExpandVetoException.java,
	classpath/javax/swing/JList.java,
	classpath/javax/swing/table/JTableHeader.java,
	classpath/javax/swing/table/AbstractTableModel.java,
	classpath/javax/swing/table/DefaultTableModel.java,
	classpath/javax/swing/table/TableCellEditor.java,
	classpath/javax/swing/table/TableCellRenderer.java,
	classpath/javax/swing/ProgressMonitor.java,
	classpath/javax/swing/JToolBar.java,
	classpath/javax/swing/TransferHandler.java,
	classpath/javax/swing/DefaultCellEditor.java,
	classpath/javax/swing/DefaultButtonModel.java,
	classpath/javax/swing/JLayeredPane.java,
	classpath/javax/swing/text/DefaultEditorKit.java,
	classpath/javax/swing/text/DefaultCaret.java,
	classpath/javax/swing/text/FieldView.java,
	classpath/javax/swing/text/JTextComponent.java,
	classpath/javax/swing/text/TextAction.java,
	classpath/javax/swing/text/StyleContext.java,
	classpath/javax/swing/text/html/HTMLDocument.java,
	classpath/javax/swing/text/html/MinimalHTMLWriter.java,
	classpath/javax/swing/text/html/ImageView.java,
	classpath/javax/swing/text/html/HTMLEditorKit.java,
	classpath/javax/swing/text/AbstractWriter.java,
	classpath/javax/swing/text/GapContent.java,
	classpath/javax/swing/text/Utilities.java,
	classpath/javax/swing/text/PlainView.java,
	classpath/javax/swing/UIManager.java,
	classpath/javax/swing/JSplitPane.java,
	classpath/javax/swing/JComponent.java,
	classpath/javax/swing/SwingUtilities.java,
	classpath/javax/swing/border/AbstractBorder.java,
	classpath/javax/swing/border/CompoundBorder.java,
	classpath/javax/swing/border/TitledBorder.java,
	classpath/javax/swing/border/MatteBorder.java,
	classpath/javax/swing/border/BevelBorder.java,
	classpath/javax/swing/RepaintManager.java,
	classpath/javax/swing/JTable.java,
	classpath/javax/swing/UIDefaults.java,
	classpath/javax/swing/DefaultDesktopManager.java,
	classpath/javax/swing/JMenu.java,
	classpath/javax/swing/JLabel.java,
	classpath/javax/swing/JSlider.java,
	classpath/javax/swing/plaf/basic/BasicToolBarUI.java,
	classpath/javax/swing/plaf/basic/BasicButtonUI.java,
	classpath/javax/swing/plaf/basic/BasicOptionPaneUI.java,
	classpath/javax/swing/plaf/basic/BasicTextAreaUI.java,
	classpath/javax/swing/plaf/basic/BasicToggleButtonUI.java,
	classpath/javax/swing/plaf/basic/BasicSpinnerUI.java,
	classpath/javax/swing/plaf/basic/BasicSliderUI.java,
	classpath/javax/swing/plaf/basic/BasicTabbedPaneUI.java,
	classpath/javax/swing/plaf/basic/BasicComboPopup.java,
	classpath/javax/swing/plaf/basic/BasicCheckBoxUI.java,
	classpath/javax/swing/plaf/basic/BasicInternalFrameUI.java,
	classpath/javax/swing/plaf/basic/BasicProgressBarUI.java,
	classpath/javax/swing/plaf/basic/BasicRadioButtonUI.java,
	classpath/javax/swing/plaf/basic/BasicPanelUI.java,
	classpath/javax/swing/plaf/basic/BasicSplitPaneUI.java,
	classpath/javax/swing/plaf/basic/BasicTreeUI.java,
	classpath/javax/swing/plaf/basic/BasicTableHeaderUI.java,
	classpath/javax/swing/plaf/basic/BasicFileChooserUI.java,
	classpath/javax/swing/plaf/basic/BasicScrollPaneUI.java,
	classpath/javax/swing/plaf/basic/BasicComboBoxUI.java,
	classpath/javax/swing/plaf/basic/BasicListUI.java,
	classpath/javax/swing/plaf/basic/BasicIconFactory.java,
	classpath/javax/swing/plaf/basic/BasicTextUI.java,
	classpath/javax/swing/plaf/basic/BasicLookAndFeel.java,
	classpath/javax/swing/plaf/basic/BasicDirectoryModel.java,
	classpath/javax/swing/plaf/basic/BasicRootPaneUI.java,
	classpath/javax/swing/plaf/basic/BasicTableUI.java,
	classpath/javax/swing/plaf/basic/SharedUIDefaults.java,
	classpath/javax/swing/plaf/multi/MultiComboBoxUI.java,
	classpath/javax/swing/plaf/multi/MultiListUI.java,
	classpath/javax/swing/plaf/multi/MultiSplitPaneUI.java,
	classpath/javax/swing/plaf/multi/MultiFileChooserUI.java,
	classpath/javax/swing/plaf/multi/MultiOptionPaneUI.java,
	classpath/javax/swing/plaf/multi/MultiTabbedPaneUI.java,
	classpath/javax/swing/plaf/multi/MultiLookAndFeel.java,
	classpath/javax/swing/plaf/metal/MetalSliderUI.java,
	classpath/javax/swing/plaf/metal/MetalIconFactory.java,
	classpath/javax/swing/plaf/metal/MetalComboBoxIcon.java,
	classpath/javax/swing/plaf/metal/MetalTabbedPaneUI.java,
	classpath/javax/swing/plaf/metal/MetalLookAndFeel.java,
	classpath/javax/swing/plaf/metal/MetalCheckBoxUI.java,
	classpath/javax/swing/plaf/metal/MetalSeparatorUI.java,
	classpath/javax/swing/plaf/metal/MetalBorders.java,
	classpath/javax/swing/plaf/metal/MetalSplitPaneDivider.java,
	classpath/javax/swing/plaf/metal/MetalScrollBarUI.java,
	classpath/javax/swing/plaf/metal/MetalRootPaneUI.java,
	classpath/javax/swing/plaf/metal/MetalInternalFrameUI.java,
	classpath/javax/swing/plaf/metal/MetalRadioButtonUI.java,
	classpath/javax/swing/plaf/metal/MetalToolTipUI.java,
	classpath/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java,
	classpath/javax/swing/plaf/metal/MetalFileChooserUI.java,
	classpath/javax/swing/plaf/metal/MetalUtils.java,
	classpath/javax/swing/plaf/metal/MetalComboBoxButton.java,
	classpath/javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.java,
	classpath/javax/swing/plaf/metal/MetalButtonUI.java,
	classpath/javax/swing/JPopupMenu.java,
	classpath/javax/swing/JProgressBar.java,
	classpath/javax/swing/WindowConstants.java,
	classpath/javax/swing/JFrame.java,
	classpath/javax/swing/JFileChooser.java,
	classpath/javax/swing/JComboBox.java,
	classpath/javax/swing/event/EventListenerList.java,
	classpath/javax/swing/ListSelectionModel.java,
	classpath/javax/swing/JScrollBar.java,
	classpath/java/text/SimpleDateFormat.java,
	classpath/java/text/NumberFormat.java,
	classpath/java/text/class-dependencies.conf,
	classpath/java/awt/image/ColorModel.java,
	classpath/java/awt/image/BufferedImage.java,
	classpath/java/awt/Window.java,
	classpath/java/awt/ContainerOrderFocusTraversalPolicy.java,
	classpath/java/awt/LightweightDispatcher.java,
	classpath/java/awt/EventDispatchThread.java,
	classpath/java/awt/BasicStroke.java,
	classpath/java/awt/ColorPaintContext.java,
	classpath/java/awt/Container.java,
	classpath/java/awt/TexturePaint.java,
	classpath/java/awt/Component.java, classpath/java/awt/Font.java,
	classpath/java/awt/GraphicsConfiguration.java,
	classpath/java/awt/DefaultKeyboardFocusManager.java,
	classpath/java/awt/print/PrinterJob.java,
	classpath/java/awt/im/InputContext.java,
	classpath/java/awt/dnd/DragGestureRecognizer.java,
	classpath/java/awt/Toolkit.java,
	classpath/java/awt/font/GraphicAttribute.java,
	classpath/java/awt/font/ImageGraphicAttribute.java,
	classpath/java/awt/font/GlyphVector.java,
	classpath/java/awt/font/GlyphMetrics.java,
	classpath/java/awt/font/ShapeGraphicAttribute.java,
	classpath/java/awt/Graphics2D.java,
	classpath/include/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.h,
	classpath/include/gnu_java_awt_peer_gtk_ComponentGraphics.h,
	classpath/include/gnu_java_awt_peer_gtk_CairoGraphics2D.h,
	classpath/include/gnu_java_awt_peer_gtk_FreetypeGlyphVector.h,
	classpath/include/gnu_java_awt_peer_gtk_GtkCanvasPeer.h,
	classpath/include/config.h.in,
	classpath/include/gnu_java_awt_peer_gtk_GdkTextLayout.h,
	classpath/include/gnu_java_awt_peer_gtk_GtkComponentPeer.h,
	classpath/include/gnu_java_awt_peer_gtk_GdkFontPeer.h,
	classpath/include/gnu_java_awt_peer_gtk_ComponentGraphicsCopy.h,
	classpath/include/gnu_java_awt_peer_gtk_GtkVolatileImage.h,
	classpath/include/gnu_java_awt_peer_gtk_GtkImage.h,
	classpath/include/gnu_java_awt_peer_gtk_CairoSurface.h,
	classpath/include/gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice.h:
	Merge from GNU Classpath HEAD.

From-SVN: r114510
2006-06-09 16:07:07 +00:00
Gary Benson
1e19cfd26d natFilePosix.cc (getCanonicalPath): Rewritten.
* java/io/natFilePosix.cc (getCanonicalPath): Rewritten.
	* configure.ac: Remove realpath check and add checks for
	lstat and readlink.
	* configure: Rebuilt.
	* include/config.h.in: Likewise.
	* java/io/File.java: Javadoc fix.

From-SVN: r114434
2006-06-06 15:09:20 +00:00
Thomas Fitzsimmons
69037dd991 VMClassLoader.java (initialize): Set default library control to LIB_NEVER.
2006-05-31  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* java/lang/VMClassLoader.java (initialize): Set default library
	control to LIB_NEVER.

From-SVN: r114277
2006-05-31 17:47:44 +00:00
Thomas Fitzsimmons
2d25461bcb natThread.cc (countStackFrames): Do not throw UnsupportedOperationException.
2006-05-29  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* java/lang/natThread.cc (countStackFrames): Do not throw
	UnsupportedOperationException.
	(resume): Likewise.
	(stop): Likewise.
	(suspend): Likewise.

From-SVN: r114218
2006-05-29 22:04:13 +00:00
Tom Tromey
91f8ce668b re PR libgcj/27024 (Implement URLConnection.getFileNameMap)
PR libgcj/27024:
	* sources.am, Makefile.in: Rebuilt.
	* gnu/java/net/DefaultContentHandlerFactory.java: Removed.
	* java/net/URLConnection.java: Removed.

From-SVN: r114056
2006-05-24 21:44:34 +00:00
Tom Tromey
5aca4c41f7 re PR libgcj/27729 (Field, Method and Constructor need isSynthetic() implemetation)
gcc/java:
	PR libgcj/27729:
	* jcf.h (ACC_INVISIBLE): Changed value.
libjava:
	PR libgcj/27729:
	* java/lang/reflect/natField.cc (getAddr): Added parens.
	* java/lang/reflect/natConstructor.cc (getModifiersInternal):
	Renamed.  Don't mask flags.
	* java/lang/reflect/Constructor.java (CONSTRUCTOR_MODIFIERS): New
	constant.
	(getModifiersInternal): Renamed.
	(getModifiers): Rewrote.
	(isSynthetic, isVarArgs): New methods.
	(hashCode): Rewrote.
	(addTypeParameters, toGenericString): New methods.
	(getTypeParameters): Rewrote.
	(getSignature): New method.
	(getGenericParameterTypes, getGenericExceptionTypes): Likewise.
	* java/lang/reflect/natMethod.cc (getModifiersInternal):
	Renamed.  Don't mask flags.
	* java/lang/reflect/natField.cc (getModifiersInternal): Renamed.
	Don't mask flags.
	* java/lang/reflect/Modifier.java (BRIDGE, VARARGS, SYNTHETIC,
	ENUM): New constants.
	(INVISIBLE): Changed value.
	* java/lang/reflect/Method.java: Mostly merged with Classpath.
	(getModifiersInternal): Renamed.
	(getModifiers): Rewrote.
	(isBridge, isSynthetic, isVarArgs): New methods.
	(toGenericString): Likewise.
	(getTypeParameters): Likewise.
	(getSignature): Likewise.
	(getGenericExceptionTypes, getGenericParameterTypes,
	getGenericReturnType): Likewise.
	(METHOD_MODIFIERS): New constant.
	* java/lang/reflect/Field.java: Mostly merged with Classpath.
	Added javadoc everywhere.
	(getModifiersInternal): Renamed.
	(getModifiers, isSynthetic, isEnumConstant): Rewrote.
	(toGenericString): New method.
	(getGenericType, getSignature): Likewise.
	(FIELD_MODIFIERS): New constant.

From-SVN: r114046
2006-05-24 17:21:52 +00:00
Tom Tromey
f32f60c997 re PR libgcj/27731 (Math cbrt(), cosh(), expm1(), hypot(), log1p(), sinh() and tanh() not implemented)
PR libgcj/27731:
	* java/lang/natMath.cc (cbrt, cosh, expm1, hypot, log1p, sinh,
	tanh): New methods.
	* java/lang/Math.java (cbrt, cosh, expm1, hypot, log1p, sinh,
	tanh): Declare.

From-SVN: r114045
2006-05-24 17:14:45 +00:00
Andreas Tobler
3bed5c6bae natClass.cc (_Jv_FindMethodInCache): Mark klass, name and signature as MAYBE_UNUSED for HAVE_TLS == 0.
2006-05-21  Andreas Tobler  <a.tobler@schweiz.ch>

	* java/lang/natClass.cc (_Jv_FindMethodInCache): Mark klass, name and
	signature as MAYBE_UNUSED for HAVE_TLS == 0.
	(_Jv_AddMethodToCache): Mark klass and method as MAYBE_UNUSED for
	HAVE_TLS == 0.

From-SVN: r113939
2006-05-21 00:03:19 +02:00
Mark Wielaard
4f9533c772 Imported GNU Classpath 0.90
Imported GNU Classpath 0.90
       * scripts/makemake.tcl: LocaleData.java moved to gnu/java/locale.

       * sources.am: Regenerated.
       * gcj/javaprims.h: Regenerated.
       * Makefile.in: Regenerated.
       * gcj/Makefile.in: Regenerated.
       * include/Makefile.in: Regenerated.
       * testsuite/Makefile.in: Regenerated.

       * gnu/java/lang/VMInstrumentationImpl.java: New override.
       * gnu/java/net/local/LocalSocketImpl.java: Likewise.
       * gnu/classpath/jdwp/VMMethod.java: Likewise.
       * gnu/classpath/jdwp/VMVirtualMachine.java: Update to latest
       interface.
       * java/lang/Thread.java: Add UncaughtExceptionHandler.
       * java/lang/reflect/Method.java: Implements GenericDeclaration and
       isSynthetic(),
       * java/lang/reflect/Field.java: Likewise.
       * java/lang/reflect/Constructor.java
       * java/lang/Class.java: Implements Type, GenericDeclaration,
       getSimpleName() and getEnclosing*() methods.
       * java/lang/Class.h: Add new public methods.
       * java/lang/Math.java: Add signum(), ulp() and log10().
       * java/lang/natMath.cc (log10): New function.
       * java/security/VMSecureRandom.java: New override.
       * java/util/logging/Logger.java: Updated to latest classpath
       version.
       * java/util/logging/LogManager.java: New override.

From-SVN: r113887
2006-05-18 17:29:21 +00:00
Bryce McKinlay
5600ef7fb1 re PR libgcj/27352 (SecurityManager.checkPermission() called unnecessarily)
PR libgcj/27352
        * java/lang/Class.java (getClassLoaderInternal): New method.
        (forName (String, Class)): Use getClassLoaderInternal.
        (getPackage): Likewise.
        (getResource): Likewise.
        (getResourceAsStream): Likewise.
        (desiredAssertionStatus): Likewise.

From-SVN: r113863
2006-05-17 16:09:57 +01:00
Tom Tromey
628cacef24 sources.am, [...]: Rebuilt.
* sources.am, Makefile.in: Rebuilt.
	* Makefile.am (nat_source_files): Mention natVMChannels.cc, not
	natChannels.cc.
	* java/nio/channels/natVMChannels.cc: Renamed from
	natChannels.cc.
	* java/nio/channels/Channels.java: Removed.
	* java/nio/channels/natChannels.cc: Removed.
	* java/nio/channels/VMChannels.java: New file.

From-SVN: r113745
2006-05-13 21:21:28 +00:00
Tom Tromey
6aaaa44beb sources.am, [...]: Rebuilt.
* sources.am, Makefile.in: Rebuilt.
	* java/text/DateFormat.java: Removed.

From-SVN: r113740
2006-05-13 18:41:38 +00:00
Tom Tromey
8d288df0fe sources.am, [...]: Rebuilt.
* sources.am, Makefile.in: Rebuilt.
	* gnu/java/net/protocol/jar/Connection.java: Removed.
	* java/net/JarURLConnection.java: Removed.

From-SVN: r113739
2006-05-13 17:58:50 +00:00
Tom Tromey
143145daa4 sources.am, [...]: Rebuilt.
* sources.am, Makefile.in: Rebuilt.
	* java/util/logging/LogManager.java: Removed.
	* java/util/logging/Logger.java (resetLogger): New method, from
	Classpath.
	* java/io/RandomAccessFile.java: Removed.
	* gnu/java/nio/channels/FileChannelImpl.java (create): New
	method.
	(FileChannelImpl): Now private.
	* java/io/FileInputStream.java: Removed.
	* java/io/FileOutputStream.java: Removed.
	* java/security/AccessControlContext.java: Removed.
	* java/lang/ThreadLocal.java: Removed.
	* java/lang/InheritableThreadLocal.java: Removed.
	* java/lang/Thread.java (locals): New field.
	(getThreadLocals): New method.
	* java/lang/natThread.cc (finish_): Clear 'locals'.

From-SVN: r113735
2006-05-13 02:16:22 +00:00
Andrew Haley
e68dbbf5a3 natClassLoader.cc: Add comments.
2006-05-10  Andrew Haley  <aph@redhat.com>

        * java/lang/natClassLoader.cc: Add comments.

From-SVN: r113677
2006-05-10 17:50:09 +00:00
Andrew Haley
fdafd4613f prims.cc (_Jv_soleIndirectCompiledEngine): New.
2006-05-09  Andrew Haley  <aph@redhat.com>

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

From-SVN: r113674
2006-05-10 17:17:20 +00:00
Tom Tromey
6ec13f0b96 re PR libgcj/27294 (gij throws NullPointerException, when the interpreter is not enabled)
PR libgcj/27294:
	* java/lang/natVMClassLoader.cc (defineClass): Throw
	VirtualMachineError if no interpreter configured.

From-SVN: r113554
2006-05-05 15:05:20 +00:00
Andrew Haley
b2ed63b4aa [multiple changes]
2006-05-04  Andrew Haley  <aph@redhat.com>

        * class.c (make_field_value): Always build_address_of fdecl if
        there is an initializer.

2006-05-03  Andrew Haley  <aph@redhat.com>

        PR libgcj/27352
        * expr.c (maybe_rewrite_invocation): New function.
        (rewrite_arglist_getclass): Likewise.
        (rules): New.
        (expand_invoke): Call maybe_rewrite_invocation.
        * parse.y (patch_invoke): Likewise.
        * java-tree.h: (maybe_rewrite_invocation): New function.

2006-05-03  Andrew Haley  <aph@redhat.com>

        PR libgcj/27352
        * java/lang/Class.java (getClassLoader(Class)): New.
        forName(String, Class): New.
        * java/lang/natClass.cc (getClassLoader(Class)): New.

2006-05-02  Andrew Haley  <aph@redhat.com>

        * prims.cc (_Jv_NewMultiArray): Check for phantom class.

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

From-SVN: r113530
2006-05-04 15:29:22 +00:00
Andrew Haley
5233753562 natClassLoader.cc: Don't include link.h or dladdr.h.
2006-04-25  Andrew Haley  <aph@redhat.com>

        * java/lang/natClassLoader.cc: Don't include link.h or dladdr.h.
        * boehm.cc: Don't include link.h.
        (_Jv_RegisterLibForGc): Cast away const when calling dladdr().

From-SVN: r113246
2006-04-25 11:54:15 +00:00
Tom Tromey
0623a8c0c2 * java/lang/natClass.cc (_Jv_getInterfaceMethod): Skip <clinit>.
From-SVN: r113229
2006-04-24 21:28:36 +00:00
Andrew Haley
621ae65dcd lang.c (java_init): Handle flag_indirect_classes.
2006-04-21  Andrew Haley  <aph@redhat.com>

        * lang.c (java_init): Handle flag_indirect_classes.
        * jvgenmain.c: Use "class$$" instead of "class$".
        * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
        DECLs.
        (mangle_class_field): Special case "class$$" as well as "class$".
        * constants.c (build_ref_from_constant_pool): If
        flag_indirect_classes, generate a ref into the heap.
        * decl.c (constants_field_decl_node,
        constants_data_field_decl_node): New.
        * class.c (build_static_class_ref): New.
        (build_classdollar_field): Factor out from build_class_ref().
        (make_field_value): Handle static fields in heap.
        (make_class_data): Make sure we get a static ref to class.
        Make class initializer const if flag_indirect_classes.
        (register_class): Build a class_ref for initialization if
        flag_indirect_classes.
        (emit_indirect_register_classes): New.

2006-04-21  Andrew Haley  <aph@redhat.com>

        * include/execution.h (struct _Jv_CompiledEngine): Define for
        compiled classes.
        * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Call
        _Jv_RegisterLibForGc.
        (_Jv_RegisterClasses_Counted): Likewise.
        (_Jv_NewClassFromInitializer): New.
        (_Jv_RegisterNewClasses): New.
        * sources.am: Regenerate.
        * boehm.cc (_Jv_GC_has_static_roots): new.
        (_Jv_InitGC): Call GC_register_has_static_roots_callback.
        (filename_node, find_file, _Jv_print_gc_store, new_node,
        _Jv_GC_has_static_roots, _Jv_RegisterLibForGc): New.
        * scripts/makemake.tcl: Add -fno-indirect-classes.
        * Makefile.in: Regenerate.
        * link.cc (resolve_pool_entry): Allocate constant pool.
        Allocate fields.

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

From-SVN: r112858
2006-04-11 17:23:00 +01:00
Andrew Haley
544c479db3 InetAddress.java: Throw an UnknownHostException if lookup fails.
2006-04-07  Andrew Haley  <aph@redhat.com>

        * java/net/InetAddress.java: Throw an UnknownHostException if
        lookup fails.

From-SVN: r112754
2006-04-07 15:42:07 +00:00
Tom Tromey
119afc377a re PR classpath/26990 (SecurityManager.checkExit() problem)
PR libgcj/26990:
	* prims.cc (_Jv_RunMain): Use exitNoChecksAccessor.
	* gnu/java/lang/natMainThread.cc (call_main): Use
	exitNoChecksAccessor.
	* testsuite/libjava.lang/pr26990.out: New file.
	* testsuite/libjava.lang/pr26990.java: New file.
	* java/lang/Runtime.java (exitNoChecks): New method.
	(exitNoChecksAccessor): Likewise.
	(exit): Call exitNoChecks.

From-SVN: r112685
2006-04-04 23:25:09 +00:00
Anthony Balkissoon
792617a52a unicode-muncher.pl: Removed this file.
2006-03-28  Anthony Balkissoon  <abalkiss@redhat.com>

	* scripts/unicode-muncher.pl: Removed this file.
	* scripts/MakeCharTables.java: Likewise.
	* scripts/unicode-to-chartables.pl: New file.
	* java/lang/natCharacter.cc: 
	(UNASSIGNED_TYPE): New field.
	(UNASSIGNED_DIGIT): Likewise.
	(UNASSIGNED_DIRECTION): Likewise.
	(UNASSIGNED_NUMERIC_VALUE): Likewise.
	(PRIVATE_TYPE): Likewise.
	(PRIVATE_DIRECTION): Likewise.
	(readCodePoint): New method.
	(getType(jint)): Likewise.
	(toLowerCase(jint)): Likewise.
	(toUpperCase(jint)): Likewise.
	(toTitleCase(jint)): Likewise.
	(digit(jint, jint)): Likewise.
	(getNumericValue(jint)): Likewise.
	(getDirectionality(jint)): Likewise.
	(readChar),
	(getType(jchar)),
	(toLowerCase(jchar)),
	(toUpperCase(jchar)),
	(toTitleCase(jchar)),
	(digit(jchar, jint)),
	(getNumericValue(jchar)),
	(getDirectionality(jchar)): Changed references from data to data[0], 
	blocks to blocks[0], direction to direction[0], numValue to 
	numValue[0], upper to upper[0], lower to lower[0], and shift to 
	shift[0] to reflect the new structures in java-chartables.h.	
	* java/lang/Character.java:
	(readCodePoint): Declared new native method.
	(getType(int)): Likewise.
	(toLowerCase(int)): Likewise.
	(toUpperCase(int)): Likewise.
	(toTitleCase(int)): Likewise.
	(digit(int, int)): Likewise.
	(getNumericValue(int)): Likewise.
	(getDirectionality(int)): Likewise.
	(isLowerCase(int)): New method.
	(isUpperCase(int)): Likewise.
	(itTitleCase(int)): Likewise.
	(isDigit(int)): Likewise.
	(isDefined(int)): Likewise.
	(isLetter(int)): Likewise.
	(isLetterOrDigit(int)): Likewise.
	(isJavaIdentifierStart(int)): Likewise.
	(isJavaIdentifierPart(int)): Likewise.
	(isUnicodeIdentifierStart(int)): Likewise.
	(isUnicodeIdentifierPart(int)): Likewise.
	(isIdentifierIgnorable(int)): Likewise.
	(isSpaceChar(int)): Likewise.
	(isWhitespace(int)): Likewise.
	(isISOControl(int)): Likewise.
	(isMirrored(int)): Likewise.
	* include/java-chartables.h: Generated from 
	scripts/unicode-to-chartables.h.

From-SVN: r112454
2006-03-28 16:12:52 +00:00
Tom Tromey
ea725d4524 re PR libgcj/25713 (GZIPOutputStream bad checksum)
libjava
	PR libgcj/25713:
	* java/util/zip/Deflater.java (flush): New method.
	* sources.am, Makefile.in: Rebuilt.
	* java/util/zip/DeflaterOutputStream.java: Removed.
	* java/util/zip/InflaterInputStream.java: Likewise.
	* java/util/zip/GZIPInputStream.java: Likewise.
	* java/util/zip/GZIPOutputStream.java: Likewise.
libjava/classpath
	For PR libgcj/25713:
	* java/util/zip/InflaterInputStream.java (read): Replaced with
	libgcj implementation.

From-SVN: r111949
2006-03-10 23:09:23 +00:00
Mark Wielaard
8aa540d2f7 Imported GNU Classpath 0.90
Imported GNU Classpath 0.90
       * scripts/makemake.tcl: Set gnu/java/awt/peer/swing to ignore.
       * gnu/classpath/jdwp/VMFrame.java (SIZE): New constant.
       * java/lang/VMCompiler.java: Use gnu.java.security.hash.MD5.
       * java/lang/Math.java: New override file.
       * java/lang/Character.java: Merged from Classpath.
       (start, end): Now 'int's.
       (canonicalName): New field.
       (CANONICAL_NAME, NO_SPACES_NAME, CONSTANT_NAME): New constants.
       (UnicodeBlock): Added argument.
       (of): New overload.
       (forName): New method.
       Updated unicode blocks.
       (sets): Updated.
       * sources.am: Regenerated.
       * Makefile.in: Likewise.

From-SVN: r111942
2006-03-10 21:46:48 +00:00
Tom Tromey
0ade2ddf23 re PR libgcj/23495 (java.lang.String.equals is suboptimal)
PR libgcj/23495:
	* java/lang/natString.cc (_Jv_NewString): Use memcpy.
	(equals): Use memcmp.
	(contentEquals): Likewise.
	(getChars): Use memcpy.
	(toCharArray): Likewise.
	(regionMatches): Use memcmp.
	(regionMatches): Likewise.
	(startsWith): Likewise.
	(concat): Use memcpy.
	(valueOf): Likewise.

From-SVN: r111919
2006-03-10 00:39:49 +00:00
Tom Tromey
1fea4e6c43 re PR libgcj/24461 (array access in either GZIPInputStream, Inflater, natInflate.cc, or zlib)
PR libgcj/24461:
	* java/util/zip/InflaterInputStream.java (fill): Throw exception
	if stream is truncated.

From-SVN: r111870
2006-03-09 20:21:58 +00:00
Tom Tromey
e59a1e40f3 win32.cc (_Jv_platform_nanotime): New function.
* win32.cc (_Jv_platform_nanotime): New function.
	* include/win32.h (_Jv_platform_nanotime): Declare.
	* posix.cc (_Jv_platform_nanotime): New function.
	* include/posix.h (_Jv_platform_nanotime): Declare.
	* java/lang/natSystem.cc (nanoTime): New method.
	* java/lang/System.java (nanoTime): Declare.
	* include/config.h.in, configure: Rebuilt.
	* configure.ac: Check for clock_gettime.

From-SVN: r111869
2006-03-09 18:47:54 +00:00
Tom Tromey
9fe2e733d2 re PR libgcj/26103 (Wrong exception thrown)
PR libgcj/26103:
	* java/lang/ClassLoader.java (loadClass): Don't throw
	StringIndexOutOfBoundsException if name is empty.
	* java/lang/natClassLoader.cc (loadClassFromSig): Throw exception
	if class not found.

From-SVN: r111820
2006-03-07 21:39:44 +00:00
Tom Tromey
2bb6e0cefe re PR libgcj/24321 (instanceof erroneously causes class initialization)
PR java/24321:
	* testsuite/libjava.lang/pr24321.java: New file.
	* testsuite/libjava.lang/pr24321.out: New file.
	* java/lang/natClass.cc (isInstance): Don't initialize class.
	(isAssignableFrom): Likewise.

From-SVN: r111603
2006-03-01 16:01:34 +00:00
Bryce McKinlay
a286e145de Class.h (_Jv_IDispatchTable): Make it a struct.
2006-02-09  Bryce McKinlay  <mckinlay@redhat.com>

	* java/lang/Class.h (_Jv_IDispatchTable): Make it a struct. Put 
	'itable' inline, instead of as a pointer.
	(java::lang::Class): Put 'idt' in anonymous union with 'ioffsets'.
	* link.cc (null_idt): Update definition.
	(_Jv_Linker::prepare_constant_time_tables): Allocate klass->idt
	as a single struct. Use _Jv_AllocBytes, not _Jv_AllocRawObj.
	(_Jv_Linker::generate_itable): Update to use 'ioffsets'.
	(_Jv_Linker::find_iindex): Likewise. Update comment.
	* java/lang/natClass.cc	(_Jv_LookupInterfaceMethodIdx): Update for
	_Jv_IDispatchTable change.
	(_Jv_IsAssignableFrom): Likewise.

From-SVN: r110818
2006-02-09 23:59:30 +00:00
Bryce McKinlay
1349c68851 re PR libgcj/25187 (dereferencing type-punned pointer warnings while building libgcj)
2006-02-08  Bryce McKinlay  <mckinlay@redhat.com>

        PR libgcj/25187:
        * gnu/gcj/io/natSimpleSHSStream.cc
        (gnu::gcj::io::SimpleSHSStream::shsFinal): Remove bogus cast.
        * interpret.cc (_Jv_InterpMethod::run): Simplify arguments to
        _Jv_InterpFrame().
        * boehm.cc: #undef some autoconf macros before including gc-config.h.
        (_Jv_MarkObject): Don't mark the class, it is reachable via the vtable.
        (_Jv_MarkArray): Likewise.
        * java/lang/ref/natReference.cc (java::lang::ref::Reference::create):
        Simplify _Jv_GCRegisterDisappearingLink() call.
        * java/lang/Class.h (getComponentType): Use element_type.
        (element_type): New field declaration, as a union with "methods".
        * java/lang/natClassLoader.cc (_Jv_NewArrayClass): Use "element_type".
        * java/net/natVMNetworkInterfacePosix.cc
        (java::net::VMNetworkInterface::getInterfaces): Add "int" cast to
        avoid sign comparison warning.
        * include/java-interp.h (_Jv_InterpFrame): Take thread as second
        argument, not parent call frame.
        * include/x86_64-signal.h (MAKE_THROW_FRAME): Use "gregs" directly,
        without a cast.
        (restore_rt): Declare with hidden visibility, not "static".
        * posix.cc (_Jv_platform_initProperties): Make "tmpdir" a string
        constant.
        * jni.cc (_Jv_JNI_DestroyJavaVM): Use a union to avoid strict alias
        warning

From-SVN: r110783
2006-02-09 01:35:33 +00:00
Bryce McKinlay
2cf94e58cb link.cc (_Jv_Linker::print_class_loaded): Declare string constants as "const char *".
2006-02-08  Bryce McKinlay  <mckinlay@redhat.com>

	* link.cc (_Jv_Linker::print_class_loaded): Declare string constants
	as "const char *".
	* verify.cc (verify_fail): Likewise.
	* gnu/classpath/natSystemProperties.cc (file_encoding): Likewise.
	* interpret.cc (throw_internal_error, throw_class_format_error):
	Likewise.
	* gcj/javaprims.h (_Jv_hashUtf8String, _Jv_Utf8Const::space_needed, 
	_Jv_Utf8Const::init, _Jv_makeUtf8Const): Likewise.
	* java/lang/Class.h (_Jv_InitPrimClass): Likewise.
	* include/jvm.h (_Jv_strLengthUtf8, _Jv_makeUtf8Const): Likewise.
	* defineclass.cc (throw_internal_error, throw_no_class_def_found_error,
	is_attribute_name): Likewise.
	* prims.cc (_Jv_strLengthUtf8, _Jv_hashUtf8String, _Jv_Utf8Const::init,
	_Jv_makeUtf8Const, _Jv_InitPrimClass): Likewise.

From-SVN: r110767
2006-02-08 20:38:13 +00:00
Tom Tromey
855dd2bcff re PR java/22578 (should inline floatToIntBits et al)
gcc/java
	PR java/22578:
	* check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
	* builtins.c (convert_real): New function.
	(java_builtins): Handle Float.intBitsToFloat,
	Float.floatToRawIntBits, Double.longBitsToDouble,
	Double.doubleToRawLongBits.
libjava
	PR java/22578:
	* gcj/javaprims.h: Updated.
	* sources.am, Makefile.in: Rebuilt.
	* java/lang/natDouble.cc (doubleToLongBits): Moved to VMDouble.
	(doubleToRawLongBits): Likewise.
	(longBitsToDouble): Likewise.
	(toString): Likewise.
	(parseDouble): Likewise.
	* java/lang/natFloat.cc (floatToIntBits): Moved to VMFloat.
	(floatToRawIntBits): Likewise.
	(intBitsToFloat): Likewise.
	* java/lang/VMDouble.java: New file.
	* java/lang/VMFloat.java: New file.
	* java/lang/Float.java, java/lang/Double.java: Removed.

From-SVN: r110759
2006-02-08 18:06:11 +00:00
Robert Schuster
c1a9321f29 2006-02-01 Robert Schuster <robertschuster@fsfe.org>
* link.cc:
	(_Jv_Linker::find_field_helper): Added checks.
	(_Jv_Linker::find_field): Use exception swallowing class resolution
	and added early return.
	(_Jv_ThrowNoClassDefFoundErrorTrampoline): New function.
	(_Jv_Linker::link_symbol_table):  Use exception swallowing class
	resolution, added ffi_closure installation routine, use
	_Jv_ThrowNoClassDefFoundError for missing static method.
	(_Jv_Linker::ensure_class_linked): Added string check which does
	not trigger class resolution.
	* java/lang/natClassLoader.cc:
	(_Jv_FindClassNoException): New method.
	* java/lang/Class.h:
	(_Jv_FindClassNoException): New method declaration.
	* include/jvm.h:
	(_Jv_FindClassNoException): New method declaration.
	(_Jv_FindClassFromSignatureNoException): New method declaration.
	* prims.cc:
	(_Jv_FindClassFromSignatureNoException): New method.
        * gcj/javaprims.h:
        (_Jv_equalsUtf8Classname): New method declaration.
        (_Jv_isPrimitiveOrDerived): Dito.
        * prims.cc:
	(_Jv_equalsUtf8Classnames): New method.
        (_Jv_isPrimitiveOrDerived): New method.
        * verify.cc:
        (ref_intersection::equals): Use new classname comparison method.
        (type::compatible): Use new classname comparison method. Added
        check whether LHS' type is java.lang.Object .
        (type::resolve): Added new optional debug message and simplified
        if-expression.
        (type::to_array): Added codepath that generates an array type
        without resolving the element type.

From-SVN: r110474
2006-02-01 13:40:05 +00:00
Keith Seitz
8a0092c834 Class.h (_Jv_FindInterpreterMethod): Add new declaration.
* java/lang/Class.h (_Jv_FindInterpreterMethod): Add new declaration.
        * java/lang/natClass.cc (_Jv_FindInterpreterMethod): New function.

From-SVN: r110142
2006-01-23 18:44:43 +00:00
Tom Tromey
96c6b0e22a re PR classpath/20198 (java.security.CodeSource.getLocation output is different than expected)
PR classpath/20198:
	* java/net/URLClassLoader.java (FileURLLoader): Added argument.
	(JarURLLoader): Likewise.
	(addURLImpl): Canonicalize file URLs.

From-SVN: r109844
2006-01-17 23:25:12 +00:00
Mark Wielaard
2127637945 Imported GNU Classpath 0.20
Imported GNU Classpath 0.20
       * Makefile.am (AM_CPPFLAGS): Add classpath/include.
       * java/nio/charset/spi/CharsetProvider.java: New override file.
       * java/security/Security.java: Likewise.
       * sources.am: Regenerated.
       * Makefile.in: Likewise.

From-SVN: r109831
2006-01-17 18:09:40 +00:00
Tom Tromey
981fa57201 classpath.security: Removed.
* java/security/classpath.security: Removed.
	* Makefile.in: Rebuilt.
	* Makefile.am (install-data-local): Don't install
	classpath.security.

From-SVN: r109675
2006-01-13 21:26:55 +00:00
Chris Burdess
42801b989a Character.java (toChars,toCodePoint): Correct these methods to use algorithms from Unicode specification.
2006-01-08  Chris Burdess  <dog@gnu.org>

	* java/lang/Character.java (toChars,toCodePoint): Correct these
	  methods to use algorithms from Unicode specification.

From-SVN: r109516
2006-01-09 23:22:45 +00:00
Tom Tromey
a79cb46cf4 StringBuilder.java (appendCodePoint): New method.
* java/lang/StringBuilder.java (appendCodePoint): New method.
	(insert): New overloads.
	* java/lang/StringBuffer.java (StringBuffer): New constructor.
	(charAt): Remerged javadoc.
	(codePointAt, codePointBefore): New methods.
	(appendCodePoint): New method.
	(append): New overloads.
	(insert): Likewise.
	(trimToSize, codePointCount, offsetByCodePoints): New methods.
	* java/lang/Float.java (SIZE): New field.
	(valueOf): New method.
	* java/lang/natDouble.cc (initIDs): Removed.
	* java/lang/Double.java (static initializer): Removed.
	(SIZE): New field.
	(valueOf): New method.
	(initIDs): Removed.

From-SVN: r109497
2006-01-09 06:42:19 +00:00
Tom Tromey
37d41553c0 Character.java (SIZE, [...]): New fields from Classpath.
* java/lang/Character.java (SIZE, MAX_CACHE, charCache,
	MIN_SURROGATE, MAX_SURROGATE): New fields from Classpath.
	(MIN_HIGH_SURROGATE, MAX_HIGH_SURROGATE, MIN_LOW_SURROGATE,
	MAX_LOW_SURROGATE): Javadoc fixes.
	(valueOf, reverseBytes, isHighSurrogate, isLowSurrogate,
	isSurrogatePair, toCodePoint, codePointAt, codePointBefore): New
	methods from Classpath.
	* java/lang/String.java (codePointAt, codePointBefore,
	codePointCount, contains, replace): New methods from Classpath.
	(contentEquals): Declare.
	* java/lang/natString.cc (contentEquals): New method.

From-SVN: r109445
2006-01-07 00:46:28 +00:00