diff options
author | Matthias Klose <doko@ubuntu.com> | 2007-08-04 10:53:49 +0000 |
---|---|---|
committer | Matthias Klose <doko@ubuntu.com> | 2007-08-04 10:53:49 +0000 |
commit | cf80f77ec4ab503622fd3339ae1a3e7f9f9dc49c (patch) | |
tree | 871b70a606d87369d5aa9d6f621baedc13b49eba /libjava/classpath/vm | |
parent | 587365eef3af34e6d2bad460c7bcc826805a2106 (diff) |
libjava/
2007-08-04 Matthias Klose <doko@ubuntu.com>
Import GNU Classpath (libgcj-import-20070727).
* Regenerate class and header files.
* Regenerate auto* files.
* include/jvm.h:
* jni-libjvm.cc (Jv_JNI_InvokeFunctions): Rename type.
* jni.cc (_Jv_JNIFunctions, _Jv_JNI_InvokeFunctions): Likewise.
* jni.cc (_Jv_JNI_CallAnyMethodA, _Jv_JNI_CallAnyVoidMethodA,
_Jv_JNI_CallMethodA, _Jv_JNI_CallVoidMethodA,
_Jv_JNI_CallStaticMethodA, _Jv_JNI_CallStaticVoidMethodA,
_Jv_JNI_NewObjectA, _Jv_JNI_SetPrimitiveArrayRegion): Constify
jvalue parameter.
* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Likewise.
* java/lang/VMFloat.java (toString, parseFloat): New.
* gnu/awt/xlib/XToolkit.java (setAlwaysOnTop, isModalityTypeSupported,
isModalExclusionTypeSupported): New (stub only).
* gnu/awt/xlib/XCanvasPeer.java (requestFocus): Likewise.
* gnu/awt/xlib/XFramePeer.java (updateMinimumSize, updateIconImages,
updateFocusableWindowState, setModalBlocked, getBoundsPrivate,
setAlwaysOnTop): Likewise.
* gnu/awt/xlib/XFontPeer.java (canDisplay): Update signature.
* scripts/makemake.tcl: Ignore gnu/javax/sound/sampled/gstreamer,
ignore javax.sound.sampled.spi.MixerProvider, ignore .in files.
* HACKING: Mention --enable-gstreamer-peer, removal of generated files.
libjava/classpath/
2007-08-04 Matthias Klose <doko@ubuntu.com>
* java/util/EnumMap.java (clone): Add cast.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@127204 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/vm')
4 files changed, 39 insertions, 3 deletions
diff --git a/libjava/classpath/vm/reference/gnu/classpath/jdwp/VMFrame.java b/libjava/classpath/vm/reference/gnu/classpath/jdwp/VMFrame.java index eec7b63d67b..767a902ff1c 100644 --- a/libjava/classpath/vm/reference/gnu/classpath/jdwp/VMFrame.java +++ b/libjava/classpath/vm/reference/gnu/classpath/jdwp/VMFrame.java @@ -73,12 +73,15 @@ public class VMFrame * @param thr a Thread, the thread this frame is in * @param frame_id a long, the jframeID of this frame * @param frame_loc a Location, the location of this frame + * @param frame_obj the "this" object of this frame */ - public VMFrame(Thread thr, long frame_id, Location frame_loc) + public VMFrame(Thread thr, long frame_id, Location frame_loc, + Object frame_obj) { thread = thr; id = frame_id; loc = frame_loc; + obj = frame_obj; } /** diff --git a/libjava/classpath/vm/reference/gnu/classpath/jdwp/VMMethod.java b/libjava/classpath/vm/reference/gnu/classpath/jdwp/VMMethod.java index d345bc1b515..6a2b04ecf97 100644 --- a/libjava/classpath/vm/reference/gnu/classpath/jdwp/VMMethod.java +++ b/libjava/classpath/vm/reference/gnu/classpath/jdwp/VMMethod.java @@ -1,5 +1,5 @@ /* VMMethod.java -- a method in a virtual machine - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2007 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -175,4 +175,15 @@ public class VMMethod { return VMVirtualMachine.getClassMethod(klass, bb.getLong()); } + + public boolean equals(Object obj) + { + if (obj instanceof VMMethod) + { + VMMethod m = (VMMethod) obj; + return (getId() == m.getId()); + } + + return false; + } } diff --git a/libjava/classpath/vm/reference/java/lang/VMFloat.java b/libjava/classpath/vm/reference/java/lang/VMFloat.java index 2e7f439a443..15348130f10 100644 --- a/libjava/classpath/vm/reference/java/lang/VMFloat.java +++ b/libjava/classpath/vm/reference/java/lang/VMFloat.java @@ -108,4 +108,26 @@ final class VMFloat */ static native float intBitsToFloat(int bits); + /** + * @param f the <code>float</code> to convert + * @return the <code>String</code> representing the <code>float</code> + */ + static String toString(float f) + { + return VMDouble.toString(f, true); + } + + /** + * @param str the <code>String</code> to convert + * @return the <code>float</code> value of <code>s</code> + * @throws NumberFormatException if <code>str</code> cannot be parsed as a + * <code>float</code> + * @throws NullPointerException if <code>str</code> is null + */ + static float parseFloat(String str) + { + // XXX Rounding parseDouble() causes some errors greater than 1 ulp from + // the infinitely precise decimal. + return (float) Double.parseDouble(str); + } } // class VMFloat diff --git a/libjava/classpath/vm/reference/sun/misc/Unsafe.java b/libjava/classpath/vm/reference/sun/misc/Unsafe.java index fa199f83e0a..5dee8cfefd7 100644 --- a/libjava/classpath/vm/reference/sun/misc/Unsafe.java +++ b/libjava/classpath/vm/reference/sun/misc/Unsafe.java @@ -305,7 +305,7 @@ public class Unsafe * * @param thread the thread to unblock. */ - public native void unpark(Thread thread); + public native void unpark(Object thread); /** * Blocks the thread until a matching |