@@ -32,6 +32,7 @@ The API is documented in the rest of this document.
3232 - [ Atomic memory accesses 🦄] ( #atomic-memory-accesses- )
3333 - [ Atomic read-modify-write operations 🦄] ( #atomic-read-modify-write-operations- )
3434 - [ Atomic wait and wake operations 🦄] ( #atomic-wait-and-wake-operations- )
35+ - [ Sign extension operations 🦄] ( #sign-extension-operations- )
3536- [ Expression manipulation] ( #expression-manipulation )
3637- [ Relooper] ( #relooper )
3738- [ Source maps] ( #source-maps )
@@ -83,6 +84,9 @@ The API is documented in the rest of this document.
8384* Module#** getFunctionTypeBySignature** (resultType: ` Type ` , paramTypes: ` Type[] ` ): ` Signature ` <br />
8485 Gets an existing function type by its parametric signature. Returns ` 0 ` if there is no such function type.
8586
87+ * Module#** removeFunctionType** (name: ` string ` ): ` void ` <br />
88+ Removes a function type.
89+
8690* Module#** addFunction** (name: ` string ` , functionType: ` Signature ` , varTypes: ` Type[] ` , body: ` Expression ` ): ` Function ` <br />
8791 Adds a function. ` varTypes ` indicate additional locals, in the given order.
8892
@@ -104,9 +108,6 @@ The API is documented in the rest of this document.
104108* Module#** addGlobalImport** (internalName: ` string ` , externalModuleName: ` string ` , externalBaseName: ` string ` , globalType: ` Type ` ): ` Import ` <br />
105109 Adds a global variable import. Imported globals must be immutable.
106110
107- * Module#** removeImport** (internalName: ` string ` ): ` void ` <br />
108- Removes an import, by internal name.
109-
110111* Module#** addFunctionExport** (internalName: ` string ` , externalName: ` string ` ): ` Export ` <br />
111112 Adds a function export.
112113
@@ -119,10 +120,13 @@ The API is documented in the rest of this document.
119120* Module#** addGlobalExport** (internalName: ` string ` , externalName: ` string ` ): ` Export ` <br />
120121 Adds a global variable export. Exported globals must be immutable.
121122
123+ * Module#** addGlobal** (name: ` string ` , type: ` Type ` , mutable: ` number ` , value: ` Expression ` ): ` Global ` <br />
124+ Adds a global instance variable.
125+
122126* Module#** removeExport** (externalName: ` string ` ): ` void ` <br />
123127 Removes an export, by external name.
124128
125- * Module#** setFunctionTable** (funcs: ` Function []` ): ` void ` <br />
129+ * Module#** setFunctionTable** (initial: ` number ` , maximum: ` number ` , funcs: ` string []` ): ` void ` <br />
126130 Sets the contents of the function table. There's just one table for now, using name ` "0" ` .
127131
128132* Module#** setMemory** (initial: ` number ` , maximum: ` number ` , exportName: ` string | null ` , segments: ` MemorySegment[] ` ): ` void ` <br />
@@ -144,26 +148,29 @@ The API is documented in the rest of this document.
144148* ** getFunctionInfo** (ftype: ` Function ` : ` FunctionInfo ` <br />
145149 Obtains information about a function.
146150
147- * FunctionInfo#** name** : ` string | null `
151+ * FunctionInfo#** name** : ` string `
152+ * FunctionInfo#** module** : ` string | null ` (if imported)
153+ * FunctionInfo#** base** : ` string | null ` (if imported)
148154 * FunctionInfo#** type** : ` FunctionType `
149155 * FunctionInfo#** params** : ` Type[] `
150156 * FunctionInfo#** result** : ` Type `
151157 * FunctionInfo#** vars** : ` Type `
152158 * FunctionInfo#** body** : ` Expression `
153159
154- * ** getImportInfo ** (import _ : ` Import ` ): ` ImportInfo ` <br />
160+ * ** getGlobalInfo ** (global : ` Global ` ): ` GlobalInfo ` <br />
155161 Obtains information about an import, always including:
156162
157- * ImportInfo #** kind ** : ` ExternalKind `
158- * ImportInfo #** module** : ` string `
159- * ImportInfo #** base** : ` string `
160- * ImportInfo #** name ** : ` string `
163+ * GlobalInfo #** name ** : ` string `
164+ * GlobalInfo #** module** : ` string | null ` (if imported)
165+ * GlobalInfo #** base** : ` string | null ` (if imported)
166+ * GlobalInfo #** type ** : ` Type `
161167
162- Additional properties depend on the expression's ` kind ` and are usually equivalent to the respective parameters when creating such an import:
168+ * ** getExportInfo** (export_ : ` Export ` ): ` ExportInfo ` <br />
169+ Obtains information about an export.
163170
164- * GlobalImportInfo #** globalType ** : ` Type `
165- >
166- * FunctionImportInfo #** functionType ** : ` FunctionType `
171+ * ExportInfo #** kind ** : ` ExternalKind `
172+ * ExportInfo# ** name ** : ` string `
173+ * ExportInfo #** value ** : ` string `
167174
168175 Possible ` ExternalKind ` values are:
169176
@@ -172,13 +179,6 @@ The API is documented in the rest of this document.
172179 * ** ExternalMemory** : ` ExternalKind `
173180 * ** ExternalGlobal** : ` ExternalKind `
174181
175- * ** getExportInfo** (export_ : ` Export ` ): ` ExportInfo ` <br />
176- Obtains information about an export.
177-
178- * ExportInfo#** kind** : ` ExternalKind `
179- * ExportInfo#** name** : ` string `
180- * ExportInfo#** value** : ` string `
181-
182182### Module validation
183183
184184* Module#** validate** (): ` boolean ` <br />
@@ -284,19 +284,19 @@ The API is documented in the rest of this document.
284284
285285#### [ Variable accesses] ( http://webassembly.org/docs/semantics/#local-variables )
286286
287- * Module#** getLocal/ get_local** (index: ` number ` , type: ` Type ` ): ` Expression ` <br />
287+ * Module#** get_local/getLocal ** (index: ` number ` , type: ` Type ` ): ` Expression ` <br />
288288 Creates a get_local for the local at the specified index. Note that we must specify the type here as we may not have created the local being called yet.
289289
290- * Module#** setLocal/ set_local** (index: ` number ` , value: ` Expression ` ): ` Expression ` <br />
290+ * Module#** set_local/setLocal ** (index: ` number ` , value: ` Expression ` ): ` Expression ` <br />
291291 Creates a set_local for the local at the specified index.
292292
293- * Module#** teeLocal/ tee_local** (index: ` number ` , value: ` Expression ` ): ` Expression ` <br />
293+ * Module#** tee_local/teeLocal ** (index: ` number ` , value: ` Expression ` ): ` Expression ` <br />
294294 Creates a tee_local for the local at the specified index. A tee differs from a set in that the value remains on the stack.
295295
296- * Module#** getGlobal/ get_global** (name: ` string ` , type: ` Type ` ): ` Expression ` <br />
296+ * Module#** get_global/getGlobal ** (name: ` string ` , type: ` Type ` ): ` Expression ` <br />
297297 Creates a get_global for the global with the specified name. Note that we must specify the type here as we may not have created the global being called yet.
298298
299- * Module#** setGlobal/ set_global** (name: ` string ` , value: ` Expression ` ): ` Expression ` <br />
299+ * Module#** set_global/setGlobal ** (name: ` string ` , value: ` Expression ` ): ` Expression ` <br />
300300 Creates a set_global for the global with the specified name.
301301
302302#### [ Integer operations] ( http://webassembly.org/docs/semantics/#32-bit-integer-operators )
@@ -441,10 +441,7 @@ The API is documented in the rest of this document.
441441* Module#** call** (name: ` string ` , operands: ` Expression[] ` , returnType: ` Type ` ): ` Expression ` <br />
442442 Creates a call to a function. Note that we must specify the return type here as we may not have created the function being called yet.
443443
444- * Module#** callImport/call_import** (name: ` string ` , operands: ` Expression[] ` , returnType: ` Type ` ): ` Expression ` <br />
445- Similar to ** call** , but calls an imported function.
446-
447- * Module#** callIndirect/call_indirect** (target: ` Expression ` , operands: ` Expression[] ` , returnType: ` Type ` ): ` Expression ` <br />
444+ * Module#** call_indirect/callIndirect** (target: ` Expression ` , operands: ` Expression[] ` , returnType: ` Type ` ): ` Expression ` <br />
448445 Similar to ** call** , but calls indirectly, i.e., via a function pointer, so an expression replaces the name as the called value.
449446
450447#### [ Linear memory accesses] ( http://webassembly.org/docs/semantics/#linear-memory-accesses )
@@ -478,9 +475,8 @@ The API is documented in the rest of this document.
478475
479476#### [ Host operations] ( http://webassembly.org/docs/semantics/#resizing )
480477
481- * Module#** currentMemory/current_memory** (): ` Expression `
482- * Module#** growMemory/get_memory** (value: ` number ` ): ` Expression `
483- * Module#** hasFeature/has_feature** (name: ` string ` ): ` Expression ` 🦄
478+ * Module#** current_memory/currentMemory** (): ` Expression `
479+ * Module#** grow_memory/growMemory** (value: ` number ` ): ` Expression `
484480
485481#### [ Atomic memory accesses] ( https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md#atomic-memory-accesses ) 🦄
486482
@@ -559,6 +555,15 @@ The API is documented in the rest of this document.
559555* Module#i64.** wait** (ptr: ` Expression ` , expected: ` Expression ` , timeout: ` Expression ` ): ` Expression `
560556* Module#** wake** (ptr: ` Expression ` , wakeCount: ` Expression ` ): ` Expression `
561557
558+ #### [ Sign extension operations] ( https://github.com/WebAssembly/sign-extension-ops/blob/master/proposals/sign-extension-ops/Overview.md ) 🦄
559+
560+ * Module#i32.** extend8_s** (value: ` Expression ` ): ` Expression `
561+ * Module#i32.** extend16_s** (value: ` Expression ` ): ` Expression `
562+ >
563+ * Module#i64.** extend8_s** (value: ` Expression ` ): ` Expression `
564+ * Module#i64.** extend16_s** (value: ` Expression ` ): ` Expression `
565+ * Module#i64.** extend32_s** (value: ` Expression ` ): ` Expression `
566+
562567### Expression manipulation
563568
564569* ** getExpressionId** (expr: ` Expression ` ): ` ExpressionId ` <br />
0 commit comments