Add upcall compiler.
Upcall compiler compiles the invoke stub for native-to-managed
method invocation.
Change-Id: I09fb1e4b3f166e8da5de73e8f39509cd9be6c152
diff --git a/src/compiler_llvm/ir_builder.h b/src/compiler_llvm/ir_builder.h
index 617ed8d..b38c7b0 100644
--- a/src/compiler_llvm/ir_builder.h
+++ b/src/compiler_llvm/ir_builder.h
@@ -162,6 +162,18 @@
return jobject_type_;
}
+ llvm::PointerType* getJEnvTy() {
+ return jenv_type_;
+ }
+
+ llvm::Type* getJValueTy() {
+ // NOTE: JValue is an union type, which may contains boolean, byte, char,
+ // short, int, long, float, double, Object. However, LLVM itself does
+ // not support union type, so we have to return a type with biggest size,
+ // then bitcast it before we use it.
+ return getJLongTy();
+ }
+
//--------------------------------------------------------------------------
// Constant Value Helper Function
@@ -266,6 +278,8 @@
private:
llvm::PointerType* jobject_type_;
+ llvm::PointerType* jenv_type_;
+
llvm::Function* runtime_support_func_decls_[runtime_support::MAX_ID];
};