Kwasm.ast.module
package kwasm.ast.module
Classes
Name | Description |
---|---|
data class DataSegment
|
From the docs: The initial contents of a memory are zero-valued bytes. The
The Note: In the current version of WebAssembly, at most one memory is allowed in a module.
Consequently, the only valid |
data class ElementSegment
|
Representation of an element segment for a table. From the docs: The initial contents of a table is uninitialized. The
The Note: In the current version of WebAssembly, at most one table is allowed in a module.
Consequently, the only valid |
data class Export
|
Defines an export for a WasmModule. From the docs: The
Each export is labeled by a unique name. Exportable definitions are functions, tables, memories, and globals, which are referenced through a respective descriptor. |
sealed class ExportDescriptor
|
See Export. |
data class Global
|
Represents a global in a WasmModule. From the docs:
Each global stores a single value of the given global type. Its ππππΎ also specifies whether a global is immutable or mutable. Moreover, each global is initialized with an ππππ value given by a constant initializer expression. Globals are referenced through global indices, starting with the smallest index not referencing a global import. |
data class Import
|
Represents an import for a WasmModule. From the docs: The
Each import is labeled by a two-level name space, consisting of a Every import defines an index in the respective index space. In each index space, the indices of imports go before the first index of any definition contained in the module itself. |
sealed class ImportDescriptor
|
See Import. |
sealed class Index
|
Reference to an indexed AstNode in the AST. From the docs:
|
data class Local
|
Represents a mutable local value for a WasmFunction. From the docs: The |
data class Memory
|
Represents a memory instance in a WasmModule. From the docs: The
A memory is a vector of raw uninterpreted bytes. The Memories can be initialized through data segments. Memories are referenced through memory indices, starting with the smallest index not referencing
a memory import. Most constructs implicitly reference memory index Note: In the current version of WebAssembly, at most one memory may be defined or imported in
a single module, and all constructs implicitly reference this memory |
data class Offset
|
Container for an Expression which resolves to a memory offset. |
data class StartFunction
|
Identifies the entry point for a WasmModule. Note: At most one start function may occur in a module |
data class Table
|
Represents a table in a WasmModule. From the docs: The
A table is a vector of opaque values of a particular table element type. The Tables can be initialized through element segments. Tables are referenced through table indices, starting with the smallest index not referencing a
table import. Most constructs implicitly reference table index Note:** In the current version of WebAssembly, at most one table may be defined or imported in a
single module, and all constructs implicitly reference this table |
data class Type
|
A possibly-identified FunctionType. |
data class TypeUse
|
Represents a reference to a Type definition. From the docs: It may optionally be augmented by explicit inlined parameter and result declarations. That allows binding symbolic identifiers to name the local indices of parameters. If inline declarations are given, then their types must match the referenced function type.
Note:
Both productions overlap for the case that the function type is A
where Abbreviations are expanded in the order they appear, such that previously inserted type definitions are reused by consecutive expansions. |
data class WasmFunction
|
Encapsulates a function within a WasmModule. |
data class WasmModule
|
Represents a WebAssembly module. From the docs: WebAssembly programs are organized into modules, which are the unit of deployment, loading, and compilation. A module collects definitions for types, functions, tables, memories, and globals. In addition, it can declare imports and exports and provide initialization logic in the form of data and element segments or a start function. |