diff options
| author | 2012-02-10 12:01:39 +0800 | |
|---|---|---|
| committer | 2012-02-19 02:50:04 -0800 | |
| commit | f04364f0ff789935d05490ee684f01c3de431780 (patch) | |
| tree | a47070af79126f5aa315480280b7b44ba7205ef1 /src/compiler_llvm/ir_builder.h | |
| parent | 7caf37e2aebdb9e6f10f691a8148dd3d3405f157 (diff) | |
Add upcall compiler.
Upcall compiler compiles the invoke stub for native-to-managed
method invocation.
Change-Id: I09fb1e4b3f166e8da5de73e8f39509cd9be6c152
Diffstat (limited to 'src/compiler_llvm/ir_builder.h')
| -rw-r--r-- | src/compiler_llvm/ir_builder.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/compiler_llvm/ir_builder.h b/src/compiler_llvm/ir_builder.h index 617ed8de86..b38c7b0099 100644 --- a/src/compiler_llvm/ir_builder.h +++ b/src/compiler_llvm/ir_builder.h @@ -162,6 +162,18 @@ class IRBuilder : public LLVMIRBuilder { 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 @@ class IRBuilder : public LLVMIRBuilder { private: llvm::PointerType* jobject_type_; + llvm::PointerType* jenv_type_; + llvm::Function* runtime_support_func_decls_[runtime_support::MAX_ID]; }; |