[kaffe] CVS kaffe (robilad): Implemented VMClassLoader.getPrimitiveClass and merged in some basic types from
Kaffe CVS
cvs-commits at kaffe.org
Sun Jan 9 09:30:45 PST 2005
PatchSet 5825
Date: 2005/01/09 17:26:12
Author: robilad
Branch: HEAD
Tag: (none)
Log:
Implemented VMClassLoader.getPrimitiveClass and merged in some basic types from java.lang from GNU Classpath
2005-01-09 Dalibor Topic <robilad at kaffe.org>
* libraries/javalib/java/lang/String.java
(valueOf): Replaced by implementation from GNU Classpath.
* libraries/javalib/java/lang/Boolean.java,
libraries/javalib/java/lang/Byte.java,
libraries/javalib/java/lang/Character.java,
libraries/javalib/java/lang/Integer.java,
libraries/javalib/java/lang/Long.java,
libraries/javalib/java/lang/Short.java:
Replaced by implemenation from GNU Classpath.
* test/regression/ProcessClassInst.java,
test/regression/ProcessClassStop.java:
Adapted output for changes.
* libraries/javalib/java/io/ObjectOutputStream.java
(getObjectField): Clarified error checking code, and
improved exception messages.
* libraries/javalib/Klasses.jar.bootstrap:
Regenerated.
2005-01-09 Helmer Kraemer <hkraemer at freenet.de>
* libraries/javalib/java/lang/Double.java (TYPE),
libraries/javalib/java/lang/Float.java (TYPE):
Use VMClassLoader.getPrimitiveType.
* libraries/clib/native/Class.c
(java_lang_Class_getPrimitiveClass): Removed.
* libraries/javalib/java/lang/Class.java
(getPrimitiveClass) Removed.
* libraries/clib/native/ClassLoader.c
(java_lang_VMClassLoader_getPrimitiveClass0): New function.
* libraries/javalib/java/lang/VMClassLoader.java
(getPrimitiveClass) Implemented.
(getPrimitiveClass0) New method.
Members:
ChangeLog:1.3369->1.3370
libraries/clib/native/Class.c:1.79->1.80
libraries/clib/native/ClassLoader.c:1.43->1.44
libraries/javalib/Klasses.jar.bootstrap:1.81->1.82
libraries/javalib/java/io/ObjectOutputStream.java:1.28->1.29
libraries/javalib/java/lang/Boolean.java:1.14->1.15
libraries/javalib/java/lang/Byte.java:1.16->1.17
libraries/javalib/java/lang/Character.java:1.24->1.25
libraries/javalib/java/lang/Class.java:1.51->1.52
libraries/javalib/java/lang/Double.java:1.20->1.21
libraries/javalib/java/lang/Float.java:1.21->1.22
libraries/javalib/java/lang/Integer.java:1.23->1.24
libraries/javalib/java/lang/Long.java:1.20->1.21
libraries/javalib/java/lang/Short.java:1.11->1.12
libraries/javalib/java/lang/String.java:1.44->1.45
libraries/javalib/java/lang/VMClassLoader.java:1.1->1.2
libraries/javalib/java/lang/Void.java:1.4->1.5
test/regression/ProcessClassInst.java:1.12->1.13
test/regression/ProcessClassStop.java:1.11->1.12
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3369 kaffe/ChangeLog:1.3370
--- kaffe/ChangeLog:1.3369 Sun Jan 9 01:39:25 2005
+++ kaffe/ChangeLog Sun Jan 9 17:26:12 2005
@@ -1,3 +1,46 @@
+2005-01-09 Dalibor Topic <robilad at kaffe.org>
+
+ * libraries/javalib/java/lang/String.java
+ (valueOf): Replaced by implementation from GNU Classpath.
+
+ * libraries/javalib/java/lang/Boolean.java,
+ libraries/javalib/java/lang/Byte.java,
+ libraries/javalib/java/lang/Character.java,
+ libraries/javalib/java/lang/Integer.java,
+ libraries/javalib/java/lang/Long.java,
+ libraries/javalib/java/lang/Short.java:
+ Replaced by implemenation from GNU Classpath.
+
+ * test/regression/ProcessClassInst.java,
+ test/regression/ProcessClassStop.java:
+ Adapted output for changes.
+
+ * libraries/javalib/java/io/ObjectOutputStream.java
+ (getObjectField): Clarified error checking code, and
+ improved exception messages.
+
+ * libraries/javalib/Klasses.jar.bootstrap:
+ Regenerated.
+
+2005-01-09 Helmer Kraemer <hkraemer at freenet.de>
+
+ * libraries/javalib/java/lang/Double.java (TYPE),
+ libraries/javalib/java/lang/Float.java (TYPE):
+ Use VMClassLoader.getPrimitiveType.
+
+ * libraries/clib/native/Class.c
+ (java_lang_Class_getPrimitiveClass): Removed.
+
+ * libraries/javalib/java/lang/Class.java
+ (getPrimitiveClass) Removed.
+
+ * libraries/clib/native/ClassLoader.c
+ (java_lang_VMClassLoader_getPrimitiveClass0): New function.
+
+ * libraries/javalib/java/lang/VMClassLoader.java
+ (getPrimitiveClass) Implemented.
+ (getPrimitiveClass0) New method.
+
2005-01-09 Kiyo Inaba <inaba at src.ricoh.co.jp>
* config/m68k/jit-m68k.def,
Index: kaffe/libraries/clib/native/Class.c
diff -u kaffe/libraries/clib/native/Class.c:1.79 kaffe/libraries/clib/native/Class.c:1.80
--- kaffe/libraries/clib/native/Class.c:1.79 Tue Dec 21 17:31:28 2004
+++ kaffe/libraries/clib/native/Class.c Sun Jan 9 17:26:14 2005
@@ -227,42 +227,6 @@
}
/*
- * Get primitive class from class name (JDK 1.1)
- */
-struct Hjava_lang_Class*
-java_lang_Class_getPrimitiveClass(struct Hjava_lang_String* name)
-{
- jchar* chrs;
-
- chrs = STRING_DATA(name);
- switch (chrs[0]) {
- case 'b':
- if (chrs[1] == 'y') {
- return (byteClass);
- }
- if (chrs[1] == 'o') {
- return (booleanClass);
- }
- break;
- case 'c':
- return (charClass);
- case 'd':
- return (doubleClass);
- case 'f':
- return (floatClass);
- case 'i':
- return (intClass);
- case 'l':
- return (longClass);
- case 's':
- return (shortClass);
- case 'v':
- return (voidClass);
- }
- return(NULL);
-}
-
-/*
* Is object instance of this class?
*/
jbool
Index: kaffe/libraries/clib/native/ClassLoader.c
diff -u kaffe/libraries/clib/native/ClassLoader.c:1.43 kaffe/libraries/clib/native/ClassLoader.c:1.44
--- kaffe/libraries/clib/native/ClassLoader.c:1.43 Sat Jan 1 11:35:44 2005
+++ kaffe/libraries/clib/native/ClassLoader.c Sun Jan 9 17:26:14 2005
@@ -28,6 +28,33 @@
#include "java_lang_VMClassLoader.h"
#include "defs.h"
+struct Hjava_lang_Class*
+java_lang_VMClassLoader_getPrimitiveClass0(jchar typeCode)
+{
+ switch(typeCode) {
+ case 'Z':
+ return (booleanClass);
+ case 'B':
+ return (byteClass);
+ case 'C':
+ return (charClass);
+ case 'D':
+ return (doubleClass);
+ case 'F':
+ return (floatClass);
+ case 'I':
+ return (intClass);
+ case 'J':
+ return (longClass);
+ case 'S':
+ return (shortClass);
+ case 'V':
+ return (voidClass);
+ default:
+ return(NULL);
+ }
+}
+
/*
* Translate an array of bytes into a class.
*/
Index: kaffe/libraries/javalib/Klasses.jar.bootstrap
cvs rdiff: failed to read diff file header /tmp/cvsh3RkYa for Klasses.jar.bootstrap,v: end of file
system command returned non-zero exit status: 1: aborting
More information about the kaffe
mailing list