src/share/vm/shark/sharkContext.cpp
Print this page
rev 3810 : [mq]: shark.patch
@@ -27,10 +27,11 @@
#include "oops/arrayOop.hpp"
#include "oops/oop.hpp"
#include "shark/llvmHeaders.hpp"
#include "shark/sharkContext.hpp"
#include "utilities/globalDefinitions.hpp"
+#include "memory/allocation.hpp"
using namespace llvm;
SharkContext::SharkContext(const char* name)
: LLVMContext(),
@@ -50,20 +51,23 @@
// Create compound types
_itableOffsetEntry_type = PointerType::getUnqual(
ArrayType::get(jbyte_type(), itableOffsetEntry::size() * wordSize));
+ _Metadata_type = PointerType::getUnqual(
+ ArrayType::get(jbyte_type(), sizeof(Metadata)));
+
_klass_type = PointerType::getUnqual(
ArrayType::get(jbyte_type(), sizeof(Klass)));
_jniEnv_type = PointerType::getUnqual(
ArrayType::get(jbyte_type(), sizeof(JNIEnv)));
_jniHandleBlock_type = PointerType::getUnqual(
ArrayType::get(jbyte_type(), sizeof(JNIHandleBlock)));
- _Method*_type = PointerType::getUnqual(
+ _Method_type = PointerType::getUnqual(
ArrayType::get(jbyte_type(), sizeof(Method)));
_monitor_type = ArrayType::get(
jbyte_type(), frame::interpreter_frame_monitor_size() * wordSize);
@@ -74,18 +78,18 @@
ArrayType::get(jbyte_type(), sizeof(JavaThread)));
_zeroStack_type = PointerType::getUnqual(
ArrayType::get(jbyte_type(), sizeof(ZeroStack)));
- std::vector<const Type*> params;
- params.push_back(Method*_type());
+ std::vector<Type*> params;
+ params.push_back(Method_type());
params.push_back(intptr_type());
params.push_back(thread_type());
_entry_point_type = FunctionType::get(jint_type(), params, false);
params.clear();
- params.push_back(Method*_type());
+ params.push_back(Method_type());
params.push_back(PointerType::getUnqual(jbyte_type()));
params.push_back(intptr_type());
params.push_back(thread_type());
_osr_entry_point_type = FunctionType::get(jint_type(), params, false);
@@ -148,11 +152,11 @@
_to_arrayType[i] = NULL;
}
}
}
-class SharkFreeQueueItem : public CHeapObj {
+class SharkFreeQueueItem : public CHeapObj<mtNone> {
public:
SharkFreeQueueItem(llvm::Function* function, SharkFreeQueueItem *next)
: _function(function), _next(next) {}
private: