• 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 PANDA_PLUGINS_ETS_RUNTIME_ETS_ITABLE_BUILDER_H
17 #define PANDA_PLUGINS_ETS_RUNTIME_ETS_ITABLE_BUILDER_H
18 
19 #include "libpandabase/utils/span.h"
20 #include "runtime/include/class.h"
21 #include "runtime/include/itable_builder.h"
22 #include "runtime/include/itable.h"
23 
24 namespace panda {
25 
26 class ClassLinker;
27 
28 }  // namespace panda
29 
30 namespace panda::ets {
31 
32 class EtsITableBuilder : public ITableBuilder {
33 public:
34     void Build(ClassLinker *classLinker, Class *base, Span<Class *> classInterfaces, bool isInterface) override;
35 
36     void Resolve(Class *klass) override;
37 
38     void UpdateClass(Class *klass) override;
39 
40     void DumpITable([[maybe_unused]] Class *klass) override;
41 
GetITable()42     ITable GetITable() const override
43     {
44         return itable_;
45     };
46 
47 private:
48     ITable itable_;
49 };
50 
51 }  // namespace panda::ets
52 
53 #endif  // !PANDA_PLUGINS_ETS_RUNTIME_ETS_ITABLE_BUILDER_H
54