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 | |
TDYa127 | eead4ac | 2012-06-03 07:15:25 -0700 | [diff] [blame] | 17 | #ifndef ART_SRC_COMPILER_LLVM_STUB_COMPILER_H_ |
| 18 | #define ART_SRC_COMPILER_LLVM_STUB_COMPILER_H_ |
Logan Chien | f04364f | 2012-02-10 12:01:39 +0800 | [diff] [blame] | 19 | |
Logan Chien | f04364f | 2012-02-10 12:01:39 +0800 | [diff] [blame] | 20 | #include <stdint.h> |
| 21 | |
| 22 | namespace art { |
| 23 | class CompiledInvokeStub; |
TDYa127 | eead4ac | 2012-06-03 07:15:25 -0700 | [diff] [blame] | 24 | class CompiledProxyStub; |
Ian Rogers | 1212a02 | 2013-03-04 10:48:41 -0800 | [diff] [blame^] | 25 | class CompilerDriver; |
Logan Chien | f04364f | 2012-02-10 12:01:39 +0800 | [diff] [blame] | 26 | } |
| 27 | |
| 28 | namespace llvm { |
| 29 | class LLVMContext; |
| 30 | class Module; |
| 31 | } |
| 32 | |
| 33 | namespace art { |
| 34 | namespace compiler_llvm { |
| 35 | |
Brian Carlstrom | 641ce03 | 2013-01-31 15:21:37 -0800 | [diff] [blame] | 36 | class LlvmCompilationUnit; |
Logan Chien | f04364f | 2012-02-10 12:01:39 +0800 | [diff] [blame] | 37 | class CompilerLLVM; |
| 38 | class IRBuilder; |
| 39 | |
TDYa127 | eead4ac | 2012-06-03 07:15:25 -0700 | [diff] [blame] | 40 | class StubCompiler { |
Logan Chien | f04364f | 2012-02-10 12:01:39 +0800 | [diff] [blame] | 41 | public: |
Ian Rogers | 1212a02 | 2013-03-04 10:48:41 -0800 | [diff] [blame^] | 42 | StubCompiler(LlvmCompilationUnit* cunit, const CompilerDriver& compiler); |
Logan Chien | f04364f | 2012-02-10 12:01:39 +0800 | [diff] [blame] | 43 | |
Logan Chien | 1258417 | 2012-07-10 04:07:28 -0700 | [diff] [blame] | 44 | CompiledInvokeStub* CreateInvokeStub(bool is_static, const char* shorty); |
| 45 | CompiledInvokeStub* CreateProxyStub(const char* shorty); |
Logan Chien | f04364f | 2012-02-10 12:01:39 +0800 | [diff] [blame] | 46 | |
| 47 | private: |
Brian Carlstrom | 641ce03 | 2013-01-31 15:21:37 -0800 | [diff] [blame] | 48 | LlvmCompilationUnit* cunit_; |
Ian Rogers | 1212a02 | 2013-03-04 10:48:41 -0800 | [diff] [blame^] | 49 | const CompilerDriver* const driver_; |
Logan Chien | f04364f | 2012-02-10 12:01:39 +0800 | [diff] [blame] | 50 | llvm::Module* module_; |
| 51 | llvm::LLVMContext* context_; |
| 52 | IRBuilder& irb_; |
Logan Chien | f04364f | 2012-02-10 12:01:39 +0800 | [diff] [blame] | 53 | }; |
| 54 | |
| 55 | |
| 56 | } // namespace compiler_llvm |
| 57 | } // namespace art |
| 58 | |
| 59 | |
TDYa127 | eead4ac | 2012-06-03 07:15:25 -0700 | [diff] [blame] | 60 | #endif // ART_SRC_COMPILER_LLVM_STUB_COMPILER_H_ |