harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r538554 - /harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/java_type.cpp
Date Wed, 16 May 2007 12:08:28 GMT
Author: varlax
Date: Wed May 16 05:08:28 2007
New Revision: 538554

URL: http://svn.apache.org/viewvc?view=rev&rev=538554
Log:
Applied HARMONY-3840 [drlvm][classloader] 'clss' field is never cached for TypeDesc struct

Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/java_type.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/java_type.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/java_type.cpp?view=diff&rev=538554&r1=538553&r2=538554
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/java_type.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/java_type.cpp Wed May 16 05:08:28
2007
@@ -101,7 +101,7 @@
         c->get_class_loader()->UnlockTypesCache();
         return *tdres;
     }
-    TypeDesc* td = new TypeDesc(K_Object, NULL, NULL, cname, c->get_class_loader(), NULL);
+    TypeDesc* td = new TypeDesc(K_Object, NULL, NULL, cname, c->get_class_loader(), c);
     assert(td);
     c->get_class_loader()->GetJavaTypes()->Insert(cname, td);
     c->get_class_loader()->UnlockTypesCache();
@@ -115,7 +115,6 @@
     if (clss) return clss; // class already loaded
     Global_Env* env = VM_Global_State::loader_env;
     Class* element_clss;
-    Class* c;
 
     switch (get_kind()) {
     case K_S1: return env->Byte_Class;
@@ -132,13 +131,14 @@
         assert (name);
         // FIXME: better to use LoadVerifyAndPrepareClass here - but this results in Recursive
resolution collision in StartLoadingClass
         //c = loader->LoadVerifyAndPrepareClass(env, name);
-        c = loader->LoadClass(env, name);
-        return c;
+        clss = loader->LoadClass(env, name);
+        return clss;
     case K_Vector:
         assert (component_type);
         element_clss = component_type->load_type_desc();
         if (!element_clss) return NULL;
-        return resolve_class_array_of_class1(env, element_clss);
+        clss = resolve_class_array_of_class1(env, element_clss);
+        return clss;
     default:
         // All other types are not Java types, so fail
         ABORT("Unexpected kind");
@@ -167,4 +167,5 @@
         return td;
     }
 }
+
 



Mime
View raw message