Skip to content
Merged
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
9 changes: 8 additions & 1 deletion AstSemantics.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,21 @@ page size. To determine page size, a nullary `page_size` operation is provided.

* `resize_memory` : grow or shrink linear memory by a given delta which
must be a multiple of `page_size`
* `page_size` : nullary constant function returning page size
* `page_size` : nullary constant function returning page size in bytes

Also as stated [above](AstSemantics.md#linear-memory), linear memory is
contiguous, meaning there are no "holes" in the linear address space. After the
MVP, there are [future features](FutureFeatures.md#finer-grained-control-over-memory)
proposed to allow setting protection and creating mappings within the
contiguous linear memory.

The result type of `page_size` is `int32` for wasm32 and `int64` for wasm64.
The result value of `page_size` is an unsigned integer which is a power of 2.

(Note that the `page_size` value need not reflect the actual internal page size
of the implementation; it just needs to be a value suitable for use with
`resize_memory`)

## Local variables

Each function has a fixed, pre-declared number of local variables which occupy a single
Expand Down