Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions design/mvp/Explainer.md
Original file line number Diff line number Diff line change
Expand Up @@ -616,9 +616,9 @@ canon ::= (canon lift core-prefix(<core:funcidx>) <canonopt>* bind-id(<extern
canonopt ::= string-encoding=utf8
| string-encoding=utf16
| string-encoding=latin1+utf16
| (memory core-prefix(<core:memidx>))
| (realloc core-prefix(<core:funcidx>))
| (post-return core-prefix(<core:funcidx>))
| (memory <core:memidx>)
| (realloc <core:funcidx>)
| (post-return <core:funcidx>)
```
While the production `externdesc` accepts any `sort`, the validation rules
for `canon lift` would only allow the `func` sort. In the future, other sorts
Expand Down Expand Up @@ -697,7 +697,7 @@ takes a string, does some logging, then returns a string.
(core instance $libc (instantiate $Libc))
(core func $log (canon lower
(func $logging "log")
(memory (core memory $libc "mem")) (realloc (core func $libc "realloc"))
(memory (core memory $libc "mem")) (realloc (func $libc "realloc"))
))
(core module $Main
(import "libc" "memory" (memory 1))
Expand All @@ -713,7 +713,7 @@ takes a string, does some logging, then returns a string.
))
(func $run (param string) (result string) (canon lift
(core func $main "run")
(memory (core memory $libc "mem")) (realloc (core func $libc "realloc"))
(memory $libc "mem") (realloc (func $libc "realloc"))
))
(export "run" (func $run))
)
Expand Down Expand Up @@ -770,7 +770,7 @@ exported string at instantiation time:
(core instance $main (instantiate $Main (with "libc" (instance $libc))))
(func $start (param string) (result string) (canon lift
(core func $main "start")
(memory (core memory $libc "mem")) (realloc (core func $libc "realloc"))
(memory $libc "mem") (realloc (func $libc "realloc"))
))
(start $start (value $name) (result (value $greeting)))
(export "greeting" (value $greeting))
Expand Down
10 changes: 5 additions & 5 deletions design/mvp/examples/SharedEverythingDynamicLinking.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ would look like:
))
(func $zip (param (list u8)) (result (list u8)) (canon lift
(func $main "zip")
(memory (memory $libc "memory")) (realloc (func $libc "realloc"))
(memory $libc "memory") (realloc (func $libc "realloc"))
))
(export "zip" (func $zip))
)
Expand Down Expand Up @@ -238,7 +238,7 @@ component-aware `clang`, the resulting component would look like:
))
(func $transform (param (list u8)) (result (list u8)) (canon lift
(func $main "transform")
(memory (memory $libc "memory")) (realloc (func $libc "realloc"))
(memory $libc "memory") (realloc (func $libc "realloc"))
))
(export "transform" (func $transform))
)
Expand Down Expand Up @@ -285,11 +285,11 @@ components. The resulting component could look like:
(instance $libc (instantiate (module $Libc)))
(func $zip (canon lower
(func $zipper "zip")
(memory (memory $libc "memory")) (realloc (func $libc "realloc"))
(memory $libc "memory") (realloc (func $libc "realloc"))
))
(func $transform (canon lower
(func $imgmgk "transform")
(memory (memory $libc "memory")) (realloc (func $libc "realloc"))
(memory $libc "memory") (realloc (func $libc "realloc"))
))
(instance $main (instantiate (module $Main)
(with "libc" (instance $libc))
Expand All @@ -298,7 +298,7 @@ components. The resulting component could look like:
))
(func $run (param string) (result string) (canon lift
(func $main "run")
(memory (memory $libc "memory")) (realloc (func $libc "realloc"))
(memory $libc "memory") (realloc (func $libc "realloc"))
))
(export "run" (func $run))
)
Expand Down