Class MultiArrayFunctionName
- java.lang.Object
-
- de.inetsoftware.jwebassembly.module.FunctionName
-
- de.inetsoftware.jwebassembly.module.SyntheticFunctionName
-
- de.inetsoftware.jwebassembly.module.ArraySyntheticFunctionName
-
- de.inetsoftware.jwebassembly.module.WatCodeSyntheticFunctionName
-
- de.inetsoftware.jwebassembly.module.MultiArrayFunctionName
-
public class MultiArrayFunctionName extends WatCodeSyntheticFunctionName
Synthetic functions for creating multidimensional dimensional arrays
-
-
Field Summary
Fields Modifier and Type Field Description private int
dim
private ArrayType
type
-
Fields inherited from class de.inetsoftware.jwebassembly.module.FunctionName
className, fullName, methodName, signature, signatureName
-
-
Constructor Summary
Constructors Constructor Description MultiArrayFunctionName(int dim, ArrayType type)
Create a new instance
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.lang.String
createName(int dim, ArrayType type)
Create the unique name depends on dimension and typeprivate static AnyType[]
createSignature(int dim, ArrayType type)
Create the signature of the function.protected WasmCodeBuilder
getCodeBuilder(WatParser watParser)
Get the WasmCodeBuilder for the synthetic WASM code.private static ValueType
getElementType(ArrayType type)
The element type of the array-
Methods inherited from class de.inetsoftware.jwebassembly.module.WatCodeSyntheticFunctionName
getCode, hasWasmCode
-
Methods inherited from class de.inetsoftware.jwebassembly.module.ArraySyntheticFunctionName
getSignature
-
Methods inherited from class de.inetsoftware.jwebassembly.module.SyntheticFunctionName
getAnnotation, istStatic
-
Methods inherited from class de.inetsoftware.jwebassembly.module.FunctionName
equals, hashCode
-
-
-
-
Field Detail
-
dim
private int dim
-
type
private ArrayType type
-
-
Constructor Detail
-
MultiArrayFunctionName
MultiArrayFunctionName(int dim, ArrayType type)
Create a new instance- Parameters:
dim
- the count of dimensions, should be >= 2type
- the full type of the allocated array
-
-
Method Detail
-
getElementType
private static ValueType getElementType(ArrayType type)
The element type of the array- Parameters:
type
- the full type of the allocated array- Returns:
- the element type
-
createName
private static java.lang.String createName(int dim, ArrayType type)
Create the unique name depends on dimension and type- Parameters:
dim
- the dimensiontype
- the full type of the allocated array- Returns:
- the name
-
createSignature
private static AnyType[] createSignature(int dim, ArrayType type)
Create the signature of the function.- Parameters:
dim
- the dimensiontype
- the full type of the allocated array- Returns:
- the signature
-
getCodeBuilder
protected WasmCodeBuilder getCodeBuilder(WatParser watParser)
Get the WasmCodeBuilder for the synthetic WASM code.- Overrides:
getCodeBuilder
in classWatCodeSyntheticFunctionName
- Parameters:
watParser
- a helping WatParser- Returns:
- the code
-
-