File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99// [Canonical ABI] [size], [alignment], and [flat] representation.
1010//
1111// [Canonical ABI]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md
12- // [size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#size
12+ // [size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#element- size
1313// [alignment]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#alignment
1414// [flat]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#flattening
1515type ABI interface {
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ func (e *Enum) Despecialize() TypeDefKind {
2929// type that can represent 0...len(e.Cases).
3030// It is first [despecialized] into a [Variant] with no associated types, then sized.
3131//
32- // [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#size
32+ // [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#element- size
3333// [despecialized]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#despecialization
3434func (e * Enum ) Size () uintptr {
3535 return e .Despecialize ().Size ()
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ type Flags struct {
1111
1212// Size returns the [ABI byte size] of [Flags] f.
1313//
14- // [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#size
14+ // [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#element- size
1515func (f * Flags ) Size () uintptr {
1616 n := len (f .Flags )
1717 switch {
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ type Future struct {
1212
1313// Size returns the [ABI byte size] for a [Future].
1414//
15- // [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#size
15+ // [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#element- size
1616func (* Future ) Size () uintptr { return 4 }
1717
1818// Align returns the [ABI byte alignment] a [Future].
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ type List struct {
1111
1212// Size returns the [ABI byte size] for a [List].
1313//
14- // [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#size
14+ // [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#element- size
1515func (* List ) Size () uintptr { return 8 } // [2]int32
1616
1717// Align returns the [ABI byte alignment] a [List].
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ func (o *Option) Despecialize() TypeDefKind {
2727// Size returns the [ABI byte size] for [Option] o.
2828// It is first [despecialized] into a [Variant] with two cases, "none" and "some(T)", then sized.
2929//
30- // [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#size
30+ // [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#element- size
3131// [despecialized]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#despecialization
3232func (o * Option ) Size () uintptr {
3333 return o .Despecialize ().Size ()
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ type Pointer struct {
1414
1515// Size returns the [ABI byte size] for [Pointer].
1616//
17- // [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#size
17+ // [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#element- size
1818func (* Pointer ) Size () uintptr { return 4 }
1919
2020// Align returns the [ABI byte alignment] for [Pointer].
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ type Record struct {
1111
1212// Size returns the [ABI byte size] for [Record] r.
1313//
14- // [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#size
14+ // [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#element- size
1515func (r * Record ) Size () uintptr {
1616 var s uintptr
1717 for _ , f := range r .Fields {
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ type Resource struct{ _typeDefKind }
88
99// Size returns the [ABI byte size] for [Resource].
1010//
11- // [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#size
11+ // [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#element- size
1212func (* Resource ) Size () uintptr { return 4 }
1313
1414// Align returns the [ABI byte alignment] for [Resource].
@@ -45,7 +45,7 @@ func (_handle) isHandle() {}
4545
4646// Size returns the [ABI byte size] for this [Handle].
4747//
48- // [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#size
48+ // [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#element- size
4949func (_handle ) Size () uintptr { return 4 }
5050
5151// Align returns the [ABI byte alignment] for this [Handle].
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ func (r *Result) Types() []Type {
4040// Size returns the [ABI byte size] for [Result] r.
4141// It is first [despecialized] into a [Variant] with two cases "ok" and "error", then sized.
4242//
43- // [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#size
43+ // [ABI byte size]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#element- size
4444// [despecialized]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#despecialization
4545func (r * Result ) Size () uintptr {
4646 return r .Despecialize ().Size ()
You can’t perform that action at this time.
0 commit comments