That's ok to apply. Indeed it does look strange, do you have an error message?<div><br></div><div>In any case, the fact that primitive classes have a VT should disappear. I haven't gone to doing that cleanup yet.<br>
<div><br><div class="gmail_quote">On Mon, Nov 7, 2011 at 4:04 AM, Will Dietz <span dir="ltr"><<a href="mailto:wdietz2@illinois.edu">wdietz2@illinois.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Inlined below.<br>
<br>
I honestly don't know why this didn't cause problems before, since we<br>
explicitly attempt to emit the VT for primitive classes (while<br>
precompiling) in a few places.  However, this is needed for the "emit<br>
null for j.l.Class" patch to work, which was a bit unexpected :).<br>
<br>
Thanks!<br>
<br>
~Will<br>
<br>
>From 8a795a7a5f6c69ef97407ef9582d8b8a524ba456 Mon Sep 17 00:00:00 2001<br>
From: Will Dietz <<a href="mailto:w@wdtz.org">w@wdtz.org</a>><br>
Date: Sun, 6 Nov 2011 20:16:44 -0600<br>
Subject: [PATCH 8/8] Don't try to emit methods from primitive classes' VT,<br>
 they're bogus.<br>
<br>
---<br>
 lib/J3/Compiler/JavaAOTCompiler.cpp |    5 ++++-<br>
 1 files changed, 4 insertions(+), 1 deletions(-)<br>
<br>
diff --git a/lib/J3/Compiler/JavaAOTCompiler.cpp<br>
b/lib/J3/Compiler/JavaAOTCompiler.cpp<br>
index 2ae8973..c4dc364 100644<br>
--- a/lib/J3/Compiler/JavaAOTCompiler.cpp<br>
+++ b/lib/J3/Compiler/JavaAOTCompiler.cpp<br>
@@ -1775,7 +1775,10 @@ Constant*<br>
JavaAOTCompiler::CreateConstantFromVT(JavaVirtualTable* VT) {<br>
   // methods<br>
   for (uint32 i = JavaVirtualTable::getFirstJavaMethodIndex(); i < size; ++i) {<br>
     JavaMethod* meth = ((JavaMethod**)RealVT)[i];<br>
-    if (isAbstract(meth->access)) {<br>
+    // Primitive classes don't have methods--abstract or otherwise.<br>
+    // (But we do have placeholders for j.l.Object methods in their VTs,<br>
+    // so just emit NULL's here)<br>
+    if (isAbstract(meth->access) || classDef->isPrimitive()) {<br>
       Elemts.push_back(Constant::getNullValue(PTy));<br>
     } else {<br>
       Function* F = getMethodOrStub(meth, maybeCustomize);<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.5.1<br>
_______________________________________________<br>
vmkit-commits mailing list<br>
<a href="mailto:vmkit-commits@cs.uiuc.edu">vmkit-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/vmkit-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/vmkit-commits</a><br>
</font></span></blockquote></div><br></div></div>