Logan Chien | f04364f | 2012-02-10 12:01:39 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2012 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #ifndef ART_SRC_COMPILER_LLVM_UPCALL_COMPILER_H_ |
| 18 | #define ART_SRC_COMPILER_LLVM_UPCALL_COMPILER_H_ |
| 19 | |
Logan Chien | f04364f | 2012-02-10 12:01:39 +0800 | [diff] [blame] | 20 | #include <stdint.h> |
| 21 | |
| 22 | namespace art { |
| 23 | class CompiledInvokeStub; |
| 24 | class Compiler; |
| 25 | } |
| 26 | |
| 27 | namespace llvm { |
| 28 | class LLVMContext; |
| 29 | class Module; |
| 30 | } |
| 31 | |
| 32 | namespace art { |
| 33 | namespace compiler_llvm { |
| 34 | |
Logan Chien | 8b977d3 | 2012-02-21 19:14:55 +0800 | [diff] [blame] | 35 | class CompilationUnit; |
Logan Chien | f04364f | 2012-02-10 12:01:39 +0800 | [diff] [blame] | 36 | class CompilerLLVM; |
| 37 | class IRBuilder; |
| 38 | |
| 39 | class UpcallCompiler { |
| 40 | public: |
Logan Chien | 8b977d3 | 2012-02-21 19:14:55 +0800 | [diff] [blame] | 41 | UpcallCompiler(CompilationUnit* cunit, Compiler& compiler); |
Logan Chien | f04364f | 2012-02-10 12:01:39 +0800 | [diff] [blame] | 42 | |
| 43 | CompiledInvokeStub* CreateStub(bool is_static, char const* shorty); |
| 44 | |
| 45 | private: |
Logan Chien | 8b977d3 | 2012-02-21 19:14:55 +0800 | [diff] [blame] | 46 | CompilationUnit* cunit_; |
Logan Chien | f04364f | 2012-02-10 12:01:39 +0800 | [diff] [blame] | 47 | Compiler const* compiler_; |
Logan Chien | f04364f | 2012-02-10 12:01:39 +0800 | [diff] [blame] | 48 | llvm::Module* module_; |
| 49 | llvm::LLVMContext* context_; |
| 50 | IRBuilder& irb_; |
| 51 | }; |
| 52 | |
| 53 | |
| 54 | } // namespace compiler_llvm |
| 55 | } // namespace art |
| 56 | |
| 57 | |
| 58 | #endif // ART_SRC_COMPILER_LLVM_UPCALL_COMPILER_H_ |