Lines Matching refs:wasm
42 << ", Kind=" << toString(wasm::WasmSymbolType(Info.Kind)) << ", Flags=0x" in print()
45 case wasm::WASM_SYMBOL_BINDING_GLOBAL: Out << "global"; break; in print()
46 case wasm::WASM_SYMBOL_BINDING_LOCAL: Out << "local"; break; in print()
47 case wasm::WASM_SYMBOL_BINDING_WEAK: Out << "weak"; break; in print()
178 static wasm::ValType parseValType(WasmObjectFile::ReadContext &Ctx, in parseValType()
183 case wasm::WASM_TYPE_I32: in parseValType()
184 case wasm::WASM_TYPE_I64: in parseValType()
185 case wasm::WASM_TYPE_F32: in parseValType()
186 case wasm::WASM_TYPE_F64: in parseValType()
187 case wasm::WASM_TYPE_V128: in parseValType()
188 case wasm::WASM_TYPE_FUNCREF: in parseValType()
189 case wasm::WASM_TYPE_EXTERNREF: in parseValType()
190 case wasm::WASM_TYPE_EXNREF: in parseValType()
191 return wasm::ValType(Code); in parseValType()
193 if (Code == wasm::WASM_TYPE_NULLABLE || Code == wasm::WASM_TYPE_NONNULLABLE) { in parseValType()
196 return wasm::ValType(wasm::ValType::OTHERREF); in parseValType()
199 static Error readInitExpr(wasm::WasmInitExpr &Expr, in readInitExpr()
206 case wasm::WASM_OPCODE_I32_CONST: in readInitExpr()
209 case wasm::WASM_OPCODE_I64_CONST: in readInitExpr()
212 case wasm::WASM_OPCODE_F32_CONST: in readInitExpr()
215 case wasm::WASM_OPCODE_F64_CONST: in readInitExpr()
218 case wasm::WASM_OPCODE_GLOBAL_GET: in readInitExpr()
221 case wasm::WASM_OPCODE_REF_NULL: { in readInitExpr()
231 if (EndOpcode != wasm::WASM_OPCODE_END) in readInitExpr()
240 case wasm::WASM_OPCODE_I32_CONST: in readInitExpr()
241 case wasm::WASM_OPCODE_GLOBAL_GET: in readInitExpr()
242 case wasm::WASM_OPCODE_REF_NULL: in readInitExpr()
243 case wasm::WASM_OPCODE_REF_FUNC: in readInitExpr()
244 case wasm::WASM_OPCODE_I64_CONST: in readInitExpr()
247 case wasm::WASM_OPCODE_F32_CONST: in readInitExpr()
250 case wasm::WASM_OPCODE_F64_CONST: in readInitExpr()
253 case wasm::WASM_OPCODE_I32_ADD: in readInitExpr()
254 case wasm::WASM_OPCODE_I32_SUB: in readInitExpr()
255 case wasm::WASM_OPCODE_I32_MUL: in readInitExpr()
256 case wasm::WASM_OPCODE_I64_ADD: in readInitExpr()
257 case wasm::WASM_OPCODE_I64_SUB: in readInitExpr()
258 case wasm::WASM_OPCODE_I64_MUL: in readInitExpr()
260 case wasm::WASM_OPCODE_GC_PREFIX: in readInitExpr()
265 case wasm::WASM_OPCODE_STRUCT_NEW: in readInitExpr()
266 case wasm::WASM_OPCODE_STRUCT_NEW_DEFAULT: in readInitExpr()
267 case wasm::WASM_OPCODE_ARRAY_NEW: in readInitExpr()
268 case wasm::WASM_OPCODE_ARRAY_NEW_DEFAULT: in readInitExpr()
271 case wasm::WASM_OPCODE_ARRAY_NEW_FIXED: in readInitExpr()
275 case wasm::WASM_OPCODE_REF_I31: in readInitExpr()
277 case wasm::WASM_OPCODE_END: in readInitExpr()
291 static wasm::WasmLimits readLimits(WasmObjectFile::ReadContext &Ctx) { in readLimits()
292 wasm::WasmLimits Result; in readLimits()
295 if (Result.Flags & wasm::WASM_LIMITS_FLAG_HAS_MAX) in readLimits()
300 static wasm::WasmTableType readTableType(WasmObjectFile::ReadContext &Ctx) { in readTableType()
301 wasm::WasmTableType TableType; in readTableType()
324 if (Section.Type == wasm::WASM_SEC_CUSTOM) { in readSection()
370 if (Header.Version != wasm::WasmVersion) { in WasmObjectFile()
395 case wasm::WASM_SEC_CUSTOM: in parseSection()
397 case wasm::WASM_SEC_TYPE: in parseSection()
399 case wasm::WASM_SEC_IMPORT: in parseSection()
401 case wasm::WASM_SEC_FUNCTION: in parseSection()
403 case wasm::WASM_SEC_TABLE: in parseSection()
405 case wasm::WASM_SEC_MEMORY: in parseSection()
407 case wasm::WASM_SEC_TAG: in parseSection()
409 case wasm::WASM_SEC_GLOBAL: in parseSection()
411 case wasm::WASM_SEC_EXPORT: in parseSection()
413 case wasm::WASM_SEC_START: in parseSection()
415 case wasm::WASM_SEC_ELEM: in parseSection()
417 case wasm::WASM_SEC_CODE: in parseSection()
419 case wasm::WASM_SEC_DATA: in parseSection()
421 case wasm::WASM_SEC_DATACOUNT: in parseSection()
463 case wasm::WASM_DYLINK_MEM_INFO: in parseDylink0Section()
469 case wasm::WASM_DYLINK_NEEDED: in parseDylink0Section()
475 case wasm::WASM_DYLINK_EXPORT_INFO: { in parseDylink0Section()
482 case wasm::WASM_DYLINK_IMPORT_INFO: { in parseDylink0Section()
527 case wasm::WASM_NAMES_FUNCTION: in parseNameSection()
528 case wasm::WASM_NAMES_GLOBAL: in parseNameSection()
529 case wasm::WASM_NAMES_DATA_SEGMENT: { in parseNameSection()
534 wasm::NameType nameType = wasm::NameType::FUNCTION; in parseNameSection()
535 wasm::WasmSymbolInfo Info{Name, in parseNameSection()
536 /*Kind */ wasm::WASM_SYMBOL_TYPE_FUNCTION, in parseNameSection()
542 const wasm::WasmSignature *Signature = nullptr; in parseNameSection()
543 const wasm::WasmGlobalType *GlobalType = nullptr; in parseNameSection()
544 const wasm::WasmTableType *TableType = nullptr; in parseNameSection()
545 if (Type == wasm::WASM_NAMES_FUNCTION) { in parseNameSection()
554 wasm::WasmFunction &F = getDefinedFunction(Index); in parseNameSection()
559 Info.Flags |= wasm::WASM_SYMBOL_BINDING_GLOBAL; in parseNameSection()
561 Info.Flags |= wasm::WASM_SYMBOL_BINDING_LOCAL; in parseNameSection()
564 Info.Flags |= wasm::WASM_SYMBOL_UNDEFINED; in parseNameSection()
566 } else if (Type == wasm::WASM_NAMES_GLOBAL) { in parseNameSection()
573 nameType = wasm::NameType::GLOBAL; in parseNameSection()
574 Info.Kind = wasm::WASM_SYMBOL_TYPE_GLOBAL; in parseNameSection()
578 Info.Flags |= wasm::WASM_SYMBOL_UNDEFINED; in parseNameSection()
587 nameType = wasm::NameType::DATA_SEGMENT; in parseNameSection()
588 Info.Kind = wasm::WASM_SYMBOL_TYPE_DATA; in parseNameSection()
589 Info.Flags |= wasm::WASM_SYMBOL_BINDING_LOCAL; in parseNameSection()
591 Info.DataRef = wasm::WasmDataReference{ in parseNameSection()
594 DebugNames.push_back(wasm::WasmDebugName{nameType, Index, Name}); in parseNameSection()
601 case wasm::WASM_NAMES_LOCAL: in parseNameSection()
621 if (LinkingData.Version != wasm::WasmMetadataVersion) { in parseLinkingSection()
624 " (Expected: " + Twine(wasm::WasmMetadataVersion) + ")", in parseLinkingSection()
637 case wasm::WASM_SYMBOL_TABLE: in parseLinkingSection()
641 case wasm::WASM_SEGMENT_INFO: { in parseLinkingSection()
653 case wasm::WASM_INIT_FUNCS: { in parseLinkingSection()
657 wasm::WasmInitFunc Init; in parseLinkingSection()
668 case wasm::WASM_COMDAT_INFO: in parseLinkingSection()
694 std::vector<wasm::WasmImport *> ImportedGlobals; in parseLinkingSectionSymtab()
695 std::vector<wasm::WasmImport *> ImportedFunctions; in parseLinkingSectionSymtab()
696 std::vector<wasm::WasmImport *> ImportedTags; in parseLinkingSectionSymtab()
697 std::vector<wasm::WasmImport *> ImportedTables; in parseLinkingSectionSymtab()
703 if (I.Kind == wasm::WASM_EXTERNAL_FUNCTION) in parseLinkingSectionSymtab()
705 else if (I.Kind == wasm::WASM_EXTERNAL_GLOBAL) in parseLinkingSectionSymtab()
707 else if (I.Kind == wasm::WASM_EXTERNAL_TAG) in parseLinkingSectionSymtab()
709 else if (I.Kind == wasm::WASM_EXTERNAL_TABLE) in parseLinkingSectionSymtab()
714 wasm::WasmSymbolInfo Info; in parseLinkingSectionSymtab()
715 const wasm::WasmSignature *Signature = nullptr; in parseLinkingSectionSymtab()
716 const wasm::WasmGlobalType *GlobalType = nullptr; in parseLinkingSectionSymtab()
717 const wasm::WasmTableType *TableType = nullptr; in parseLinkingSectionSymtab()
721 bool IsDefined = (Info.Flags & wasm::WASM_SYMBOL_UNDEFINED) == 0; in parseLinkingSectionSymtab()
724 case wasm::WASM_SYMBOL_TYPE_FUNCTION: in parseLinkingSectionSymtab()
733 wasm::WasmFunction &Function = Functions[FuncIndex]; in parseLinkingSectionSymtab()
738 wasm::WasmImport &Import = *ImportedFunctions[Info.ElementIndex]; in parseLinkingSectionSymtab()
739 if ((Info.Flags & wasm::WASM_SYMBOL_EXPLICIT_NAME) != 0) { in parseLinkingSectionSymtab()
750 case wasm::WASM_SYMBOL_TYPE_GLOBAL: in parseLinkingSectionSymtab()
756 if (!IsDefined && (Info.Flags & wasm::WASM_SYMBOL_BINDING_MASK) == in parseLinkingSectionSymtab()
757 wasm::WASM_SYMBOL_BINDING_WEAK) in parseLinkingSectionSymtab()
763 wasm::WasmGlobal &Global = Globals[GlobalIndex]; in parseLinkingSectionSymtab()
768 wasm::WasmImport &Import = *ImportedGlobals[Info.ElementIndex]; in parseLinkingSectionSymtab()
769 if ((Info.Flags & wasm::WASM_SYMBOL_EXPLICIT_NAME) != 0) { in parseLinkingSectionSymtab()
780 case wasm::WASM_SYMBOL_TYPE_TABLE: in parseLinkingSectionSymtab()
786 if (!IsDefined && (Info.Flags & wasm::WASM_SYMBOL_BINDING_MASK) == in parseLinkingSectionSymtab()
787 wasm::WASM_SYMBOL_BINDING_WEAK) in parseLinkingSectionSymtab()
793 wasm::WasmTable &Table = Tables[TableNumber]; in parseLinkingSectionSymtab()
798 wasm::WasmImport &Import = *ImportedTables[Info.ElementIndex]; in parseLinkingSectionSymtab()
799 if ((Info.Flags & wasm::WASM_SYMBOL_EXPLICIT_NAME) != 0) { in parseLinkingSectionSymtab()
810 case wasm::WASM_SYMBOL_TYPE_DATA: in parseLinkingSectionSymtab()
816 if (!(Info.Flags & wasm::WASM_SYMBOL_ABSOLUTE)) { in parseLinkingSectionSymtab()
829 Info.DataRef = wasm::WasmDataReference{Index, Offset, Size}; in parseLinkingSectionSymtab()
833 case wasm::WASM_SYMBOL_TYPE_SECTION: { in parseLinkingSectionSymtab()
834 if ((Info.Flags & wasm::WASM_SYMBOL_BINDING_MASK) != in parseLinkingSectionSymtab()
835 wasm::WASM_SYMBOL_BINDING_LOCAL) in parseLinkingSectionSymtab()
846 case wasm::WASM_SYMBOL_TYPE_TAG: { in parseLinkingSectionSymtab()
852 if (!IsDefined && (Info.Flags & wasm::WASM_SYMBOL_BINDING_MASK) == in parseLinkingSectionSymtab()
853 wasm::WASM_SYMBOL_BINDING_WEAK) in parseLinkingSectionSymtab()
859 wasm::WasmTag &Tag = Tags[TagIndex]; in parseLinkingSectionSymtab()
865 wasm::WasmImport &Import = *ImportedTags[Info.ElementIndex]; in parseLinkingSectionSymtab()
866 if ((Info.Flags & wasm::WASM_SYMBOL_EXPLICIT_NAME) != 0) { in parseLinkingSectionSymtab()
884 if ((Info.Flags & wasm::WASM_SYMBOL_BINDING_MASK) != in parseLinkingSectionSymtab()
885 wasm::WASM_SYMBOL_BINDING_LOCAL && in parseLinkingSectionSymtab()
920 case wasm::WASM_COMDAT_DATA: in parseLinkingSectionComdat()
929 case wasm::WASM_COMDAT_FUNCTION: in parseLinkingSectionComdat()
938 case wasm::WASM_COMDAT_SECTION: in parseLinkingSectionComdat()
942 if (Sections[Index].Type != wasm::WASM_SEC_CUSTOM) in parseLinkingSectionComdat()
998 wasm::WasmFeatureEntry Feature; in parseTargetFeaturesSection()
1001 case wasm::WASM_FEATURE_PREFIX_USED: in parseTargetFeaturesSection()
1002 case wasm::WASM_FEATURE_PREFIX_REQUIRED: in parseTargetFeaturesSection()
1003 case wasm::WASM_FEATURE_PREFIX_DISALLOWED: in parseTargetFeaturesSection()
1034 wasm::WasmRelocation Reloc = {}; in parseRelocSection()
1051 case wasm::R_WASM_FUNCTION_INDEX_LEB: in parseRelocSection()
1052 case wasm::R_WASM_FUNCTION_INDEX_I32: in parseRelocSection()
1053 case wasm::R_WASM_TABLE_INDEX_SLEB: in parseRelocSection()
1054 case wasm::R_WASM_TABLE_INDEX_SLEB64: in parseRelocSection()
1055 case wasm::R_WASM_TABLE_INDEX_I32: in parseRelocSection()
1056 case wasm::R_WASM_TABLE_INDEX_I64: in parseRelocSection()
1057 case wasm::R_WASM_TABLE_INDEX_REL_SLEB: in parseRelocSection()
1058 case wasm::R_WASM_TABLE_INDEX_REL_SLEB64: in parseRelocSection()
1062 case wasm::R_WASM_TABLE_NUMBER_LEB: in parseRelocSection()
1066 case wasm::R_WASM_TYPE_INDEX_LEB: in parseRelocSection()
1070 case wasm::R_WASM_GLOBAL_INDEX_LEB: in parseRelocSection()
1078 case wasm::R_WASM_GLOBAL_INDEX_I32: in parseRelocSection()
1082 case wasm::R_WASM_TAG_INDEX_LEB: in parseRelocSection()
1086 case wasm::R_WASM_MEMORY_ADDR_LEB: in parseRelocSection()
1087 case wasm::R_WASM_MEMORY_ADDR_SLEB: in parseRelocSection()
1088 case wasm::R_WASM_MEMORY_ADDR_I32: in parseRelocSection()
1089 case wasm::R_WASM_MEMORY_ADDR_REL_SLEB: in parseRelocSection()
1090 case wasm::R_WASM_MEMORY_ADDR_TLS_SLEB: in parseRelocSection()
1091 case wasm::R_WASM_MEMORY_ADDR_LOCREL_I32: in parseRelocSection()
1096 case wasm::R_WASM_MEMORY_ADDR_LEB64: in parseRelocSection()
1097 case wasm::R_WASM_MEMORY_ADDR_SLEB64: in parseRelocSection()
1098 case wasm::R_WASM_MEMORY_ADDR_I64: in parseRelocSection()
1099 case wasm::R_WASM_MEMORY_ADDR_REL_SLEB64: in parseRelocSection()
1100 case wasm::R_WASM_MEMORY_ADDR_TLS_SLEB64: in parseRelocSection()
1105 case wasm::R_WASM_FUNCTION_OFFSET_I32: in parseRelocSection()
1110 case wasm::R_WASM_FUNCTION_OFFSET_I64: in parseRelocSection()
1115 case wasm::R_WASM_SECTION_OFFSET_I32: in parseRelocSection()
1130 if (Reloc.Type == wasm::R_WASM_MEMORY_ADDR_LEB64 || in parseRelocSection()
1131 Reloc.Type == wasm::R_WASM_MEMORY_ADDR_SLEB64 || in parseRelocSection()
1132 Reloc.Type == wasm::R_WASM_MEMORY_ADDR_REL_SLEB64) in parseRelocSection()
1134 if (Reloc.Type == wasm::R_WASM_TABLE_INDEX_I32 || in parseRelocSection()
1135 Reloc.Type == wasm::R_WASM_MEMORY_ADDR_I32 || in parseRelocSection()
1136 Reloc.Type == wasm::R_WASM_MEMORY_ADDR_LOCREL_I32 || in parseRelocSection()
1137 Reloc.Type == wasm::R_WASM_SECTION_OFFSET_I32 || in parseRelocSection()
1138 Reloc.Type == wasm::R_WASM_FUNCTION_OFFSET_I32 || in parseRelocSection()
1139 Reloc.Type == wasm::R_WASM_FUNCTION_INDEX_I32 || in parseRelocSection()
1140 Reloc.Type == wasm::R_WASM_GLOBAL_INDEX_I32) in parseRelocSection()
1142 if (Reloc.Type == wasm::R_WASM_TABLE_INDEX_I64 || in parseRelocSection()
1143 Reloc.Type == wasm::R_WASM_MEMORY_ADDR_I64 || in parseRelocSection()
1144 Reloc.Type == wasm::R_WASM_FUNCTION_OFFSET_I64) in parseRelocSection()
1194 wasm::WasmSignature Sig; in parseTypeSection()
1196 if (Form == wasm::WASM_TYPE_REC) { in parseTypeSection()
1205 Sig.Kind = wasm::WasmSignature::Placeholder; in parseTypeSection()
1210 if (Form != wasm::WASM_TYPE_FUNC) { in parseTypeSection()
1214 if (Form == wasm::WASM_TYPE_SUB || Form == wasm::WASM_TYPE_SUB_FINAL) { in parseTypeSection()
1224 if (Form == wasm::WASM_TYPE_STRUCT) { in parseTypeSection()
1229 } else if (Form == wasm::WASM_TYPE_ARRAY) { in parseTypeSection()
1235 Sig.Kind = wasm::WasmSignature::Placeholder; in parseTypeSection()
1267 wasm::WasmImport Im; in parseImportSection()
1272 case wasm::WASM_EXTERNAL_FUNCTION: in parseImportSection()
1279 case wasm::WASM_EXTERNAL_GLOBAL: in parseImportSection()
1284 case wasm::WASM_EXTERNAL_MEMORY: in parseImportSection()
1286 if (Im.Memory.Flags & wasm::WASM_LIMITS_FLAG_IS_64) in parseImportSection()
1289 case wasm::WASM_EXTERNAL_TABLE: { in parseImportSection()
1293 if (ElemType != wasm::ValType::FUNCREF && in parseImportSection()
1294 ElemType != wasm::ValType::EXTERNREF && in parseImportSection()
1295 ElemType != wasm::ValType::EXNREF && in parseImportSection()
1296 ElemType != wasm::ValType::OTHERREF) in parseImportSection()
1301 case wasm::WASM_EXTERNAL_TAG: in parseImportSection()
1332 wasm::WasmFunction F; in parseFunctionSection()
1347 wasm::WasmTable T; in parseTableSection()
1352 if (ElemType != wasm::ValType::FUNCREF && in parseTableSection()
1353 ElemType != wasm::ValType::EXTERNREF && in parseTableSection()
1354 ElemType != wasm::ValType::EXNREF && in parseTableSection()
1355 ElemType != wasm::ValType::OTHERREF) { in parseTableSection()
1371 if (Limits.Flags & wasm::WASM_LIMITS_FLAG_IS_64) in parseMemorySection()
1394 wasm::WasmTag Tag; in parseTagSection()
1397 Signatures[Type].Kind = wasm::WasmSignature::Tag; in parseTagSection()
1413 wasm::WasmGlobal Global; in parseGlobalSection()
1436 wasm::WasmExport Ex; in parseExportSection()
1440 const wasm::WasmSignature *Signature = nullptr; in parseExportSection()
1441 const wasm::WasmGlobalType *GlobalType = nullptr; in parseExportSection()
1442 const wasm::WasmTableType *TableType = nullptr; in parseExportSection()
1443 wasm::WasmSymbolInfo Info; in parseExportSection()
1447 case wasm::WASM_EXTERNAL_FUNCTION: { in parseExportSection()
1452 Info.Kind = wasm::WASM_SYMBOL_TYPE_FUNCTION; in parseExportSection()
1455 wasm::WasmFunction &Function = Functions[FuncIndex]; in parseExportSection()
1459 case wasm::WASM_EXTERNAL_GLOBAL: { in parseExportSection()
1463 Info.Kind = wasm::WASM_SYMBOL_TYPE_DATA; in parseExportSection()
1469 if (Inst.Opcode == wasm::WASM_OPCODE_I32_CONST) { in parseExportSection()
1471 } else if (Inst.Opcode == wasm::WASM_OPCODE_I64_CONST) { in parseExportSection()
1476 Info.DataRef = wasm::WasmDataReference{0, Offset, 0}; in parseExportSection()
1479 case wasm::WASM_EXTERNAL_TAG: in parseExportSection()
1483 Info.Kind = wasm::WASM_SYMBOL_TYPE_TAG; in parseExportSection()
1486 case wasm::WASM_EXTERNAL_MEMORY: in parseExportSection()
1488 case wasm::WASM_EXTERNAL_TABLE: in parseExportSection()
1489 Info.Kind = wasm::WASM_SYMBOL_TYPE_TABLE; in parseExportSection()
1497 if (Ex.Kind != wasm::WASM_EXTERNAL_MEMORY) { in parseExportSection()
1564 wasm::WasmFunction &WasmObjectFile::getDefinedFunction(uint32_t Index) { in getDefinedFunction()
1569 const wasm::WasmFunction &
1575 const wasm::WasmGlobal &WasmObjectFile::getDefinedGlobal(uint32_t Index) const { in getDefinedGlobal()
1580 wasm::WasmTag &WasmObjectFile::getDefinedTag(uint32_t Index) { in getDefinedTag()
1602 wasm::WasmFunction& Function = Functions[i]; in parseCodeSection()
1615 wasm::WasmLocalDecl Decl; in parseCodeSection()
1643 wasm::WasmElemSegment Segment; in parseElemSection()
1646 uint32_t SupportedFlags = wasm::WASM_ELEM_SEGMENT_HAS_TABLE_NUMBER | in parseElemSection()
1647 wasm::WASM_ELEM_SEGMENT_IS_PASSIVE | in parseElemSection()
1648 wasm::WASM_ELEM_SEGMENT_HAS_INIT_EXPRS; in parseElemSection()
1653 bool IsPassive = (Segment.Flags & wasm::WASM_ELEM_SEGMENT_IS_PASSIVE) != 0; in parseElemSection()
1655 IsPassive && (Segment.Flags & wasm::WASM_ELEM_SEGMENT_IS_DECLARATIVE); in parseElemSection()
1658 (Segment.Flags & wasm::WASM_ELEM_SEGMENT_HAS_TABLE_NUMBER); in parseElemSection()
1660 (Segment.Flags & wasm::WASM_ELEM_SEGMENT_HAS_INIT_EXPRS); in parseElemSection()
1662 (Segment.Flags & wasm::WASM_ELEM_SEGMENT_MASK_HAS_ELEM_KIND) && in parseElemSection()
1676 Segment.Offset.Inst.Opcode = wasm::WASM_OPCODE_I32_CONST; in parseElemSection()
1685 if (Segment.Flags & wasm::WASM_ELEM_SEGMENT_HAS_INIT_EXPRS) { in parseElemSection()
1687 if (Segment.ElemKind != wasm::ValType::FUNCREF && in parseElemSection()
1688 Segment.ElemKind != wasm::ValType::EXTERNREF && in parseElemSection()
1689 Segment.ElemKind != wasm::ValType::EXNREF && in parseElemSection()
1690 Segment.ElemKind != wasm::ValType::OTHERREF) { in parseElemSection()
1698 Segment.ElemKind = wasm::ValType::FUNCREF; in parseElemSection()
1704 Segment.ElemKind = wasm::ValType::FUNCREF; in parseElemSection()
1711 wasm::WasmInitExpr Expr; in parseElemSection()
1739 (Segment.Data.InitFlags & wasm::WASM_DATA_SEGMENT_HAS_MEMINDEX) in parseDataSection()
1742 if ((Segment.Data.InitFlags & wasm::WASM_DATA_SEGMENT_IS_PASSIVE) == 0) { in parseDataSection()
1747 Segment.Data.Offset.Inst.Opcode = wasm::WASM_OPCODE_I32_CONST; in parseDataSection()
1775 const wasm::WasmObjectHeader &WasmObjectFile::getHeader() const { in getHeader()
1833 if (Sym.Info.Kind == wasm::WASM_SYMBOL_TYPE_FUNCTION && in getSymbolAddress()
1838 if (Sym.Info.Kind == wasm::WASM_SYMBOL_TYPE_GLOBAL && in getSymbolAddress()
1848 case wasm::WASM_SYMBOL_TYPE_FUNCTION: in getWasmSymbolValue()
1849 case wasm::WASM_SYMBOL_TYPE_GLOBAL: in getWasmSymbolValue()
1850 case wasm::WASM_SYMBOL_TYPE_TAG: in getWasmSymbolValue()
1851 case wasm::WASM_SYMBOL_TYPE_TABLE: in getWasmSymbolValue()
1853 case wasm::WASM_SYMBOL_TYPE_DATA: { in getWasmSymbolValue()
1857 const wasm::WasmDataSegment &Segment = DataSegments[SegmentIndex].Data; in getWasmSymbolValue()
1860 } else if (Segment.Offset.Inst.Opcode == wasm::WASM_OPCODE_I32_CONST) { in getWasmSymbolValue()
1862 } else if (Segment.Offset.Inst.Opcode == wasm::WASM_OPCODE_I64_CONST) { in getWasmSymbolValue()
1864 } else if (Segment.Offset.Inst.Opcode == wasm::WASM_OPCODE_GLOBAL_GET) { in getWasmSymbolValue()
1870 case wasm::WASM_SYMBOL_TYPE_SECTION: in getWasmSymbolValue()
1895 case wasm::WASM_SYMBOL_TYPE_FUNCTION: in getSymbolType()
1897 case wasm::WASM_SYMBOL_TYPE_GLOBAL: in getSymbolType()
1899 case wasm::WASM_SYMBOL_TYPE_DATA: in getSymbolType()
1901 case wasm::WASM_SYMBOL_TYPE_SECTION: in getSymbolType()
1903 case wasm::WASM_SYMBOL_TYPE_TAG: in getSymbolType()
1905 case wasm::WASM_SYMBOL_TYPE_TABLE: in getSymbolType()
1931 case wasm::WASM_SYMBOL_TYPE_FUNCTION: in getSymbolSectionIdImpl()
1933 case wasm::WASM_SYMBOL_TYPE_GLOBAL: in getSymbolSectionIdImpl()
1935 case wasm::WASM_SYMBOL_TYPE_DATA: in getSymbolSectionIdImpl()
1937 case wasm::WASM_SYMBOL_TYPE_SECTION: in getSymbolSectionIdImpl()
1939 case wasm::WASM_SYMBOL_TYPE_TAG: in getSymbolSectionIdImpl()
1941 case wasm::WASM_SYMBOL_TYPE_TABLE: in getSymbolSectionIdImpl()
1968 if (S.Type == wasm::WASM_SEC_CUSTOM) in getSectionName()
1970 if (S.Type > wasm::WASM_SEC_LAST_KNOWN) in getSectionName()
1972 return wasm::sectionTypeToString(S.Type); in getSectionName()
2009 return getWasmSection(Sec).Type == wasm::WASM_SEC_CODE; in isSectionText()
2013 return getWasmSection(Sec).Type == wasm::WASM_SEC_DATA; in isSectionData()
2038 const wasm::WasmRelocation &Rel = getWasmRelocation(Ref); in getRelocationOffset()
2043 const wasm::WasmRelocation &Rel = getWasmRelocation(Ref); in getRelocationSymbol()
2044 if (Rel.Type == wasm::R_WASM_TYPE_INDEX_LEB) in getRelocationSymbol()
2053 const wasm::WasmRelocation &Rel = getWasmRelocation(Ref); in getRelocationType()
2059 const wasm::WasmRelocation &Rel = getWasmRelocation(Ref); in getRelocationTypeName()
2063 case wasm::name: \ in getRelocationTypeName()
2116 const wasm::WasmRelocation &
2121 const wasm::WasmRelocation &
2132 case wasm::WASM_SEC_CUSTOM: in getSectionOrder()
2142 case wasm::WASM_SEC_TYPE: in getSectionOrder()
2144 case wasm::WASM_SEC_IMPORT: in getSectionOrder()
2146 case wasm::WASM_SEC_FUNCTION: in getSectionOrder()
2148 case wasm::WASM_SEC_TABLE: in getSectionOrder()
2150 case wasm::WASM_SEC_MEMORY: in getSectionOrder()
2152 case wasm::WASM_SEC_GLOBAL: in getSectionOrder()
2154 case wasm::WASM_SEC_EXPORT: in getSectionOrder()
2156 case wasm::WASM_SEC_START: in getSectionOrder()
2158 case wasm::WASM_SEC_ELEM: in getSectionOrder()
2160 case wasm::WASM_SEC_CODE: in getSectionOrder()
2162 case wasm::WASM_SEC_DATA: in getSectionOrder()
2164 case wasm::WASM_SEC_DATACOUNT: in getSectionOrder()
2166 case wasm::WASM_SEC_TAG: in getSectionOrder()