Skip to content

WAT syntax for custom page sizes? #6

Description

@fitzgen

The overview is using the following strawperson syntax for specifying a 512-byte page size, where the power-of-two page size is directly written:

(memory (page_size 512))

This means that text parsers would need to check for and reject non-power-of-two values like (page_size 7).

But if we use log-encoding in the binary format, maybe we should also use logs in the text format? Relevant prior art is alignment of memory accesses, which is log-encoded in the binary but the power-of-two alignment is written directly in the text format. And therefore text parsers do need to check for and reject non-power-of-two alignments. I suppose we should do the same thing with page sizes here, unless anyone wants to argue otherwise.

Also feel free to bikeshed the (page_size N) syntax, I guess.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions