@@ -188,23 +188,26 @@ Notes:
188
188
func ::= body:<funcbody> => (func body)
189
189
funcbody ::= 0x00 ft:<typeidx> opt*:vec(<canonopt>) f:<funcidx> => (canon.lift ft opt* f)
190
190
| 0x01 opt*:<canonopt>* f:<funcidx> => (canon.lower opt* f)
191
- canonopt ::= 0x00 => string=utf8
192
- | 0x01 => string=utf16
193
- | 0x02 => string=latin1+utf16
194
- | 0x03 i:<instanceidx> => (into i)
191
+ canonopt ::= 0x00 => string-encoding=utf8
192
+ | 0x01 => string-encoding=utf16
193
+ | 0x02 => string-encoding=latin1+utf16
194
+ | 0x03 m:<memidx> => (memory m)
195
+ | 0x04 f:<funcidx> => (realloc f)
196
+ | 0x05 f:<funcidx> => (post-return f)
195
197
```
196
198
Notes:
197
199
* Validation prevents duplicate or conflicting options.
198
- * Validation of ` canon.lift ` requires ` f ` to have a ` core:functype ` that matches
199
- the canonical-ABI-defined lowering of ` ft ` . The function defined by
200
- ` canon.lift ` has type ` ft ` .
201
- * Validation of ` canon.lower ` requires ` f ` to have a ` functype ` . The function
202
- defined by ` canon.lower ` has a ` core:functype ` defined by the canonical ABI
203
- lowering of ` f ` 's type .
200
+ * Validation of ` canon.lift ` requires ` f ` to have type ` flatten(ft) ` (defined
201
+ by the [ Canonical ABI ] ( CanonicalABI.md#flattening ) ). The function being
202
+ defined is given type ` ft ` .
203
+ * Validation of ` canon.lower ` requires ` f ` to be a component function . The
204
+ function being defined is given core function type ` flatten(ft) ` where ` ft `
205
+ is the ` functype ` of ` f ` .
204
206
* If the lifting/lowering operations implied by ` canon.lift ` or ` canon.lower `
205
- require access to ` memory ` , ` realloc ` or ` free ` , then validation will require
206
- the ` (into i) ` ` canonopt ` be present and the corresponding export be present
207
- in ` i ` 's ` instancetype ` .
207
+ require access to ` memory ` or ` realloc ` , then validation requires these
208
+ options to be present. If present, ` realloc ` must have type
209
+ ` (func (param i32 i32 i32 i32) (result i32)) ` .
210
+ * ` post-return ` is always optional, but, if present, must have type ` (func) ` .
208
211
209
212
210
213
## Start Definitions
0 commit comments