1 /* 2 * Copyright (c) 2023 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 MPL2MPL_INCLUDE_REFLECTION_ANALYSIS_H 17 #define MPL2MPL_INCLUDE_REFLECTION_ANALYSIS_H 18 #include "class_hierarchy_phase.h" 19 20 namespace maple { 21 // maple field index definition 22 enum class ClassRO : uint32 { 23 kClassName, 24 kIfields, 25 kMethods, 26 kSuperclass, 27 kNumOfFields, 28 kNumofMethods, 29 #ifndef USE_32BIT_REF 30 kFlag, 31 kNumOfSup, 32 kPadding, 33 #endif //! USE_32BIT_REF 34 kMod, 35 kAnnotation, 36 kClinitAddr 37 }; 38 39 enum StaticFieldName { 40 kClassName = 0, 41 kFieldName = 1, 42 kTypeName = 2, 43 }; 44 45 enum class ClassProperty : uint32 { 46 kShadow, 47 kMonitor, 48 kClassloader, 49 kObjsize, 50 #ifdef USE_32BIT_REF 51 FLAG, 52 NUMOFSUP, 53 #endif // USE_32BIT_REF 54 kItab, 55 kVtab, 56 kGctib, 57 kInfoRo, 58 #ifdef USE_32BIT_REF 59 kInstanceOfCacheFalse, 60 #endif 61 kClint 62 }; 63 64 enum class MethodProperty : uint32 { 65 kVtabIndex, 66 kDeclarclass, 67 kPaddrData, 68 kMod, 69 kMethodName, 70 kSigName, 71 kAnnotation, 72 kFlag, 73 kArgsize, 74 #ifndef USE_32BIT_REF 75 padding 76 #endif 77 }; 78 79 enum class MethodInfoCompact : uint32 { kVtabIndex, kPaddrData }; 80 81 enum class FieldProperty : uint32 { 82 kPOffset, 83 kMod, 84 kFlag, 85 kIndex, 86 kTypeName, 87 kName, 88 kAnnotation, 89 kDeclarclass, 90 kPClassType 91 }; 92 93 enum class FieldPropertyCompact : uint32 { kPOffset, kMod, kTypeName, kIndex, kName, kAnnotation }; 94 95 enum class MethodSignatureProperty : uint32 { kSignatureOffset, kParameterTypes }; 96 97 } // namespace maple 98 #endif // MPL2MPL_INCLUDE_REFLECTION_ANALYSIS_H 99