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_MUID_REPLACEMENT_H 17 #define MPL2MPL_INCLUDE_MUID_REPLACEMENT_H 18 #include "phase_impl.h" 19 #include "version.h" 20 #include "maple_phase_manager.h" 21 22 namespace maple { 23 // For func def table. 24 constexpr uint32 kFuncDefAddrIndex = 0; 25 // For data def table. 26 constexpr uint32 kDataDefAddrIndex = 0; 27 // For func def info. table. 28 constexpr uint32 kFuncDefSizeIndex = 0; 29 constexpr uint32 kFuncDefNameIndex = 1; 30 constexpr uint32 kRangeBeginIndex = 0; 31 constexpr int32_t kDecoupleAndLazy = 3; 32 constexpr uint32_t kShiftBit16 = 16; 33 constexpr uint32_t kShiftBit15 = 15; 34 35 enum RangeIdx { 36 // 0,1 entry is reserved for a stamp 37 kVtabAndItab = 2, 38 kItabConflict = 3, 39 kVtabOffset = 4, 40 kFieldOffset = 5, 41 kValueOffset = 6, 42 kLocalClassInfo = 7, 43 kConststr = 8, 44 kSuperclass = 9, 45 kGlobalRootlist = 10, 46 kClassmetaData = 11, 47 kClassBucket = 12, 48 kOldMaxNum = 16, // Old num 49 kDataSection = 17, 50 kDecoupleStaticKey = 18, 51 kDecoupleStaticValue = 19, 52 kBssStart = 20, 53 kLinkerSoHash = 21, 54 kArrayClassCache = 22, 55 kArrayClassCacheName = 23, 56 kNewMaxNum = 24 // New num 57 }; 58 59 struct SourceFileMethod { 60 uint32 sourceFileIndex; 61 uint32 sourceClassIndex; 62 uint32 sourceMethodIndex; 63 bool isVirtual; 64 }; 65 66 struct SourceFileField { 67 uint32 sourceFileIndex; 68 uint32 sourceClassIndex; 69 uint32 sourceFieldIndex; 70 }; 71 72 } // namespace maple 73 #endif // MPL2MPL_INCLUDE_MUID_REPLACEMENT_H 74