Skip to content

Commit a7e9e84

Browse files
committed
Class documentation
1 parent f0700d0 commit a7e9e84

File tree

2 files changed

+10
-27
lines changed

2 files changed

+10
-27
lines changed

doc_classes/Wasm.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
2-
<class name="Wasm" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
2+
<class name="Wasm" inherits="Reference" version="3.6" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
33
<brief_description>
44
An instance of a Wasm module.
55
Before being able to be used, the module must be compiled and instantiated.
@@ -13,16 +13,16 @@
1313
<methods>
1414
<method name="compile">
1515
<return type="int" enum="Error" />
16-
<param index="0" name="bytecode" type="PackedByteArray" />
16+
<argument index="0" name="bytecode" type="PoolByteArray" />
1717
<description>
1818
Compile the Wasm module provided Wasm binary [code]bytecode[/code].
1919
This must be called before instantiating the module. Alternatively, the module can be compiled and instantiated in a single step with [method load].
2020
</description>
2121
</method>
2222
<method name="function">
2323
<return type="Variant" />
24-
<param index="0" name="name" type="String" />
25-
<param index="1" name="args" type="Array" />
24+
<argument index="0" name="name" type="String" />
25+
<argument index="1" name="args" type="Array" />
2626
<description>
2727
Call an exported function of the instantiated Wasm module.
2828
The [code]args[/code] argument array must be provided even if no arguments are required.
@@ -31,7 +31,7 @@
3131
</method>
3232
<method name="global">
3333
<return type="Variant" />
34-
<param index="0" name="name" type="String" />
34+
<argument index="0" name="name" type="String" />
3535
<description>
3636
Access an exported global of the instantiated Wasm module.
3737
Returns either a single float or integer.
@@ -46,7 +46,7 @@
4646
</method>
4747
<method name="instantiate">
4848
<return type="int" enum="Error" />
49-
<param index="0" name="import_map" type="Dictionary" />
49+
<argument index="0" name="import_map" type="Dictionary" />
5050
<description>
5151
Instantiate a compiled Wasm module.
5252
Before this can be called, the module must be compiled via [method compile].
@@ -57,8 +57,8 @@
5757
</method>
5858
<method name="load">
5959
<return type="int" enum="Error" />
60-
<param index="0" name="bytecode" type="PackedByteArray" />
61-
<param index="1" name="import_map" type="Dictionary" />
60+
<argument index="0" name="bytecode" type="PoolByteArray" />
61+
<argument index="1" name="import_map" type="Dictionary" />
6262
<description>
6363
Compile and instantiate a Wasm module in a single step.
6464
Equivalent to calling [method compile] and [method instantiate].

doc_classes/WasmMemory.xml

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
2-
<class name="WasmMemory" inherits="StreamPeer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
2+
<class name="WasmMemory" inherits="StreamPeer" version="3.6" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
33
<brief_description>
44
A [StreamPeer] interface for interacting with the memory of an instantiated Wasm module.
55
</brief_description>
@@ -16,26 +16,9 @@
1616
Can be set using [method seek].
1717
</description>
1818
</method>
19-
<method name="inspect">
20-
<return type="Dictionary" />
21-
<description>
22-
Inspect the minimum, maximum, and current memory sizes.
23-
</description>
24-
</method>
25-
<method name="grow">
26-
<return type="int" enum="Error" />
27-
<param index="0" name="pages" type="int" />
28-
<description>
29-
Grow the memory by a number of pages.
30-
Per WebAssembly specifications, each memory page is 65536 bytes.
31-
Memory can be created by an instantiated Wasm module or created externally to be used as a module import.
32-
External memory must be grown before being used as a module import.
33-
Allocated memory can not be decreased i.e. grown by a negative number of pages.
34-
</description>
35-
</method>
3619
<method name="seek">
3720
<return type="WasmMemory" />
38-
<param index="0" name="p_pos" type="int" />
21+
<argument index="0" name="p_pos" type="int" />
3922
<description>
4023
Set the memory offset of the [StreamPeer].
4124
Values will be read from and written to this position.

0 commit comments

Comments
 (0)