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

Alkis Evlogimenos alkis at cs.uiuc.edu
Mon Mar 28 15:40:01 PST 2005



Changes in directory llvm-java/lib/Compiler:

VMClass.h updated: 1.14 -> 1.15
VMClass.cpp updated: 1.15 -> 1.16
Resolver.cpp updated: 1.7 -> 1.8
Compiler.cpp updated: 1.261 -> 1.262
---
Log message:

Rename getStructType() to getLayoutType().


---
Diffs of the changes:  (+9 -9)

 Compiler.cpp |    6 +++---
 Resolver.cpp |    2 +-
 VMClass.cpp  |    8 ++++----
 VMClass.h    |    2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)


Index: llvm-java/lib/Compiler/VMClass.h
diff -u llvm-java/lib/Compiler/VMClass.h:1.14 llvm-java/lib/Compiler/VMClass.h:1.15
--- llvm-java/lib/Compiler/VMClass.h:1.14	Mon Mar 28 13:55:42 2005
+++ llvm-java/lib/Compiler/VMClass.h	Mon Mar 28 17:39:50 2005
@@ -70,7 +70,7 @@
 
   public:
     const std::string& getName() const { return name_; }
-    const Type* getStructType() const { return structType_; }
+    const Type* getLayoutType() const { return structType_; }
     const Type* getType() const { return type_; }
     const ClassFile* getClassFile() const { return classFile_; }
     unsigned getNumSuperClasses() const { return superClasses_.size(); }


Index: llvm-java/lib/Compiler/VMClass.cpp
diff -u llvm-java/lib/Compiler/VMClass.cpp:1.15 llvm-java/lib/Compiler/VMClass.cpp:1.16
--- llvm-java/lib/Compiler/VMClass.cpp:1.15	Mon Mar 28 17:14:41 2005
+++ llvm-java/lib/Compiler/VMClass.cpp	Mon Mar 28 17:39:50 2005
@@ -98,7 +98,7 @@
   if (isArray()) {
     superClasses_.reserve(1);
     superClasses_.push_back(resolver_->getClass("java/lang/Object"));
-    addField("super", superClasses_[0]->getStructType());
+    addField("super", superClasses_[0]->getLayoutType());
     addField("<length>", Type::UIntTy);
     addField("<data>", ArrayType::get(componentClass_->getType(), 0));
 
@@ -136,7 +136,7 @@
                         interfaces_.end());
 
       // We first add the struct of the super class.
-      addField("super", superClass->getStructType());
+      addField("super", superClass->getLayoutType());
 
       // Although we can safely assume that all interfaces inherit
       // from java/lang/Object, java/lang/Class.getSuperclass()
@@ -168,7 +168,7 @@
 
   resolveType();
 
-  assert(!isa<OpaqueType>(getStructType()) &&"Class not initialized properly!");
+  assert(!isa<OpaqueType>(getLayoutType()) &&"Class not initialized properly!");
 }
 
 llvm::Constant* VMClass::getConstant(unsigned index) const
@@ -186,7 +186,7 @@
     Constant* jc = classFile_->getConstant(index);
     if (ConstantString* s = dynamic_cast<ConstantString*>(jc)) {
       const VMClass* stringClass = resolver_->getClass("java/lang/String");
-      const Type* stringType = stringClass->getStructType();
+      const Type* stringType = stringClass->getLayoutType();
       resolvedConstantPool_[index] =
         new GlobalVariable(stringType,
                            false,


Index: llvm-java/lib/Compiler/Resolver.cpp
diff -u llvm-java/lib/Compiler/Resolver.cpp:1.7 llvm-java/lib/Compiler/Resolver.cpp:1.8
--- llvm-java/lib/Compiler/Resolver.cpp:1.7	Mon Mar 28 17:14:41 2005
+++ llvm-java/lib/Compiler/Resolver.cpp	Mon Mar 28 17:39:50 2005
@@ -128,7 +128,7 @@
     }
     it->second.link();
     if (!it->second.isPrimitive())
-      module_->addTypeName(descriptor, it->second.getStructType());
+      module_->addTypeName(descriptor, it->second.getLayoutType());
     DEBUG(std::cerr << "Loaded class: " << descriptor << '\n');
   }
 


Index: llvm-java/lib/Compiler/Compiler.cpp
diff -u llvm-java/lib/Compiler/Compiler.cpp:1.261 llvm-java/lib/Compiler/Compiler.cpp:1.262
--- llvm-java/lib/Compiler/Compiler.cpp:1.261	Mon Mar 28 13:53:24 2005
+++ llvm-java/lib/Compiler/Compiler.cpp	Mon Mar 28 17:39:50 2005
@@ -1831,11 +1831,11 @@
                           InsertionPointTy* ip) {
       static std::vector<Value*> params(4);
 
-      Value* objRef = new MallocInst(clazz.getStructType(), NULL, TMP, ip);
+      Value* objRef = new MallocInst(clazz.getLayoutType(), NULL, TMP, ip);
       params[0] =
         new CastInst(objRef, PointerType::get(Type::SByteTy), TMP, ip); // dest
       params[1] = ConstantUInt::get(Type::UByteTy, 0); // value
-      params[2] = ConstantExpr::getSizeOf(clazz.getStructType()); // size
+      params[2] = ConstantExpr::getSizeOf(clazz.getLayoutType()); // size
       params[3] = ConstantUInt::get(Type::UIntTy, 0); // alignment
       new CallInst(memset_, params, "", ip);
 
@@ -1895,7 +1895,7 @@
         Instruction::Mul, count, elementSize, TMP, ip);
       // The size of the rest of the array object.
       llvm::Constant* arrayObjectSize =
-        ConstantExpr::getCast(ConstantExpr::getSizeOf(clazz->getStructType()),
+        ConstantExpr::getCast(ConstantExpr::getSizeOf(clazz->getLayoutType()),
                               Type::UIntTy);
 
       // Add the array part plus the object part together.






More information about the llvm-commits mailing list