[vmkit-commits] [vmkit] r198239 - remove staticLLVMType
Gael Thomas
gael.thomas at lip6.fr
Mon Dec 30 11:37:07 PST 2013
Author: gthomas
Date: Mon Dec 30 13:37:07 2013
New Revision: 198239
URL: http://llvm.org/viewvc/llvm-project?rev=198239&view=rev
Log:
remove staticLLVMType
Modified:
vmkit/branches/mcjit/include/j3/j3class.h
vmkit/branches/mcjit/lib/j3/vm/j3class.cc
vmkit/branches/mcjit/lib/j3/vm/j3codegen.cc
Modified: vmkit/branches/mcjit/include/j3/j3class.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/mcjit/include/j3/j3class.h?rev=198239&r1=198238&r2=198239&view=diff
==============================================================================
--- vmkit/branches/mcjit/include/j3/j3class.h (original)
+++ vmkit/branches/mcjit/include/j3/j3class.h Mon Dec 30 13:37:07 2013
@@ -220,6 +220,8 @@ namespace j3 {
J3Class* cl() { return _cl; }
virtual bool isStaticLayout() { return 1; }
+
+ llvm::Type* llvmType();
};
class J3Class : public J3Layout {
@@ -283,7 +285,6 @@ namespace j3 {
J3Field* fieldAt(uint16_t idx, uint16_t access);
llvm::Type* llvmType();
- llvm::Type* staticLLVMType();
llvm::Type* virtualLLVMType();
llvm::GlobalValue* llvmDescriptor(llvm::Module* module);
Modified: vmkit/branches/mcjit/lib/j3/vm/j3class.cc
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/mcjit/lib/j3/vm/j3class.cc?rev=198239&r1=198238&r2=198239&view=diff
==============================================================================
--- vmkit/branches/mcjit/lib/j3/vm/j3class.cc (original)
+++ vmkit/branches/mcjit/lib/j3/vm/j3class.cc Mon Dec 30 13:37:07 2013
@@ -243,6 +243,10 @@ J3StaticLayout::J3StaticLayout(J3ClassLo
_cl = cl;
}
+llvm::Type* J3StaticLayout::llvmType() {
+ return loader()->vm()->typeJ3ObjectPtr;
+}
+
J3Layout::J3Layout(J3ClassLoader* loader, const vmkit::Name* name) : J3ObjectType(loader, name) {
}
@@ -584,8 +588,6 @@ void J3Class::readClassBytes(J3Field* hi
fillFields(pFields1, i1);
fillFields(pFields0, i0);
- staticLLVMType()->getContainedType(0);
-
//fprintf(stderr, "static part of %ls: ", name()->cStr());
//staticLayout.llvmType()->getContainedType(0)->dump();
//fprintf(stderr, "\n");
@@ -825,17 +827,6 @@ void J3Class::createLLVMTypes() {
doNativeName();
}
-llvm::Type* J3Class::staticLLVMType() {
- llvm::Type* res = staticLayout._llvmType;
-
- if(!res) {
- createLLVMTypes();
- res = staticLayout._llvmType;
- }
-
- return res;
-}
-
llvm::Type* J3Class::virtualLLVMType() {
llvm::Type* res = _llvmType;
Modified: vmkit/branches/mcjit/lib/j3/vm/j3codegen.cc
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/mcjit/lib/j3/vm/j3codegen.cc?rev=198239&r1=198238&r2=198239&view=diff
==============================================================================
--- vmkit/branches/mcjit/lib/j3/vm/j3codegen.cc (original)
+++ vmkit/branches/mcjit/lib/j3/vm/j3codegen.cc Mon Dec 30 13:37:07 2013
@@ -290,9 +290,8 @@ llvm::Value* J3CodeGen::handleToObject(l
llvm::Value* J3CodeGen::staticInstance(J3Class* cl) {
initialiseJ3Type(cl);
- return builder->CreateBitCast(handleToObject(builder->CreateCall(funcJ3ClassStaticInstance,
- cl->llvmDescriptor(module()))),
- cl->staticLLVMType());
+ return handleToObject(builder->CreateCall(funcJ3ClassStaticInstance,
+ cl->llvmDescriptor(module())));
}
llvm::Value* J3CodeGen::vt(llvm::Value* obj) {
More information about the vmkit-commits
mailing list