[llvm-commits] CVS: llvm/lib/Bytecode/Reader/ReadConst.cpp Reader.cpp ReaderInternals.h

Chris Lattner lattner at cs.uiuc.edu
Thu Mar 6 11:19:01 PST 2003


Changes in directory llvm/lib/Bytecode/Reader:

ReadConst.cpp updated: 1.41 -> 1.42
Reader.cpp updated: 1.45 -> 1.46
ReaderInternals.h updated: 1.30 -> 1.31

---
Log message:

s/Method/Function in variable and method names


---
Diffs of the changes:

Index: llvm/lib/Bytecode/Reader/ReadConst.cpp
diff -u llvm/lib/Bytecode/Reader/ReadConst.cpp:1.41 llvm/lib/Bytecode/Reader/ReadConst.cpp:1.42
--- llvm/lib/Bytecode/Reader/ReadConst.cpp:1.41	Thu Mar  6 10:32:25 2003
+++ llvm/lib/Bytecode/Reader/ReadConst.cpp	Thu Mar  6 11:18:14 2003
@@ -102,9 +102,9 @@
   if (OldType == NewType &&
       OldType->isAbstract()) return;  // Type is modified, but same
 
-  TypeValuesListTy::iterator I = find(MethodTypeValues.begin(), 
-				      MethodTypeValues.end(), OldType);
-  if (I == MethodTypeValues.end()) {
+  TypeValuesListTy::iterator I = find(FunctionTypeValues.begin(), 
+				      FunctionTypeValues.end(), OldType);
+  if (I == FunctionTypeValues.end()) {
     I = find(ModuleTypeValues.begin(), ModuleTypeValues.end(), OldType);
     assert(I != ModuleTypeValues.end() && 
 	   "Can't refine a type I don't know about!");


Index: llvm/lib/Bytecode/Reader/Reader.cpp
diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.45 llvm/lib/Bytecode/Reader/Reader.cpp:1.46
--- llvm/lib/Bytecode/Reader/Reader.cpp:1.45	Thu Mar  6 11:15:19 2003
+++ llvm/lib/Bytecode/Reader/Reader.cpp	Thu Mar  6 11:18:14 2003
@@ -29,11 +29,11 @@
     Slot = Ty->getPrimitiveID();
   } else {
     // Check the function level types first...
-    TypeValuesListTy::iterator I = find(MethodTypeValues.begin(),
-					MethodTypeValues.end(), Ty);
-    if (I != MethodTypeValues.end()) {
+    TypeValuesListTy::iterator I = find(FunctionTypeValues.begin(),
+					FunctionTypeValues.end(), Ty);
+    if (I != FunctionTypeValues.end()) {
       Slot = FirstDerivedTyID+ModuleTypeValues.size()+
-             (&*I - &MethodTypeValues[0]);
+             (&*I - &FunctionTypeValues[0]);
     } else {
       I = find(ModuleTypeValues.begin(), ModuleTypeValues.end(), Ty);
       if (I == ModuleTypeValues.end()) return true;   // Didn't find type!
@@ -92,8 +92,8 @@
 
     // Nope, is it a function level type?
     Num -= ModuleTypeValues.size();
-    if (Num < MethodTypeValues.size())
-      return (Value*)MethodTypeValues[Num].get();
+    if (Num < FunctionTypeValues.size())
+      return (Value*)FunctionTypeValues[Num].get();
 
     return 0;
   }
@@ -274,7 +274,7 @@
   GlobalRefs.erase(I);                // Remove the map entry for it
 }
 
-bool BytecodeParser::ParseMethod(const uchar *&Buf, const uchar *EndBuf) {
+bool BytecodeParser::ParseFunction(const uchar *&Buf, const uchar *EndBuf) {
   // Clear out the local values table...
   Values.clear();
   if (FunctionSignatureList.empty()) {
@@ -316,7 +316,7 @@
     switch (Type) {
     case BytecodeFormat::ConstantPool:
       BCR_TRACE(2, "BLOCK BytecodeFormat::ConstantPool: {\n");
-      if (ParseConstantPool(Buf, Buf+Size, Values, MethodTypeValues)) {
+      if (ParseConstantPool(Buf, Buf+Size, Values, FunctionTypeValues)) {
 	delete M; return true;
       }
       break;
@@ -362,7 +362,7 @@
   }
 
   Value *FunctionPHolder = getValue(PMTy, MethSlot, false);
-  assert(FunctionPHolder && "Something is broken no placeholder found!");
+  assert(FunctionPHolder && "Something is broken, no placeholder found!");
   assert(isa<Function>(FunctionPHolder) && "Not a function?");
 
   unsigned type;  // Type slot
@@ -375,7 +375,7 @@
   ModuleValues[type][MethSlot] = M;
 
   // Clear out function level types...
-  MethodTypeValues.clear();
+  FunctionTypeValues.clear();
 
   // If anyone is using the placeholder make them use the real function instead
   FunctionPHolder->replaceAllUsesWith(M);
@@ -523,7 +523,7 @@
 
     case BytecodeFormat::Function: {
       BCR_TRACE(1, "BLOCK BytecodeFormat::Function: {\n");
-      if (ParseMethod(Buf, Buf+Size)) return true;  // Error parsing function
+      if (ParseFunction(Buf, Buf+Size)) return true;  // Error parsing function
       break;
     }
 


Index: llvm/lib/Bytecode/Reader/ReaderInternals.h
diff -u llvm/lib/Bytecode/Reader/ReaderInternals.h:1.30 llvm/lib/Bytecode/Reader/ReaderInternals.h:1.31
--- llvm/lib/Bytecode/Reader/ReaderInternals.h:1.30	Thu Mar  6 11:15:19 2003
+++ llvm/lib/Bytecode/Reader/ReaderInternals.h	Thu Mar  6 11:18:14 2003
@@ -76,7 +76,7 @@
   //
   typedef std::vector<PATypeHandle<Type> > TypeValuesListTy;
   TypeValuesListTy ModuleTypeValues;
-  TypeValuesListTy MethodTypeValues;
+  TypeValuesListTy FunctionTypeValues;
 
   // Information read from the ModuleGlobalInfo section of the file...
   unsigned FirstDerivedTyID;
@@ -92,7 +92,7 @@
   bool ParseModule          (const uchar * Buf, const uchar *End);
   bool ParseModuleGlobalInfo(const uchar *&Buf, const uchar *End);
   bool ParseSymbolTable   (const uchar *&Buf, const uchar *End, SymbolTable *);
-  bool ParseMethod        (const uchar *&Buf, const uchar *End);
+  bool ParseFunction      (const uchar *&Buf, const uchar *End);
   bool ParseBasicBlock    (const uchar *&Buf, const uchar *End, BasicBlock *&);
   bool ParseInstruction   (const uchar *&Buf, const uchar *End, Instruction *&,
                            BasicBlock *BB /*HACK*/);





More information about the llvm-commits mailing list