• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * Copyright (c) 2021-2024 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 PANDA_RUNTIME_BRIDGE_BRIDGE_H_
17 #define PANDA_RUNTIME_BRIDGE_BRIDGE_H_
18 
19 #include <cstdint>
20 #include "libpandabase/macros.h"
21 
22 namespace ark {
23 
24 class Method;
25 class Frame;
26 class ManagedThread;
27 
28 extern "C" void InterpreterToCompiledCodeBridge(const uint8_t *, const Frame *, const Method *, ManagedThread *);
29 extern "C" void InterpreterToCompiledCodeBridgeDyn(const uint8_t *, const Frame *, const Method *, ManagedThread *);
30 extern "C" uint64_t InvokeCompiledCodeWithArgArray(const int64_t *, const Frame *, const Method *, ManagedThread *);
31 extern "C" uint64_t InvokeCompiledCodeWithArgArrayDyn(const uint64_t *, uint32_t, const Frame *, const Method *,
32                                                       ManagedThread *);
33 
34 extern "C" int64_t InvokeInterpreter(ManagedThread *thread, const uint8_t *pc, Frame *frame, Frame *lastFrame);
35 
36 extern "C" void CompiledCodeToInterpreterBridge();
37 extern "C" void CompiledCodeToInterpreterBridgeDyn();
38 extern "C" void AbstractMethodStub();
39 extern "C" void DefaultConflictMethodStub();
40 
41 PANDA_PUBLIC_API const void *GetCompiledCodeToInterpreterBridge(const Method *method);
42 
43 PANDA_PUBLIC_API const void *GetCompiledCodeToInterpreterBridge();
44 
45 PANDA_PUBLIC_API const void *GetCompiledCodeToInterpreterBridgeDyn();
46 
47 PANDA_PUBLIC_API const void *GetAbstractMethodStub();
48 
49 PANDA_PUBLIC_API const void *GetDefaultConflictMethodStub();
50 }  // namespace ark
51 
52 #endif  // PANDA_RUNTIME_BRIDGE_BRIDGE_H_
53