First = Func,
Last = Catch,
};
constexpr int kLabelTypeCount = WABT_ENUM_COUNT(LabelType);
struct Location {
enum class Type {
Text,
Binary,
};
Location() : line(0), first_column(0), last_column(0) {}
Location(std::string_view filename,
int line,
int first_column,
int last_column)
: filename(filename),
line(line),
first_column(first_column),
last_column(last_column) {}
explicit Location(size_t offset) : offset(offset) {}
std::string_view filename; union { // For text files. struct {
int line;
int first_column;
int last_column;
}; // For binary files. struct {
size_t offset;
};
};
};
enum class SegmentKind {
Active,
Passive,
Declared,
};
// Used in test asserts for special expected values "nan:canonical" and // "nan:arithmetic"
enum class ExpectedNan {
None,
Canonical,
Arithmetic,
};
// Matches binary format, do not change.
enum SegmentFlags : uint8_t {
SegFlagsNone = 0,
SegPassive = 1, // bit 0: Is passive
SegExplicitIndex = 2, // bit 1: Has explict index (Implies table 0 if absent)
SegDeclared = 3, // Only used for declared segments
SegUseElemExprs = 4, // bit 2: Is elemexpr (Or else index sequence)
enum class RelocType {
FuncIndexLEB = 0, // e.g. Immediate of call instruction
TableIndexSLEB = 1, // e.g. Loading address of function
TableIndexI32 = 2, // e.g. Function address in DATA
MemoryAddressLEB = 3, // e.g. Memory address in load/store offset immediate
MemoryAddressSLEB = 4, // e.g. Memory address in i32.const
MemoryAddressI32 = 5, // e.g. Memory address in DATA
TypeIndexLEB = 6, // e.g. Immediate type in call_indirect
GlobalIndexLEB = 7, // e.g. Immediate of global.get inst
FunctionOffsetI32 = 8, // e.g. Code offset in DWARF metadata
SectionOffsetI32 = 9, // e.g. Section offset in DWARF metadata
TagIndexLEB = 10, // Used in throw instructions
MemoryAddressRelSLEB = 11, // In PIC code, addr relative to __memory_base
TableIndexRelSLEB = 12, // In PIC code, table index relative to __table_base
GlobalIndexI32 = 13, // e.g. Global index in data (e.g. DWARF)
MemoryAddressLEB64 = 14, // Memory64: Like MemoryAddressLEB
MemoryAddressSLEB64 = 15, // Memory64: Like MemoryAddressSLEB
MemoryAddressI64 = 16, // Memory64: Like MemoryAddressI32
MemoryAddressRelSLEB64 = 17, // Memory64: Like MemoryAddressRelSLEB
TableIndexSLEB64 = 18, // Memory64: Like TableIndexSLEB
TableIndexI64 = 19, // Memory64: Like TableIndexI32
TableNumberLEB = 20, // e.g. Immediate of table.get
MemoryAddressTLSSLEB = 21, // Address relative to __tls_base
FunctionOffsetI64 = 22, // Memory64: Like FunctionOffsetI32
MemoryAddressLocRelI32 = 23, // Address relative to the relocation's location
TableIndexRelSLEB64 = 24, // Memory64: TableIndexRelSLEB
MemoryAddressTLSSLEB64 = 25, // Memory64: MemoryAddressTLSSLEB
FuncIndexI32 = 26, // Function index as an I32
First = FuncIndexLEB,
Last = FuncIndexI32,
};
constexpr int kRelocTypeCount = WABT_ENUM_COUNT(RelocType);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.