[llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp

Alkis Evlogimenos alkis at cs.uiuc.edu
Thu Oct 28 00:49:16 PDT 2004



Changes in directory llvm-java/lib/Compiler:

Compiler.cpp updated: 1.129 -> 1.130
---
Log message:

Make all invokespecial calls statically bound.


---
Diffs of the changes:  (+5 -12)

Index: llvm-java/lib/Compiler/Compiler.cpp
diff -u llvm-java/lib/Compiler/Compiler.cpp:1.129 llvm-java/lib/Compiler/Compiler.cpp:1.130
--- llvm-java/lib/Compiler/Compiler.cpp:1.129	Tue Oct 26 23:10:34 2004
+++ llvm-java/lib/Compiler/Compiler.cpp	Thu Oct 28 02:49:05 2004
@@ -1456,18 +1456,11 @@
       std::string funcName = className + '/' + methodDescr;
       const ClassInfo& ci = getClassInfo(ClassFile::get(className));
 
-      // Constructor calls are statically bound.
-      if (methodName == "<init>") {
-	FunctionType* funcTy =
-	  cast<FunctionType>(getType(nameAndType->getDescriptor(), ci.type));
-	Function* function = module_.getOrInsertFunction(funcName, funcTy);
-	toCompileFunctions_.insert(function);
-	makeCall(function, getParams(funcTy));
-      }
-      // Otherwise we call the superclass' implementation of the method.
-      else {
-	assert(0 && "not implemented");
-      }
+      FunctionType* funcTy =
+        cast<FunctionType>(getType(nameAndType->getDescriptor(), ci.type));
+      Function* function = module_.getOrInsertFunction(funcName, funcTy);
+      toCompileFunctions_.insert(function);
+      makeCall(function, getParams(funcTy));
     }
 
     void do_invokestatic(unsigned index) {






More information about the llvm-commits mailing list