You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: design/mvp/CanonicalABI.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3110,7 +3110,12 @@ validation is performed:
3110
3110
* requires options based on [`lift(param)`](#canonopt-validation) for all parameters in `ft`
3111
3111
* requires options based on [`lower(result)`](#canonopt-validation) if `ft` has a result
3112
3112
* if `len(flatten_types(ft.param_types())) > MAX_FLAT_PARAMS`, `realloc` is required
3113
-
* if `len(flatten_types(ft.result_type())) > MAX_FLAT_RESULTS`, `memory` is required
3113
+
* if `len(flatten_types(ft.result_type())) > max` (where `max = MAX_FLAT_RESULTS` for sync lifts, and `max = MAX_FLAT_PARAMS` for async lifts), `memory` is required
3114
+
3115
+
Note that an `async`-lifted function whose result type requires a memory to lift
3116
+
(either because it contains lists or strings or because the number of flattened
3117
+
types exceeds `MAX_FLAT_PARAMS`) must include a `memory` option, and that option
3118
+
must exactly match that of the `task.return` built-in called at runtime.
3114
3119
3115
3120
When instantiating component instance `$inst`, `$f` is defined to be the
3116
3121
partially-bound closure `canon_lift($opts, $inst, $ft, $callee)` which has 3
0 commit comments