1RUN: obj2yaml %p/../Inputs/WASM/multi-table.wasm | FileCheck %s 2 3 4# CHECK: - Type: TABLE 5# CHECK: Tables: 6# CHECK: - Index: 1 7# CHECK: ElemType: FUNCREF 8# CHECK: Limits: 9# CHECK: Flags: [ HAS_MAX ] 10# CHECK: Minimum: 0x3 11# CHECK: Maximum: 0x3 12# CHECK: - Index: 2 13# CHECK: ElemType: FUNCREF 14# CHECK: Limits: 15# CHECK: Flags: [ HAS_MAX ] 16# CHECK: Minimum: 0x4 17# CHECK: Maximum: 0x4 18# CHECK: - Index: 3 19# CHECK: ElemType: EXTERNREF 20# CHECK: Limits: 21# CHECK: Minimum: 0x0 22# CHECK: - Index: 4 23# CHECK: ElemType: OTHERREF 24# CHECK: Limits: 25# CHECK: Flags: [ HAS_MAX ] 26# CHECK: Minimum: 0x5 27# CHECK: Maximum: 0x5 28# CHECK: - Type: GLOBAL 29# CHECK: Globals: 30# CHECK: - Index: 0 31# CHECK: Type: OTHERREF 32# CHECK: Mutable: false 33# CHECK: InitExpr: 34# CHECK: Extended: true 35# CHECK: Body: D2000B 36# CHECK: - Index: 1 37# CHECK: Type: I32 38# CHECK: Mutable: false 39# CHECK: InitExpr: 40# CHECK: Opcode: I32_CONST 41# CHECK: Value: 0 42# CHECK: - Type: ELEM 43# CHECK: Segments: 44# CHECK: - Offset: 45# CHECK: Opcode: I32_CONST 46# CHECK: Value: 0 47# CHECK: Functions: [ 0 ] 48# CHECK: - Flags: 2 49# CHECK: TableNumber: 1 50# CHECK: ElemKind: FUNCREF 51# CHECK: Offset: 52# CHECK: Opcode: I32_CONST 53# CHECK: Value: 0 54# CHECK: Functions: [ 0 ] 55# CHECK: - Flags: 2 56# CHECK: TableNumber: 1 57# CHECK: ElemKind: FUNCREF 58# CHECK: Offset: 59# CHECK: Opcode: I32_CONST 60# CHECK: Value: 1 61# CHECK: Functions: [ 0, 1 ] 62# CHECK: - Flags: 6 63# CHECK: TableNumber: 2 64# CHECK: ElemKind: FUNCREF 65# CHECK: Offset: 66# CHECK: Opcode: GLOBAL_GET 67# CHECK: Index: 1 68# There are 2 funcions encoded with initexprs in this segment 69# but initexprs in tables are unmodeled. 70# CHECK: Functions: [ ] 71# CHECK: - Flags: 6 72# CHECK: TableNumber: 2 73# This elemkind is OTHERREF because it's encoded as a typed funcref 74# CHECK: ElemKind: OTHERREF 75# CHECK: Offset: 76# CHECK: Opcode: I32_CONST 77# CHECK: Value: 2 78# CHECK: Functions: [ ] 79# CHECK: - Flags: 1 80# CHECK: ElemKind: FUNCREF 81# CHECK: Offset: 82# CHECK: Opcode: I32_CONST 83# CHECK: Value: 0 84# CHECK: Functions: [ 0, 1 ] 85# CHECK: - Flags: 5 86# CHECK: ElemKind: FUNCREF 87# CHECK: Offset: 88# CHECK: Opcode: I32_CONST 89# CHECK: Value: 0 90# Empty function list, encoded with initexprs 91# CHECK: Functions: [ ] 92# CHECK: - Flags: 5 93# CHECK: ElemKind: OTHERREF 94# CHECK: Offset: 95# CHECK: Opcode: I32_CONST 96# CHECK: Value: 0 97# Function list encoded with initexprs 98# CHECK: Functions: [ ] 99# CHECK: - Flags: 1 100# CHECK: ElemKind: FUNCREF 101# CHECK: Offset: 102# CHECK: Opcode: I32_CONST 103# CHECK: Value: 0 104# CHECK: Functions: [ ] 105# CHECK: - Flags: 6 106# CHECK: TableNumber: 4 107# CHECK: ElemKind: OTHERREF 108# CHECK: Offset: 109# CHECK: Opcode: I32_CONST 110# CHECK: Value: 0 111# Function list encoded with initexprs 112# CHECK: Functions: [ ] 113