diff options
author | (no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-20 20:47:10 +0000 |
---|---|---|
committer | (no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-20 20:47:10 +0000 |
commit | 416eb2f4d5600aafcbfa9c089c240eca87484af9 (patch) | |
tree | f61d92d826023755c3f1c0c9829017514f722ac3 /libjava | |
parent | 9bb35d69d67db155999c4346b3df4ce26bc84020 (diff) |
This commit was manufactured by cvs2svn to create branch
'tree-ssa-20020619-branch'.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@70614 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/gnu/java/awt/peer/EmbeddedWindowPeer.java | 46 | ||||
-rw-r--r-- | libjava/gnu/java/awt/peer/gtk/GtkEmbeddedWindowPeer.java | 55 | ||||
-rw-r--r-- | libjava/java/awt/GridBagLayoutInfo.java | 70 | ||||
-rw-r--r-- | libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c | 81 | ||||
-rw-r--r-- | libjava/testsuite/libjava.compile/PR11600.java | 7 | ||||
-rw-r--r-- | libjava/testsuite/libjava.compile/PR11600.xfail | 1 | ||||
-rw-r--r-- | libjava/testsuite/libjava.jni/pr11951.c | 16 | ||||
-rw-r--r-- | libjava/testsuite/libjava.jni/pr11951.java | 14 | ||||
-rw-r--r-- | libjava/testsuite/libjava.jni/pr11951.out | 1 | ||||
-rw-r--r-- | libjava/testsuite/libjava.lang/PR7482.java | 35 | ||||
-rw-r--r-- | libjava/testsuite/libjava.lang/PR7482.out | 0 |
11 files changed, 326 insertions, 0 deletions
diff --git a/libjava/gnu/java/awt/peer/EmbeddedWindowPeer.java b/libjava/gnu/java/awt/peer/EmbeddedWindowPeer.java new file mode 100644 index 00000000000..a1787684505 --- /dev/null +++ b/libjava/gnu/java/awt/peer/EmbeddedWindowPeer.java @@ -0,0 +1,46 @@ +/* EmbeddedWindowPeer.java -- Interface for window peers that may be + embedded into other applications + Copyright (C) 2003 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package gnu.java.awt.peer; + +import java.awt.peer.FramePeer; + +public interface EmbeddedWindowPeer extends FramePeer +{ +} diff --git a/libjava/gnu/java/awt/peer/gtk/GtkEmbeddedWindowPeer.java b/libjava/gnu/java/awt/peer/gtk/GtkEmbeddedWindowPeer.java new file mode 100644 index 00000000000..d17ff63e11e --- /dev/null +++ b/libjava/gnu/java/awt/peer/gtk/GtkEmbeddedWindowPeer.java @@ -0,0 +1,55 @@ +/* GtkEmbeddedWindowPeer.java -- Implements FramePeer using a GtkPlug + Copyright (C) 2003 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package gnu.java.awt.peer.gtk; + +import gnu.java.awt.EmbeddedWindow; +import gnu.java.awt.peer.EmbeddedWindowPeer; + +public class GtkEmbeddedWindowPeer extends GtkFramePeer + implements EmbeddedWindowPeer +{ + native void create(); + native void construct (int window_id); + + public GtkEmbeddedWindowPeer (EmbeddedWindow w) + { + super (w); + construct (w.getHandle()); + } +} diff --git a/libjava/java/awt/GridBagLayoutInfo.java b/libjava/java/awt/GridBagLayoutInfo.java new file mode 100644 index 00000000000..6bd7f6787a8 --- /dev/null +++ b/libjava/java/awt/GridBagLayoutInfo.java @@ -0,0 +1,70 @@ +/* GridBagLayoutInfo - + Copyright (C) 2003 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package java.awt; + +import java.io.Serializable; + +/** + * @author Michael Koch <konqueror@gmx.de> + */ +class GridBagLayoutInfo implements Serializable +{ + private static final long serialVersionUID = -4899416460737170217L; + + int pos_x; + int pos_y; + int cols; + int rows; + int colWidths[]; + int rowHeights[]; + double colWeights[]; + double rowWeights[]; + + GridBagLayoutInfo (int cols, int rows) + { + this.pos_x = 0; + this.pos_y = 0; + this.cols = cols; + this.rows = rows; + this.colWidths = new int [cols]; + this.rowHeights = new int [rows]; + this.colWeights = new double [cols]; + this.rowWeights = new double [rows]; + } +} diff --git a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c new file mode 100644 index 00000000000..ca4224733fd --- /dev/null +++ b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c @@ -0,0 +1,81 @@ +/* gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c -- Native + implementation of GtkEmbeddedWindowPeer + Copyright (C) 2003 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +#include "gtkpeer.h" +#include "gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.h" + +JNIEXPORT void JNICALL +Java_gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer_create + (JNIEnv *env, jobject obj) +{ + gpointer window; + GtkWidget *vbox, *layout; + + gdk_threads_enter (); + + /* Create an "unplugged" GtkPlug. */ + window = gtk_plug_new (0); + + vbox = gtk_vbox_new (0, 0); + layout = gtk_layout_new (NULL, NULL); + gtk_box_pack_end (GTK_BOX (vbox), layout, 1, 1, 0); + gtk_container_add (GTK_CONTAINER (window), vbox); + + gtk_widget_show (layout); + gtk_widget_show (vbox); + + gdk_threads_leave (); + + NSA_SET_PTR (env, obj, window); +} + +JNIEXPORT void JNICALL +Java_gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer_construct + (JNIEnv *env, jobject obj, jint window_id) +{ + void *ptr; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + + gtk_plug_construct (GTK_PLUG (ptr), window_id); + + gdk_threads_leave (); +} diff --git a/libjava/testsuite/libjava.compile/PR11600.java b/libjava/testsuite/libjava.compile/PR11600.java new file mode 100644 index 00000000000..3cffa732c49 --- /dev/null +++ b/libjava/testsuite/libjava.compile/PR11600.java @@ -0,0 +1,7 @@ +public class PR11600 implements Cloneable +{ + public Object clone () + { + return super.clone (); + } +} diff --git a/libjava/testsuite/libjava.compile/PR11600.xfail b/libjava/testsuite/libjava.compile/PR11600.xfail new file mode 100644 index 00000000000..e3b083b1fa5 --- /dev/null +++ b/libjava/testsuite/libjava.compile/PR11600.xfail @@ -0,0 +1 @@ +shouldfail diff --git a/libjava/testsuite/libjava.jni/pr11951.c b/libjava/testsuite/libjava.jni/pr11951.c new file mode 100644 index 00000000000..4c8ab63f1da --- /dev/null +++ b/libjava/testsuite/libjava.jni/pr11951.c @@ -0,0 +1,16 @@ +#include <stdio.h> +#include <pr11951.h> + +JNIEXPORT void JNICALL +Java_pr11951_nmethod (JNIEnv *env, jclass myclass) +{ + jmethodID method; + jobject r; + + method = (*env)->GetStaticMethodID (env, myclass, "dosomething", + "()Ljava/lang/Object;"); + r = (*env)->CallStaticObjectMethod (env, myclass, method); + printf ("%d\n", r == NULL); + + (*env)->ExceptionClear (env); +} diff --git a/libjava/testsuite/libjava.jni/pr11951.java b/libjava/testsuite/libjava.jni/pr11951.java new file mode 100644 index 00000000000..68a9f0126a3 --- /dev/null +++ b/libjava/testsuite/libjava.jni/pr11951.java @@ -0,0 +1,14 @@ +public class pr11951 +{ + public static Object dosomething() + { + throw new Error(); + } + + public static native void nmethod(); + + public static void main(String[] args) + { + nmethod(); + } +} diff --git a/libjava/testsuite/libjava.jni/pr11951.out b/libjava/testsuite/libjava.jni/pr11951.out new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/libjava/testsuite/libjava.jni/pr11951.out @@ -0,0 +1 @@ +1 diff --git a/libjava/testsuite/libjava.lang/PR7482.java b/libjava/testsuite/libjava.lang/PR7482.java new file mode 100644 index 00000000000..223fea66e36 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR7482.java @@ -0,0 +1,35 @@ +public class PR7482 +{ + private interface I { } + private static class B { } + private static class U extends B implements I { } + private static class V extends B implements I { } + + static I field; + + private static void g1(Object o) + { + I val; + if (o == null) + val = new U(); + else + val = new V(); + field = val; + } + + private static I g2(Object o) + { + I val; + if (o == null) + val = new U(); + else + val = new V(); + return val; + } + + public static void main(String[] args) + { + g1(null); + g2(null); + } +} diff --git a/libjava/testsuite/libjava.lang/PR7482.out b/libjava/testsuite/libjava.lang/PR7482.out new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR7482.out |