[vmkit-commits] [vmkit] r97335 - in /vmkit/trunk/lib/J3: Compiler/JavaAOTCompiler.cpp Compiler/LLVMInfo.cpp LLVMRuntime/runtime-default.ll LLVMRuntime/runtime-isolate.ll LLVMRuntime/runtime-single.ll VMCore/JavaClass.cpp VMCore/JavaClass.h VMCore/JavaTypes.cpp VMCore/JavaTypes.h VMCore/JnjvmClassLoader.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Sat Feb 27 10:18:51 PST 2010
Author: geoffray
Date: Sat Feb 27 12:18:51 2010
New Revision: 97335
URL: http://llvm.org/viewvc/llvm-project?rev=97335&view=rev
Log:
Remove unused JInfo field.
Modified:
vmkit/trunk/lib/J3/Compiler/JavaAOTCompiler.cpp
vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp
vmkit/trunk/lib/J3/LLVMRuntime/runtime-default.ll
vmkit/trunk/lib/J3/LLVMRuntime/runtime-isolate.ll
vmkit/trunk/lib/J3/LLVMRuntime/runtime-single.ll
vmkit/trunk/lib/J3/VMCore/JavaClass.cpp
vmkit/trunk/lib/J3/VMCore/JavaClass.h
vmkit/trunk/lib/J3/VMCore/JavaTypes.cpp
vmkit/trunk/lib/J3/VMCore/JavaTypes.h
vmkit/trunk/lib/J3/VMCore/JnjvmClassLoader.cpp
Modified: vmkit/trunk/lib/J3/Compiler/JavaAOTCompiler.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/JavaAOTCompiler.cpp?rev=97335&r1=97334&r2=97335&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/JavaAOTCompiler.cpp (original)
+++ vmkit/trunk/lib/J3/Compiler/JavaAOTCompiler.cpp Sat Feb 27 12:18:51 2010
@@ -893,9 +893,6 @@
// num
FieldElts.push_back(ConstantInt::get(Type::getInt16Ty(getLLVMContext()), field.num));
- //JInfo
- FieldElts.push_back(Constant::getNullValue(JavaIntrinsics.ptrType));
-
return ConstantStruct::get(STy, FieldElts);
}
@@ -968,9 +965,6 @@
// offset
MethodElts.push_back(ConstantInt::get(Type::getInt32Ty(getLLVMContext()), method.offset));
- // JInfo
- MethodElts.push_back(Constant::getNullValue(JavaIntrinsics.ptrType));
-
return ConstantStruct::get(STy, MethodElts);
}
@@ -1231,9 +1225,6 @@
// staticSize
ClassElts.push_back(ConstantInt::get(Type::getInt32Ty(getLLVMContext()), cl->staticSize));
- // JInfo
- ClassElts.push_back(Constant::getNullValue(JavaIntrinsics.ptrType));
-
return ConstantStruct::get(STy, ClassElts);
}
Modified: vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp?rev=97335&r1=97334&r2=97335&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp (original)
+++ vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp Sat Feb 27 12:18:51 2010
@@ -185,10 +185,8 @@
Compiler->functions.insert(std::make_pair(methodFunction, methodDef));
if (Compiler != JCL->getCompiler()) {
- if (mvm::MvmModule::executionEngine &&
- !mvm::MvmModule::executionEngine->isCompilingLazily()) {
- assert(methodDef->code && "getting a not compiled method from another "
- "module");
+ if (mvm::MvmModule::executionEngine && methodDef->code) {
+ methodFunction->setLinkage(GlobalValue::ExternalLinkage);
mvm::MvmModule::executionEngine->updateGlobalMapping(methodFunction,
methodDef->code);
}
Modified: vmkit/trunk/lib/J3/LLVMRuntime/runtime-default.ll
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/LLVMRuntime/runtime-default.ll?rev=97335&r1=97334&r2=97335&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/LLVMRuntime/runtime-default.ll (original)
+++ vmkit/trunk/lib/J3/LLVMRuntime/runtime-default.ll Sat Feb 27 12:18:51 2010
@@ -36,12 +36,12 @@
%JavaField = type { i8*, i16, %UTF8*, %UTF8*, %Attribut*, i16, %JavaClass*, i32,
- i16, i8* }
+ i16 }
%CodeLineInfo = type { i8*, i16, i16, %JavaMethod*, %CodeLineInfo* }
%JavaMethod = type { i8*, i16, %Attribut*, i16, %JavaClass*,
- %UTF8*, %UTF8*, i8, i8*, %CodeLineInfo*, i16, i32, i8* }
+ %UTF8*, %UTF8*, i8, i8*, %CodeLineInfo*, i16, i32 }
%JavaClassPrimitive = type { %JavaCommonClass, i32 }
%JavaClassArray = type { %JavaCommonClass, %JavaCommonClass* }
Modified: vmkit/trunk/lib/J3/LLVMRuntime/runtime-isolate.ll
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/LLVMRuntime/runtime-isolate.ll?rev=97335&r1=97334&r2=97335&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/LLVMRuntime/runtime-isolate.ll (original)
+++ vmkit/trunk/lib/J3/LLVMRuntime/runtime-isolate.ll Sat Feb 27 12:18:51 2010
@@ -12,8 +12,7 @@
%JavaClass = type { %JavaCommonClass, i32, i32, [32 x %TaskClassMirror], i8*,
%JavaField*, i16, %JavaField*, i16, %JavaMethod*, i16,
%JavaMethod*, i16, i8*, %ArrayUInt8*, i8*, %Attribut*,
- i16, %JavaClass**, i16, %JavaClass*, i16, i8, i8, i32, i32,
- i8* }
+ i16, %JavaClass**, i16, %JavaClass*, i16, i8, i8, i32, i32 }
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;; Isolate specific methods ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Modified: vmkit/trunk/lib/J3/LLVMRuntime/runtime-single.ll
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/LLVMRuntime/runtime-single.ll?rev=97335&r1=97334&r2=97335&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/LLVMRuntime/runtime-single.ll (original)
+++ vmkit/trunk/lib/J3/LLVMRuntime/runtime-single.ll Sat Feb 27 12:18:51 2010
@@ -9,5 +9,4 @@
%JavaClass = type { %JavaCommonClass, i32, i32, [1 x %TaskClassMirror], i8*,
%JavaField*, i16, %JavaField*, i16, %JavaMethod*, i16,
%JavaMethod*, i16, i8*, %ArrayUInt8*, i8*, %Attribut*,
- i16, %JavaClass**, i16, %JavaClass*, i16, i8, i8, i32, i32,
- i8*}
+ i16, %JavaClass**, i16, %JavaClass*, i16, i8, i8, i32, i32 }
Modified: vmkit/trunk/lib/J3/VMCore/JavaClass.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/JavaClass.cpp?rev=97335&r1=97334&r2=97335&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/VMCore/JavaClass.cpp (original)
+++ vmkit/trunk/lib/J3/VMCore/JavaClass.cpp Sat Feb 27 12:18:51 2010
@@ -223,7 +223,6 @@
bytes = B;
super = 0;
ctpInfo = 0;
- JInfo = 0;
outerClass = 0;
innerOuterResolved = false;
nbInnerClasses = 0;
@@ -651,7 +650,6 @@
access = A;
canBeInlined = false;
offset = 0;
- JInfo = 0;
}
void JavaField::initialise(Class* cl, const UTF8* N, const UTF8* T, uint16 A) {
@@ -661,7 +659,6 @@
_signature = 0;
ptrOffset = 0;
access = A;
- JInfo = 0;
}
void Class::readParents(Reader& reader) {
Modified: vmkit/trunk/lib/J3/VMCore/JavaClass.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/JavaClass.h?rev=97335&r1=97334&r2=97335&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/VMCore/JavaClass.h (original)
+++ vmkit/trunk/lib/J3/VMCore/JavaClass.h Sat Feb 27 12:18:51 2010
@@ -569,10 +569,6 @@
///
uint32 staticSize;
- /// JInfo - JIT specific information.
- ///
- mvm::JITInfo* JInfo;
-
/// getVirtualSize - Get the virtual size of instances of this class.
///
uint32 getVirtualSize() const { return virtualSize; }
@@ -737,22 +733,6 @@
///
void resolveInnerOuterClasses();
- /// getInfo - Get the JIT specific information, allocating one if it
- /// does not exist.
- ///
- template<typename Ty>
- Ty *getInfo() {
- if (!JInfo) {
- JInfo = new(classLoader->allocator, "Class JIT info") Ty(this);
- }
-
- return static_cast<Ty*>(JInfo);
- }
-
- void clearInfo() {
- if (JInfo) JInfo->clear();
- }
-
/// resolveClass - If the class has not been resolved yet, resolve it.
///
void resolveClass();
@@ -1270,20 +1250,6 @@
JavaObject* invokeJavaObjectStatic(Jnjvm* vm, UserClass*, ...)
__attribute__ ((noinline));
- mvm::JITInfo* JInfo;
- template<typename Ty>
- Ty *getInfo() {
- if (!JInfo) {
- JInfo = new(classDef->classLoader->allocator, "Method JIT info") Ty(this);
- }
-
- return static_cast<Ty*>(JInfo);
- }
-
- void clearInfo() {
- if (JInfo) JInfo->clear();
- }
-
#define JNI_NAME_PRE "Java_"
#define JNI_NAME_PRE_LEN 5
@@ -1401,21 +1367,6 @@
MK_ASSESSORS(uint32, Int32);
MK_ASSESSORS(sint64, Long);
- mvm::JITInfo* JInfo;
- template<typename Ty>
- Ty *getInfo() {
- if (!JInfo) {
- JInfo = new(classDef->classLoader->allocator, "Field JIT info") Ty(this);
- }
-
- return static_cast<Ty*>(JInfo);
- }
-
- void clearInfo() {
- if (JInfo) JInfo->clear();
- }
-
-
bool isReference() {
uint16 val = type->elements[0];
return (val == '[' || val == 'L');
Modified: vmkit/trunk/lib/J3/VMCore/JavaTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/JavaTypes.cpp?rev=97335&r1=97334&r2=97335&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/VMCore/JavaTypes.cpp (original)
+++ vmkit/trunk/lib/J3/VMCore/JavaTypes.cpp Sat Feb 27 12:18:51 2010
@@ -41,7 +41,6 @@
}
initialLoader = loader;
keyName = name;
- JInfo = 0;
_virtualCallBuf = 0;
_staticCallBuf = 0;
_virtualCallAP = 0;
Modified: vmkit/trunk/lib/J3/VMCore/JavaTypes.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/JavaTypes.h?rev=97335&r1=97334&r2=97335&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/VMCore/JavaTypes.h (original)
+++ vmkit/trunk/lib/J3/VMCore/JavaTypes.h Sat Feb 27 12:18:51 2010
@@ -405,21 +405,6 @@
//
//===----------------------------------------------------------------------===//
- /// JInfo - Holds info useful for the JIT.
- ///
- mvm::JITInfo* JInfo;
-
- /// getInfo - Get the JIT info of this signature. The info is created lazely.
- ///
- template<typename Ty>
- Ty *getInfo() {
- if (!JInfo) {
- JInfo = new(initialLoader->allocator, "Sign info") Ty(this);
- }
-
- return static_cast<Ty*>(JInfo);
- }
-
/// nbArguments - The number of arguments in the signature.
///
uint32 nbArguments;
Modified: vmkit/trunk/lib/J3/VMCore/JnjvmClassLoader.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/JnjvmClassLoader.cpp?rev=97335&r1=97334&r2=97335&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/VMCore/JnjvmClassLoader.cpp (original)
+++ vmkit/trunk/lib/J3/VMCore/JnjvmClassLoader.cpp Sat Feb 27 12:18:51 2010
@@ -308,34 +308,8 @@
}
void JnjvmClassLoader::setCompiler(JavaCompiler* Comp) {
-
// Set the new compiler.
TheCompiler = Comp;
-
- // Clean up JITInfo of all classes.
- for (ClassMap::iterator i = classes->map.begin(), e = classes->map.end();
- i!= e; ++i) {
- CommonClass* ccl = i->second;
- if (ccl->isClass()) {
- Class* cl = ccl->asClass();
- cl->clearInfo();
-
- for (uint32 i = 0; i < cl->nbVirtualMethods; ++i) {
- cl->virtualMethods[i].clearInfo();
- }
-
- for (uint32 i = 0; i < cl->nbStaticMethods; ++i) {
- cl->staticMethods[i].clearInfo();
- }
-
- for (uint32 i = 0; i < cl->nbVirtualFields; ++i) {
- cl->virtualFields[i].clearInfo();
- }
- for (uint32 i = 0; i < cl->nbStaticFields; ++i) {
- cl->staticFields[i].clearInfo();
- }
- }
- }
}
ArrayUInt8* JnjvmBootstrapLoader::openName(const UTF8* utf8) {
More information about the vmkit-commits
mailing list