[vmkit-commits] [vmkit] r96530 - in /vmkit/trunk/lib/J3/VMCore: JavaClass.cpp JavaClass.h JavaConstantPool.cpp JavaRuntimeJIT.cpp Jnjvm.cpp Jnjvm.h

Nicolas Geoffray nicolas.geoffray at lip6.fr
Wed Feb 17 15:25:12 PST 2010


Author: geoffray
Date: Wed Feb 17 17:24:59 2010
New Revision: 96530

URL: http://llvm.org/viewvc/llvm-project?rev=96530&view=rev
Log:
Revert previous change. Something gets broken with MMTk.


Modified:
    vmkit/trunk/lib/J3/VMCore/JavaClass.cpp
    vmkit/trunk/lib/J3/VMCore/JavaClass.h
    vmkit/trunk/lib/J3/VMCore/JavaConstantPool.cpp
    vmkit/trunk/lib/J3/VMCore/JavaRuntimeJIT.cpp
    vmkit/trunk/lib/J3/VMCore/Jnjvm.cpp
    vmkit/trunk/lib/J3/VMCore/Jnjvm.h

Modified: vmkit/trunk/lib/J3/VMCore/JavaClass.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/JavaClass.cpp?rev=96530&r1=96529&r2=96530&view=diff

==============================================================================
--- vmkit/trunk/lib/J3/VMCore/JavaClass.cpp (original)
+++ vmkit/trunk/lib/J3/VMCore/JavaClass.cpp Wed Feb 17 17:24:59 2010
@@ -363,24 +363,11 @@
   return cur;
 }
 
-JavaMethod* Class::lookupSpecialMethodDontThrow(const UTF8* name,
-                                                const UTF8* type,
-                                                Class* current) {
-  JavaMethod* meth = lookupMethodDontThrow(name, type, false, true, NULL);
-
-  if (isSuper(current->access) &&
-      current != meth->classDef &&
-      meth->classDef->isAssignableFrom(current) &&
-      !name->equals(classLoader->bootstrapLoader->initName)) {
-    meth = current->super->lookupMethodDontThrow(name, type, false, true, NULL);
-  }
-
-  return meth;
-}
-
-JavaMethod* Class::lookupMethodDontThrow(const UTF8* name, const UTF8* type,
-                                         bool isStatic, bool recurse,
-                                         Class** methodCl) {
+JavaMethod* Class::lookupMethodDontThrow(const UTF8* name,
+                                               const UTF8* type,
+                                               bool isStatic,
+                                               bool recurse,
+                                               Class** methodCl) {
   
   JavaMethod* methods = 0;
   uint32 nb = 0;

Modified: vmkit/trunk/lib/J3/VMCore/JavaClass.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/JavaClass.h?rev=96530&r1=96529&r2=96530&view=diff

==============================================================================
--- vmkit/trunk/lib/J3/VMCore/JavaClass.h (original)
+++ vmkit/trunk/lib/J3/VMCore/JavaClass.h Wed Feb 17 17:24:59 2010
@@ -618,14 +618,6 @@
   JavaMethod* lookupInterfaceMethodDontThrow(const UTF8* name,
                                              const UTF8* type);
   
-  /// lookupSpecialMethodDontThrow - Lookup a method following the
-  /// invokespecial specification.
-  /// Do not throw if the method is not found.
-  ///
-  JavaMethod* lookupSpecialMethodDontThrow(const UTF8* name,
-                                           const UTF8* type,
-                                           Class* current);
-  
   /// lookupMethod - Lookup a method and throw an exception if not found.
   ///
   JavaMethod* lookupMethod(const UTF8* name, const UTF8* type, bool isStatic,

Modified: vmkit/trunk/lib/J3/VMCore/JavaConstantPool.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/JavaConstantPool.cpp?rev=96530&r1=96529&r2=96530&view=diff

==============================================================================
--- vmkit/trunk/lib/J3/VMCore/JavaConstantPool.cpp (original)
+++ vmkit/trunk/lib/J3/VMCore/JavaConstantPool.cpp Wed Feb 17 17:24:59 2010
@@ -433,13 +433,8 @@
     Class* lookup = cl->isArray() ? cl->super : cl->asClass();
     if (lookup->isResolved()) {
       // lookup the method
-      if (isStatic(access)) {
-        meth = lookup->lookupMethodDontThrow(utf8, sign->keyName,
-                                             true, true, 0);
-      } else {
-        meth = lookup->lookupSpecialMethodDontThrow(utf8, sign->keyName,
-                                                    classDef);
-      }
+      meth = lookup->lookupMethodDontThrow(utf8, sign->keyName,
+                                           isStatic(access), true, 0);
     }
   }
   

Modified: vmkit/trunk/lib/J3/VMCore/JavaRuntimeJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/JavaRuntimeJIT.cpp?rev=96530&r1=96529&r2=96530&view=diff

==============================================================================
--- vmkit/trunk/lib/J3/VMCore/JavaRuntimeJIT.cpp (original)
+++ vmkit/trunk/lib/J3/VMCore/JavaRuntimeJIT.cpp Wed Feb 17 17:24:59 2010
@@ -714,12 +714,7 @@
   ctpInfo->resolveMethod(ctpIndex, cl, utf8, sign);
   UserClass* lookup = cl->isArray() ? cl->super : cl->asClass();
   assert(lookup->isInitializing() && "Class not ready");
-  JavaMethod* callee =
-    lookup->lookupSpecialMethodDontThrow(utf8, sign->keyName, caller->classDef);
-  
-  if (!callee) {
-    th->getJVM()->abstractMethodError(lookup, utf8);
-  }
+  JavaMethod* callee = lookup->lookupMethod(utf8, sign->keyName, false, true,0);
 
   // Compile the found method.
   result = callee->compiledPtr();

Modified: vmkit/trunk/lib/J3/VMCore/Jnjvm.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/Jnjvm.cpp?rev=96530&r1=96529&r2=96530&view=diff

==============================================================================
--- vmkit/trunk/lib/J3/VMCore/Jnjvm.cpp (original)
+++ vmkit/trunk/lib/J3/VMCore/Jnjvm.cpp Wed Feb 17 17:24:59 2010
@@ -526,13 +526,6 @@
         upcalls->InitNoSuchMethodError, str);
 }
 
-void Jnjvm::abstractMethodError(CommonClass* cl, const UTF8* name) {
-  JavaString* str = CreateNoSuchMsg(cl, name, this);
-  llvm_gcroot(str, 0);
-  error(upcalls->AbstractMethodError,
-        upcalls->InitAbstractMethodError, str);
-}
-
 static JavaString* CreateUnableToLoad(const UTF8* name, Jnjvm* vm) {
   ArrayUInt16* msg = (ArrayUInt16*)
     vm->upcalls->ArrayOfChar->doNew(15 + name->size, vm);

Modified: vmkit/trunk/lib/J3/VMCore/Jnjvm.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/Jnjvm.h?rev=96530&r1=96529&r2=96530&view=diff

==============================================================================
--- vmkit/trunk/lib/J3/VMCore/Jnjvm.h (original)
+++ vmkit/trunk/lib/J3/VMCore/Jnjvm.h Wed Feb 17 17:24:59 2010
@@ -267,7 +267,6 @@
   void classCastException(JavaObject* obj, UserCommonClass* cl);
   void noSuchFieldError(CommonClass* cl, const UTF8* name);
   void noSuchMethodError(CommonClass* cl, const UTF8* name); 
-  void abstractMethodError(CommonClass* cl, const UTF8* name); 
   void noClassDefFoundError(const UTF8* name);
   void classNotFoundException(JavaString* str);
 





More information about the vmkit-commits mailing list