A generated function to be added to an adapter module. At least one function is created per-adapter and depending on the type hierarchy multiple functions may be generated per-adapter.
| 945 | /// At least one function is created per-adapter and depending on the type |
| 946 | /// hierarchy multiple functions may be generated per-adapter. |
| 947 | struct Function { |
| 948 | /// Whether or not the `body` has been finished. |
| 949 | /// |
| 950 | /// Functions are added to a `Module` before they're defined so this is used |
| 951 | /// to assert that the function was in fact actually filled in by the |
| 952 | /// time we reach `Module::encode`. |
| 953 | filled_in: bool, |
| 954 | |
| 955 | /// The type signature that this function has, as an index into the core |
| 956 | /// wasm type index space of the generated adapter module. |
| 957 | ty: u32, |
| 958 | |
| 959 | /// The locals that are used by this function, organized by the number of |
| 960 | /// types of each local. |
| 961 | locals: Vec<(u32, ValType)>, |
| 962 | |
| 963 | /// If specified, the export name of this function. |
| 964 | export: Option<String>, |
| 965 | |
| 966 | /// The contents of the function. |
| 967 | /// |
| 968 | /// See `Body` for more information, and the `Vec` here represents the |
| 969 | /// concatenation of all the `Body` fragments. |
| 970 | body: Vec<Body>, |
| 971 | } |
| 972 | |
| 973 | /// Representation of a fragment of the body of a core wasm function generated |
| 974 | /// for adapters. |
no outgoing calls
no test coverage detected