[vmkit-commits] [vmkit] r96195 - in /vmkit/trunk: include/j3/JavaLLVMCompiler.h include/mvm/JIT.h lib/J3/Compiler/J3Intrinsics.cpp lib/J3/Compiler/JavaJIT.cpp lib/Mvm/Compiler/JIT.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Sun Feb 14 14:17:58 PST 2010
Author: geoffray
Date: Sun Feb 14 16:17:58 2010
New Revision: 96195
URL: http://llvm.org/viewvc/llvm-project?rev=96195&view=rev
Log:
Refactoring - No functionality change.
Modified:
vmkit/trunk/include/j3/JavaLLVMCompiler.h
vmkit/trunk/include/mvm/JIT.h
vmkit/trunk/lib/J3/Compiler/J3Intrinsics.cpp
vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp
vmkit/trunk/lib/Mvm/Compiler/JIT.cpp
Modified: vmkit/trunk/include/j3/JavaLLVMCompiler.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/j3/JavaLLVMCompiler.h?rev=96195&r1=96194&r2=96195&view=diff
==============================================================================
--- vmkit/trunk/include/j3/JavaLLVMCompiler.h (original)
+++ vmkit/trunk/include/j3/JavaLLVMCompiler.h Sun Feb 14 16:17:58 2010
@@ -16,6 +16,7 @@
namespace llvm {
class BasicBlock;
+ class DIFactory;
}
namespace j3 {
@@ -40,6 +41,7 @@
protected:
llvm::Module* TheModule;
+ llvm::DIFactory* DebugFactory;
J3Intrinsics JavaIntrinsics;
void addJavaPasses();
@@ -62,6 +64,10 @@
virtual bool isStaticCompiling() = 0;
virtual bool emitFunctionName() = 0;
+
+ llvm::DIFactory* getDebugFactory() {
+ return DebugFactory;
+ }
llvm::Module* getLLVMModule() {
return TheModule;
@@ -166,7 +172,6 @@
}
llvm::Function* NativeLoader;
-
};
} // end namespace j3
Modified: vmkit/trunk/include/mvm/JIT.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/JIT.h?rev=96195&r1=96194&r2=96195&view=diff
==============================================================================
--- vmkit/trunk/include/mvm/JIT.h (original)
+++ vmkit/trunk/include/mvm/JIT.h Sun Feb 14 16:17:58 2010
@@ -25,15 +25,12 @@
class Constant;
class ConstantFP;
class ConstantInt;
- class DIFactory;
class ExecutionEngine;
class Function;
class FunctionPassManager;
class GCFunctionInfo;
class GCStrategy;
- class LLVMContext;
class Module;
- class ModuleProvider;
class PointerType;
class TargetData;
class TargetMachine;
@@ -42,9 +39,7 @@
namespace mvm {
-class LockNormal;
class LockRecursive;
-class VirtualMachine;
const double MaxDouble = +INFINITY; //1.0 / 0.0;
const double MinDouble = -INFINITY;//-1.0 / 0.0;
@@ -172,8 +167,6 @@
llvm::Constant* constantPtrOne;
llvm::Constant* constantPtrZero;
- llvm::DIFactory* DebugFactory;
-
static const llvm::PointerType* ptrType;
static const llvm::PointerType* ptr32Type;
static const llvm::PointerType* ptrPtrType;
Modified: vmkit/trunk/lib/J3/Compiler/J3Intrinsics.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/J3Intrinsics.cpp?rev=96195&r1=96194&r2=96195&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/J3Intrinsics.cpp (original)
+++ vmkit/trunk/lib/J3/Compiler/J3Intrinsics.cpp Sun Feb 14 16:17:58 2010
@@ -64,6 +64,7 @@
JavaLLVMCompiler::JavaLLVMCompiler(const std::string& str) :
TheModule(new llvm::Module(str, getGlobalContext())),
+ DebugFactory(new DIFactory(*TheModule)),
JavaIntrinsics(TheModule) {
enabledException = true;
@@ -384,11 +385,10 @@
MDNode* JavaLLVMCompiler::GetDbgSubprogram(JavaMethod* meth) {
if (getMethodInfo(meth)->getDbgSubprogram() == NULL) {
- MDNode* node =
- JavaIntrinsics.DebugFactory->CreateSubprogram(DIDescriptor(), "", "",
- "", DICompileUnit(), 0,
- DIType(), false,
- false).getNode();
+ MDNode* node = DebugFactory->CreateSubprogram(DIDescriptor(), "", "",
+ "", DICompileUnit(), 0,
+ DIType(), false,
+ false).getNode();
DbgInfos.insert(std::make_pair(node, meth));
getMethodInfo(meth)->setDbgSubprogram(node);
}
Modified: vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp?rev=96195&r1=96194&r2=96195&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp (original)
+++ vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp Sun Feb 14 16:17:58 2010
@@ -2578,7 +2578,7 @@
MDNode* JavaJIT::CreateLocation() {
uint32_t first = currentLineNumber | (currentBytecodeIndex << 16);
uint32_t second = currentCtpIndex | (callNumber << 16);
- DILocation Location = intrinsics->DebugFactory->CreateLocation(
+ DILocation Location = TheCompiler->getDebugFactory()->CreateLocation(
first, second, DIScope(DbgSubprogram));
callNumber++;
return Location.getNode();
Modified: vmkit/trunk/lib/Mvm/Compiler/JIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Compiler/JIT.cpp?rev=96195&r1=96194&r2=96195&view=diff
==============================================================================
--- vmkit/trunk/lib/Mvm/Compiler/JIT.cpp (original)
+++ vmkit/trunk/lib/Mvm/Compiler/JIT.cpp Sun Feb 14 16:17:58 2010
@@ -313,7 +313,6 @@
module->setDataLayout(globalModule->getDataLayout());
module->setTargetTriple(globalModule->getTargetTriple());
LLVMContext& Context = module->getContext();
- DebugFactory = new DIFactory(*module);
// Constant declaration
constantLongMinusOne = ConstantInt::get(Type::getInt64Ty(Context), (uint64_t)-1);
More information about the vmkit-commits
mailing list