|
1 | 1 | <?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"> |
3 | 3 | <brief_description> |
4 | 4 | An instance of a Wasm module. |
5 | 5 | Before being able to be used, the module must be compiled and instantiated. |
|
13 | 13 | <methods> |
14 | 14 | <method name="compile"> |
15 | 15 | <return type="int" enum="Error" /> |
16 | | - <param index="0" name="bytecode" type="PackedByteArray" /> |
| 16 | + <argument index="0" name="bytecode" type="PoolByteArray" /> |
17 | 17 | <description> |
18 | 18 | Compile the Wasm module provided Wasm binary [code]bytecode[/code]. |
19 | 19 | This must be called before instantiating the module. Alternatively, the module can be compiled and instantiated in a single step with [method load]. |
20 | 20 | </description> |
21 | 21 | </method> |
22 | 22 | <method name="function"> |
23 | 23 | <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" /> |
26 | 26 | <description> |
27 | 27 | Call an exported function of the instantiated Wasm module. |
28 | 28 | The [code]args[/code] argument array must be provided even if no arguments are required. |
|
31 | 31 | </method> |
32 | 32 | <method name="global"> |
33 | 33 | <return type="Variant" /> |
34 | | - <param index="0" name="name" type="String" /> |
| 34 | + <argument index="0" name="name" type="String" /> |
35 | 35 | <description> |
36 | 36 | Access an exported global of the instantiated Wasm module. |
37 | 37 | Returns either a single float or integer. |
|
46 | 46 | </method> |
47 | 47 | <method name="instantiate"> |
48 | 48 | <return type="int" enum="Error" /> |
49 | | - <param index="0" name="import_map" type="Dictionary" /> |
| 49 | + <argument index="0" name="import_map" type="Dictionary" /> |
50 | 50 | <description> |
51 | 51 | Instantiate a compiled Wasm module. |
52 | 52 | Before this can be called, the module must be compiled via [method compile]. |
|
57 | 57 | </method> |
58 | 58 | <method name="load"> |
59 | 59 | <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" /> |
62 | 62 | <description> |
63 | 63 | Compile and instantiate a Wasm module in a single step. |
64 | 64 | Equivalent to calling [method compile] and [method instantiate]. |
|
0 commit comments