/hg/icedtea7: PR2652: CACAO fails as a build VM for icedtea
andrew at icedtea.classpath.org
andrew at icedtea.classpath.org
Wed Jan 6 04:57:43 UTC 2016
changeset d44ea9fb2df8 in /hg/icedtea7
details: http://icedtea.classpath.org/hg/icedtea7?cmd=changeset;node=d44ea9fb2df8
author: Andrew John Hughes <gnu_andrew at member.fsf.org>
date: Tue Jan 05 21:16:49 2016 +0000
PR2652: CACAO fails as a build VM for icedtea
2015-10-15 Stefan Ring <stefan at complang.tuwien.ac.at>
PR2652: CACAO fails as a build VM for icedtea
* Makefile.am:
(ICEDTEA_PATCHES): Add CACAO patch for PR2652.
* README: Fix CACAO URL.
* patches/cacao/pr2652-classloader.patch:
Set classLoader field in java.lang.Class as expected by JDK.
diffstat:
ChangeLog | 9 ++++
Makefile.am | 3 +-
README | 2 +-
patches/cacao/pr2652-classloader.patch | 74 ++++++++++++++++++++++++++++++++++
4 files changed, 86 insertions(+), 2 deletions(-)
diffs (119 lines):
diff -r bffa3455fa17 -r d44ea9fb2df8 ChangeLog
--- a/ChangeLog Mon Nov 23 02:54:31 2015 +0000
+++ b/ChangeLog Tue Jan 05 21:16:49 2016 +0000
@@ -1,3 +1,12 @@
+2015-10-15 Stefan Ring <stefan at complang.tuwien.ac.at>
+
+ PR2652: CACAO fails as a build VM for icedtea
+ * Makefile.am:
+ (ICEDTEA_PATCHES): Add CACAO patch for PR2652.
+ * README: Fix CACAO URL.
+ * patches/cacao/pr2652-classloader.patch:
+ Set classLoader field in java.lang.Class as expected by JDK.
+
2015-11-20 Andrew John Hughes <gnu.andrew at member.fsf.org>
* Makefile.am,
diff -r bffa3455fa17 -r d44ea9fb2df8 Makefile.am
--- a/Makefile.am Mon Nov 23 02:54:31 2015 +0000
+++ b/Makefile.am Tue Jan 05 21:16:49 2016 +0000
@@ -382,7 +382,8 @@
patches/cacao/launcher.patch \
patches/cacao/memory.patch \
patches/cacao/pr2032.patch \
- patches/cacao/pr2520-tempdir.patch
+ patches/cacao/pr2520-tempdir.patch \
+ patches/cacao/pr2652-classloader.patch
else
if USING_CACAO
ICEDTEA_PATCHES += \
diff -r bffa3455fa17 -r d44ea9fb2df8 README
--- a/README Mon Nov 23 02:54:31 2015 +0000
+++ b/README Tue Jan 05 21:16:49 2016 +0000
@@ -69,7 +69,7 @@
CACAO as VM
===========
-The CACAO virtual machine (http://cacaovm.org) can be used as an
+The CACAO virtual machine (http://cacaojvm.org) can be used as an
alternative to the HotSpot virtual machine. One advantage of this is
that it already provides a JIT for many platforms to which HotSpot has
not yet been ported, including ppc, arm and mips. To use CACAO as the
diff -r bffa3455fa17 -r d44ea9fb2df8 patches/cacao/pr2652-classloader.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/cacao/pr2652-classloader.patch Tue Jan 05 21:16:49 2016 +0000
@@ -0,0 +1,74 @@
+Set classLoader field in java.lang.Class as expected by JDK
+
+--- cacao/cacao/src/vm/class.cpp
++++ cacao/cacao/src/vm/class.cpp
+@@ -314,6 +314,9 @@
+
+ c = classcache_store(cl, c, true);
+
++ java_lang_Class jlc(LLNI_classinfo_wrap(c));
++ jlc.set_classLoader(cl);
++
+ return c;
+ }
+
+--- cacao/cacao/src/vm/javaobjects.cpp
++++ cacao/cacao/src/vm/javaobjects.cpp
+@@ -270,11 +270,19 @@
+ { 0, 0 }
+ };
+
++off_t java_lang_Class::offset_classLoader;
++
++static DynOffsetEntry dyn_entries_java_lang_Class[] = {
++ { &java_lang_Class::set_classLoader_offset, "classLoader" },
++ { 0, 0 }
++};
++
+ #endif
+
+ void jobjects_register_dyn_offsets()
+ {
+ register_dyn_entry_table(class_java_lang_Thread, dyn_entries_java_lang_Thread);
++ register_dyn_entry_table(class_java_lang_Class, dyn_entries_java_lang_Class);
+ }
+
+ #endif // ENABLE_JAVASE
+--- cacao/cacao/src/vm/javaobjects.hpp
++++ cacao/cacao/src/vm/javaobjects.hpp
+@@ -1847,6 +1847,35 @@
+
+
+ /**
++ * OpenJDK java/lang/Class
++ *
++ * Object layout:
++ *
++ * 0. object header
++ * ? java.lang.ClassLoader classLoader
++ */
++class java_lang_Class : public java_lang_Object, private FieldAccess {
++private:
++ // Static offsets of the object's instance fields.
++ static off_t offset_classLoader;
++
++public:
++ java_lang_Class(java_handle_t* h) : java_lang_Object(h) {}
++
++ // Setters.
++ void set_classLoader(java_handle_t* value);
++
++ // Offset initializers
++ static void set_classLoader_offset(int32_t off) { offset_classLoader = off; }
++};
++
++inline void java_lang_Class::set_classLoader(java_handle_t* value)
++{
++ assert(offset_classLoader);
++ set(_handle, offset_classLoader, value);
++}
++
++/**
+ * OpenJDK java/lang/ClassLoader
+ *
+ * Object layout:
More information about the distro-pkg-dev
mailing list