Skip to content

Commit 066e700

Browse files
committed
Add note on spec-internal state vs. implementation
1 parent bd79e22 commit 066e700

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

design/mvp/CanonicalABI.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ being specified here.
1111
* [Call Context](#call-context)
1212
* [Canonical ABI Options](#canonical-abi-options)
1313
* [Runtime State](#runtime-state)
14+
* [Component Instance State](#component-instance-state)
1415
* [Resource State](#resource-state)
1516
* [Task State](#task-state)
1617
* [Buffer, Stream and Future State](#buffer-stream-and-future-state)
@@ -136,6 +137,17 @@ reason that `async` is a keyword and most branches below want to start with the
136137

137138
### Runtime State
138139

140+
The following Python classes define spec-internal state and utility methods
141+
that are used to define the externally-visible behavior of Canonical ABI's
142+
lifting, lowering and built-in definitions below. These fields are chosen for
143+
simplicity over performance and thus an optimizing implementation is expected
144+
to use a more optimized representations as long as it preserves the same
145+
externally-visible behavior. Some specific examples of expected optimizations
146+
are noted below.
147+
148+
149+
#### Component Instance State
150+
139151
The `inst` field of `CallContext` points to the component instance which the
140152
`canon`-generated function is closed over. Component instances contain all the
141153
core wasm instance as well as some extra state that is used exclusively by the

0 commit comments

Comments
 (0)