aboutsummaryrefslogtreecommitdiffstats
path: root/resources/wasm.xml
blob: f2b8653947934b5d7eac995480dcee9a14542d6b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?xml version="1.0" encoding="UTF-8"?>
<wasm:Structure xmlns:wasm="http://www.w3.org/2001/XMLSchema">
  <Read>
    <Magic_Number size="4"></Magic_Number>
    <Version size="4"></Version>
    <Type_Section count="1" type="" isaggregate="true">
      <Count name="count" encoding="leb128u" type="uint32" count="1"/>
      <Type_Section_Entry count="self::Count"/>
    </Type_Section>
    <Import_Section count="1" type="" isaggregate="true">
      <Count name="count" encoding="leb128u" type="uint32" count="1"/>
      <Entries name="entries" type="self::Import_Section_Entry" count="self::Count"/>
    </Import_Section>
    <Function_Section count="1" type="" isaggregate="true">
      <Count name="count" encoding="leb128u" type="uint32" count="1"/>
      <Types name="types" encoding="leb128u" type="uint32" count="self::Count"/>
    </Function_Section>
    <Table_Section count="1" type="" isaggregate="true">
      <Count name="count" encoding="leb128u" type="uint32" count="1"/>
      <Entries name="entries" type="self::Table_Type" count="self::Count"/>
    </Table_Section>
    <Memory_Section count="1" type="" isaggregate="true">
      <Count name="count" encoding="leb128u" type="uint32" count="1"/>
      <Entries name="entries" type="self::Memory_Type" count="self::Count"/>
    </Memory_Section>
    <Global_Section count="1" type="" isaggregate="true">
      <Count name="count" encoding="leb128u" type="uint32" count="1"/>
      <Globals name="globals" type="this::Global_Entry" count="self::Count"/>
    </Global_Section>
    <Export_Section count="1" type="" isaggregate="true">
      <Count name="count" encoding="leb128u" type="uint32" count="1"/>
      <Entries name="entries" type="self::Export_Entry" count="self::Count"/>
    </Export_Section>
    <Start_Section count="1" type="" isaggregate="true">
      <Index name="index" encoding="leb128u" type="uint32" count="1"/>
    </Start_Section>
    <Element_Section count="1" type="" isaggregate="true">
      <Count name="count" encoding="leb128u" type="uint32" count="1"/>
      <Entries name="entries" type="self::Element_Segment" count="self::Count"/>
    </Element_Section>
    <Code_Section count="1" type="" isaggregate="true"></Code_Section>
    <Data_Section count="1" type="" isaggregate="true"></Data_Section>
    <Custom_Section count="1" type="" isaggregate="true"></Custom_Section>
  </Read>
  <Definition>
    <Init_Expr name="init_expr_t" isaggregate="true">
      <Size name="size" encoding="leb128u" type="varuint32" count="1"></Size>
      <Code name="code" type="string" coutn="1" size="self::Size"></Code>
    </Init_Expr>
    <Resizable_Limit name="resizable_limit_t" isaggregate="true">
      <Flags name="flags" encoding="leb128u" type="uint8" count="1"></Flags>
      <Initial name="initial" encoding="leb128u" type="uint32" count="1"></Initial>
      <Maximum name="maximum" encoding="leb128u" type="uint32" count="1"></Maximum>
    </Resizable_Limit>
    <Global_Type name="global_type_t" isaggregate="true">
      <Value_Type name="value_type" type="int" count="1"></Value_Type>
      <Mutability name="mutability" encoding="leb128u" type="uint8" count="1"></Mutability>
    </Global_Type>
    <Table_Type name="table_type_t" isaggregate="true">
      <Element_Type name="element_type" encoding="leb128s" type="int8" count="1"></Element_Type>
      <Resizable_Limit count="1"></Resizable_Limit>
    </Table_Type>
    <Memory_Type name="memory_type_t" isaggregate="true">
      <Resizable_Limit count="1"></Resizable_Limit>
    </Memory_Type>
    <Type_Section_Entry name="W_Type_Section_Entry" isaggregate="true">
      <Form name="form" encoding="leb128s" type="int8" count="1"/>
      <Param_Count name="param_count" encoding="leb128s" type="uint32" count="1"/>
      <Param_Types name="param_types" encoding="leb128s" type="int8" count="self::Param_Count"/>
      <Return_Count name="return_count" encoding="leb128u" type="uint8"/>
      <Return_Types name="return_types" encoding="leb128s" type="int8"/>
    </Type_Section_Entry>
    <Import_Section_Entry name="W_Import_Section_Entry" isaggregate="true">
      <Module_Length name="module_length" encoding="leb128u" type="uint32" count="1"/>
      <Module_Str name="module_str" type="string" count="1" size="self::Module_Length"/>
      <Field_Len name="field_len" encoding="leb128u" type="uint32" couny="1"/>
      <Field_Str name="field_str" type="string" count="1" size="self::Field_Len"/>
      <Kind name="kind" encoding="leb128u" type="uint8" count="1"/>
      <Type name="type" conditional="true" condition="self::Kind">
        <condition0 encoding="leb128u" type="uint32">0</condition0>
        <condition1 type="Table_Type">1</condition1>
        <condition2 type="Memory_Type">2</condition2>
        <condition3 type="Global_Type">3</condition3>
      </Type>
    </Import_Section_Entry>
    <Global_Entry name="global_type_t" isaggregate="true">
      <Global_Type name="type" type="self::Global_Type" count="1"/>
      <Init name="init" type="self::Init_Expr" count="1"/>
    </Global_Entry>
    <Export_Entry name="W_Export_Entry" isaggregate="true">
      <Field_Len name="field_len" encoding="leb128u" type="uint32" count="1"/>
      <Field_Str name="field_str" encoding="leb128u" type="string" count="1" size="self::Field_Len"/>
      <Kind name="kind" encoding="leb128u" type="uint8" count="1"/>
      <Index name="index" encoding="leb128u" type="uint32" count="1"/>
    </Export_Entry>
    <Element_Segment name="W_Element_Segment" isaggregate="true">
      <Index name="index" encoding="leb128u" type="uint32" count="1"/>
      <Init name="init" type="self::Init_Expr" count="1"/>
      <Num_Length name="num_length" encoding="leb128u" type="uint32" count="1"/>
      <Elems name="elems" encoding="leb128u" type="uint32" count="self::Num_Length"/>
    </Element_Segment>
  </Definition>
</wasm:Structure>