[llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Fri Aug 6 04:06:16 PDT 2004
Changes in directory llvm-java/lib/Compiler:
Compiler.cpp updated: 1.78 -> 1.79
---
Log message:
Do not use ClassFile::getConstantPool(). Use the newly added
getConstant*() member functions.
---
Diffs of the changes: (+5 -10)
Index: llvm-java/lib/Compiler/Compiler.cpp
diff -u llvm-java/lib/Compiler/Compiler.cpp:1.78 llvm-java/lib/Compiler/Compiler.cpp:1.79
--- llvm-java/lib/Compiler/Compiler.cpp:1.78 Thu Aug 5 13:56:55 2004
+++ llvm-java/lib/Compiler/Compiler.cpp Fri Aug 6 06:06:06 2004
@@ -342,7 +342,6 @@
init.resize(elements.size(), NULL);
}
init[index] = vfun;
- DEBUG(std::cerr << index << " = " << methodDescr << '\n');
}
}
@@ -365,8 +364,7 @@
}
GlobalVariable* getStaticField(unsigned index) {
- ConstantFieldRef* fieldRef =
- (ConstantFieldRef*)(cf_->getConstantPool()[index]);
+ ConstantFieldRef* fieldRef = cf_->getConstantFieldRef(index);
ConstantNameAndType* nameAndType = fieldRef->getNameAndType();
std::string globalName =
@@ -380,8 +378,7 @@
}
Value* getField(unsigned bcI, unsigned index, Value* ptr) {
- ConstantFieldRef* fieldRef =
- (ConstantFieldRef*)(cf_->getConstantPool()[index]);
+ ConstantFieldRef* fieldRef = cf_->getConstantFieldRef(index);
ConstantNameAndType* nameAndType = fieldRef->getNameAndType();
return getField(bcI,
@@ -568,7 +565,7 @@
}
void do_ldc(unsigned bcI, unsigned index) {
- Constant* c = cf_->getConstantPool()[index];
+ Constant* c = cf_->getConstant(index);
assert(getConstant(c) && "Java constant not handled!");
opStack_.push(getConstant(c));
}
@@ -926,8 +923,7 @@
}
void do_invokevirtual(unsigned bcI, unsigned index) {
- ConstantMethodRef* methodRef =
- (ConstantMethodRef*)(cf_->getConstantPool()[index]);
+ ConstantMethodRef* methodRef = cf_->getConstantMethodRef(index);
ConstantNameAndType* nameAndType = methodRef->getNameAndType();
const std::string className = methodRef->getClass()->getName()->str();
@@ -960,8 +956,7 @@
}
void do_invokestatic(unsigned bcI, unsigned index) {
- ConstantMethodRef* methodRef =
- (ConstantMethodRef*)(cf_->getConstantPool()[index]);
+ ConstantMethodRef* methodRef = cf_->getConstantMethodRef(index);
ConstantNameAndType* nameAndType = methodRef->getNameAndType();
std::string funcName =
More information about the llvm-commits
mailing list