@@ -148,61 +148,61 @@ Notes:
148
148
means that the maximum ` ct ` in an MVP ` alias ` declarator is ` 1 ` .
149
149
150
150
```
151
- type ::= dt:<deftype> => (type dt)
152
- deftype ::= dvt:<defvaltype> => dvt
153
- | ft:<functype> => ft
154
- | ct:<componenttype> => ct
155
- | it:<instancetype> => it
156
- primvaltype ::= 0x7f => bool
157
- | 0x7e => s8
158
- | 0x7d => u8
159
- | 0x7c => s16
160
- | 0x7b => u16
161
- | 0x7a => s32
162
- | 0x79 => u32
163
- | 0x78 => s64
164
- | 0x77 => u64
165
- | 0x76 => float32
166
- | 0x75 => float64
167
- | 0x74 => char
168
- | 0x73 => string
169
- defvaltype ::= pvt:<primvaltype> => pvt
170
- | 0x72 nt*:vec(<namedvaltype>) => (record (field nt)*)
171
- | 0x71 case*:vec(<case>) => (variant case*)
172
- | 0x70 t:<valtype> => (list t)
173
- | 0x6f t*:vec(<valtype>) => (tuple t*)
174
- | 0x6e n*:vec(<name>) => (flags n*)
175
- | 0x6d n*:vec(<name>) => (enum n*)
176
- | 0x6c t*:vec(<valtype>) => (union t*)
177
- | 0x6b t:<valtype> => (option t)
178
- | 0x6a t?:<casetype> u?:<casetype> => (result t? (error u)?)
179
- namedvaltype ::= n:<name> t:<valtype> => n t
180
- case ::= n:<name> t?:<casetype> 0x0 => (case n t?)
181
- | n:<name> t?:<casetype> 0x1 i:<u32> => (case n t? (refines case-label[i]))
182
- casetype ::= 0x00 =>
183
- | 0x01 t:<valtype> => t
184
- valtype ::= i:<typeidx> => i
185
- | pvt:<primvaltype> => pvt
186
- functype ::= 0x40 p*:<funcvec> r*:<funcvec> => (func (param p)* (result r)*)
187
- funcvec ::= 0x00 t:<valtype> => [t]
188
- | 0x01 nt*:vec(<namedvaltype>) => nt*
189
- componenttype ::= 0x41 cd*:vec(<componentdecl>) => (component cd*)
190
- instancetype ::= 0x42 id*:vec(<instancedecl>) => (instance id*)
191
- componentdecl ::= 0x03 id:<importdecl> => id
192
- | id:<instancedecl> => id
193
- instancedecl ::= 0x00 t:<core:type> => t
194
- | 0x01 t:<type> => t
195
- | 0x02 a:<alias> => a
196
- | 0x04 ed:<exportdecl> => ed
197
- importdecl ::= n:<name> ed:<externdesc> => (import n ed)
198
- exportdecl ::= n:<name> ed:<externdesc> => (export n ed)
199
- externdesc ::= 0x00 0x11 i:<core:typeidx> => (core module (type i))
200
- | 0x01 i:<typeidx> => (func (type i))
201
- | 0x02 t:<valtype> => (value t)
202
- | 0x03 b:<typebound> => (type b)
203
- | 0x04 i:<typeidx> => (instance (type i))
204
- | 0x05 i:<typeidx> => (component (type i))
205
- typebound ::= 0x00 i:<typeidx> => (eq i)
151
+ type ::= dt:<deftype> => (type dt)
152
+ deftype ::= dvt:<defvaltype> => dvt
153
+ | ft:<functype> => ft
154
+ | ct:<componenttype> => ct
155
+ | it:<instancetype> => it
156
+ primvaltype ::= 0x7f => bool
157
+ | 0x7e => s8
158
+ | 0x7d => u8
159
+ | 0x7c => s16
160
+ | 0x7b => u16
161
+ | 0x7a => s32
162
+ | 0x79 => u32
163
+ | 0x78 => s64
164
+ | 0x77 => u64
165
+ | 0x76 => float32
166
+ | 0x75 => float64
167
+ | 0x74 => char
168
+ | 0x73 => string
169
+ defvaltype ::= pvt:<primvaltype> => pvt
170
+ | 0x72 nt*:vec(<namedvaltype>) => (record (field nt)*)
171
+ | 0x71 case*:vec(<case>) => (variant case*)
172
+ | 0x70 t:<valtype> => (list t)
173
+ | 0x6f t*:vec(<valtype>) => (tuple t*)
174
+ | 0x6e n*:vec(<name>) => (flags n*)
175
+ | 0x6d n*:vec(<name>) => (enum n*)
176
+ | 0x6c t*:vec(<valtype>) => (union t*)
177
+ | 0x6b t:<valtype> => (option t)
178
+ | 0x6a t?:<casetype> u?:<casetype> => (result t? (error u)?)
179
+ namedvaltype ::= n:<name> t:<valtype> => n t
180
+ case ::= n:<name> t?:<casetype> 0x0 => (case n t?)
181
+ | n:<name> t?:<casetype> 0x1 i:<u32> => (case n t? (refines case-label[i]))
182
+ casetype ::= 0x00 =>
183
+ | 0x01 t:<valtype> => t
184
+ valtype ::= i:<typeidx> => i
185
+ | pvt:<primvaltype> => pvt
186
+ functype ::= 0x40 p*:<funcvec> r*:<funcvec> => (func (param p)* (result r)*)
187
+ funcvec ::= 0x00 t:<valtype> => [t]
188
+ | 0x01 nt*:vec(<namedvaltype>) => nt*
189
+ componenttype ::= 0x41 cd*:vec(<componentdecl>) => (component cd*)
190
+ instancetype ::= 0x42 id*:vec(<instancedecl>) => (instance id*)
191
+ componentdecl ::= 0x03 id:<importdecl> => id
192
+ | id:<instancedecl> => id
193
+ instancedecl ::= 0x00 t:<core:type> => t
194
+ | 0x01 t:<type> => t
195
+ | 0x02 a:<alias> => a
196
+ | 0x04 ed:<exportdecl> => ed
197
+ importdecl ::= n:<name> ed:<externdesc> => (import n ed)
198
+ exportdecl ::= n:<name> ed:<externdesc> => (export n ed)
199
+ externdesc ::= 0x00 0x11 i:<core:typeidx> => (core module (type i))
200
+ | 0x01 i:<typeidx> => (func (type i))
201
+ | 0x02 t:<valtype> => (value t)
202
+ | 0x03 b:<typebound> => (type b)
203
+ | 0x04 i:<typeidx> => (instance (type i))
204
+ | 0x05 i:<typeidx> => (component (type i))
205
+ typebound ::= 0x00 i:<typeidx> => (eq i)
206
206
```
207
207
Notes:
208
208
* The type opcodes follow the same negative-SLEB128 scheme as Core WebAssembly,
0 commit comments