[vmkit-commits] [vmkit] r56151 - /vmkit/branches/isolate/lib/JnJVM/VMCore/JavaString.cpp

Nicolas Geoffray nicolas.geoffray at lip6.fr
Fri Sep 12 06:51:31 PDT 2008


Author: geoffray
Date: Fri Sep 12 08:51:31 2008
New Revision: 56151

URL: http://llvm.org/viewvc/llvm-project?rev=56151&view=rev
Log:
Temporary hack for shared UTF8s.


Modified:
    vmkit/branches/isolate/lib/JnJVM/VMCore/JavaString.cpp

Modified: vmkit/branches/isolate/lib/JnJVM/VMCore/JavaString.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/isolate/lib/JnJVM/VMCore/JavaString.cpp?rev=56151&r1=56150&r2=56151&view=diff

==============================================================================
--- vmkit/branches/isolate/lib/JnJVM/VMCore/JavaString.cpp (original)
+++ vmkit/branches/isolate/lib/JnJVM/VMCore/JavaString.cpp Fri Sep 12 08:51:31 2008
@@ -19,6 +19,11 @@
 JavaString* JavaString::stringDup(const UTF8*& utf8, Jnjvm* vm) {
   UserClass* cl = vm->upcalls->newString;
   JavaString* res = (JavaString*)malloc(cl->getVirtualSize());
+#ifdef MULTIPLE_VM
+  /// Do this for now, but we will have to change it to duplicate the UTF8.
+  /// UTF8 that dont have a class are shared UTF8.
+  if (!utf8->classOf) ((UTF8*)utf8)->classOf = vm->upcalls->ArrayOfChar;
+#endif
   ((void**)res)[0] = cl->getVirtualVT();
   res->classOf = cl;
 





More information about the vmkit-commits mailing list