• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef COMPILER_COMPILE_METHOD_H_
17 #define COMPILER_COMPILE_METHOD_H_
18 
19 #include "compiler_options.h"
20 #include "mem/arena_allocator.h"
21 #include "mem/code_allocator.h"
22 #include "include/method.h"
23 #include "utils/arch.h"
24 
25 namespace panda::compiler {
26 class Graph;
27 class RuntimeInterface;
28 
29 bool JITCompileMethod(RuntimeInterface *runtime, Method *method, bool is_osr, CodeAllocator *code_allocator,
30                       ArenaAllocator *allocator, ArenaAllocator *local_allocator,
31                       ArenaAllocator *gdb_debug_info_allocator);
32 bool CompileInGraph(RuntimeInterface *runtime, Method *method, bool is_osr, ArenaAllocator *allocator,
33                     ArenaAllocator *local_allocator, bool is_dynamic, Arch *arch, const std::string &method_name,
34                     Graph **graph);
35 bool CheckMethodInLists(const std::string &method_name);
36 }  // namespace panda::compiler
37 
38 #endif  // COMPILER_COMPILE_METHOD_H_
39