[vmkit-commits] [vmkit] r56155 - in /vmkit/branches/isolate/lib/JnJVM: LLVMRuntime/runtime-default.ll LLVMRuntime/runtime-isolate.ll VMCore/JnjvmModule.cpp VMCore/JnjvmModule.h

Nicolas Geoffray nicolas.geoffray at lip6.fr
Fri Sep 12 07:24:14 PDT 2008


Author: geoffray
Date: Fri Sep 12 09:24:14 2008
New Revision: 56155

URL: http://llvm.org/viewvc/llvm-project?rev=56155&view=rev
Log:
Add new runtime functions for an isolate environment, and 
add the static instance in the type of java classes.


Modified:
    vmkit/branches/isolate/lib/JnJVM/LLVMRuntime/runtime-default.ll
    vmkit/branches/isolate/lib/JnJVM/LLVMRuntime/runtime-isolate.ll
    vmkit/branches/isolate/lib/JnJVM/VMCore/JnjvmModule.cpp
    vmkit/branches/isolate/lib/JnJVM/VMCore/JnjvmModule.h

Modified: vmkit/branches/isolate/lib/JnJVM/LLVMRuntime/runtime-default.ll
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/isolate/lib/JnJVM/LLVMRuntime/runtime-default.ll?rev=56155&r1=56154&r2=56155&view=diff

==============================================================================
--- vmkit/branches/isolate/lib/JnJVM/LLVMRuntime/runtime-default.ll (original)
+++ vmkit/branches/isolate/lib/JnJVM/LLVMRuntime/runtime-default.ll Fri Sep 12 09:24:14 2008
@@ -19,7 +19,8 @@
 ;;; Field 5 - The depth of the class in its super hierarchy.
 ;;; Field 6 - The class state (resolved, initialized, ...)
 ;;; field 7 - The constant pool, only for multi vm environment.
-%JavaClass = type { %VT, i32, %VT ,%JavaClass**, i32, i32, %ConstantPool* }
+;;; field 8 - The static instance, only for multi vm environment.
+%JavaClass = type { %VT, i32, %VT ,%JavaClass**, i32, i32, %ConstantPool*, %JavaObject* }
 
 ;;; The root of all Java Objects: a VT, a class and a lock.
 %JavaObject = type { %VT, %JavaClass*, i32 }

Modified: vmkit/branches/isolate/lib/JnJVM/LLVMRuntime/runtime-isolate.ll
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/isolate/lib/JnJVM/LLVMRuntime/runtime-isolate.ll?rev=56155&r1=56154&r2=56155&view=diff

==============================================================================
--- vmkit/branches/isolate/lib/JnJVM/LLVMRuntime/runtime-isolate.ll (original)
+++ vmkit/branches/isolate/lib/JnJVM/LLVMRuntime/runtime-isolate.ll Fri Sep 12 09:24:14 2008
@@ -9,6 +9,10 @@
 ;;; constant pool.
 declare i8* @stringLookup(%JavaClass*, i32, ...)
 
+;;; staticCtpLookup - Find the user constant pool at the given offset in the
+;;; constant pool.
+declare i8* @staticCtpLookup(%JavaClass*, i32, ...)
+
 ;;; getCtpCacheNode - Get the constant pool cache of a cache node. This is a
 ;;; constant call because the cache node never changes.
 declare %ConstantPool* @getCtpCacheNode(%CacheNode*) readnone
@@ -24,3 +28,6 @@
 ;;; getJnjvmArrayClass - Get the array user class of the index, for the given
 ;;; isolate.
 declare %JavaClass* @getJnjvmArrayClass(%Jnjvm*, i32) readnone
+
+;;; getArrayClass - Get the array user class of the user class.
+declare %JavaClass* @getArrayClass(%JavaClass*) readnone

Modified: vmkit/branches/isolate/lib/JnJVM/VMCore/JnjvmModule.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/isolate/lib/JnJVM/VMCore/JnjvmModule.cpp?rev=56155&r1=56154&r2=56155&view=diff

==============================================================================
--- vmkit/branches/isolate/lib/JnJVM/VMCore/JnjvmModule.cpp (original)
+++ vmkit/branches/isolate/lib/JnJVM/VMCore/JnjvmModule.cpp Fri Sep 12 09:24:14 2008
@@ -116,6 +116,8 @@
 llvm::Function* JnjvmModule::EnveloppeLookupFunction = 0;
 llvm::Function* JnjvmModule::GetJnjvmExceptionClassFunction = 0;
 llvm::Function* JnjvmModule::GetJnjvmArrayClassFunction = 0;
+llvm::Function* JnjvmModule::StaticCtpLookupFunction = 0;
+llvm::Function* JnjvmModule::GetArrayClassFunction = 0;
 #endif
 llvm::Function* JnjvmModule::GetClassDelegateeFunction = 0;
 llvm::Function* JnjvmModule::ArrayLengthFunction = 0;
@@ -1025,6 +1027,8 @@
   GetJnjvmExceptionClassFunction = 
     module->getFunction("getJnjvmExceptionClass");
   GetJnjvmArrayClassFunction = module->getFunction("getJnjvmArrayClass");
+  StaticCtpLookupFunction = module->getFunction("staticCtpLookup");
+  GetArrayClassFunction = module->getFunction("getArrayClass");
 #endif
   
 #ifdef SERVICE_VM

Modified: vmkit/branches/isolate/lib/JnJVM/VMCore/JnjvmModule.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/isolate/lib/JnJVM/VMCore/JnjvmModule.h?rev=56155&r1=56154&r2=56155&view=diff

==============================================================================
--- vmkit/branches/isolate/lib/JnJVM/VMCore/JnjvmModule.h (original)
+++ vmkit/branches/isolate/lib/JnJVM/VMCore/JnjvmModule.h Fri Sep 12 09:24:14 2008
@@ -352,6 +352,8 @@
   static llvm::Function* EnveloppeLookupFunction;
   static llvm::Function* GetJnjvmExceptionClassFunction;
   static llvm::Function* GetJnjvmArrayClassFunction;
+  static llvm::Function* StaticCtpLookupFunction;
+  static llvm::Function* GetArrayClassFunction;
 #endif
 
   static llvm::Function* GetClassDelegateeFunction;





More information about the vmkit-commits mailing list