Class ReplacementForArray
- java.lang.Object
-
- de.inetsoftware.jwebassembly.module.nativecode.ReplacementForArray
-
public class ReplacementForArray extends java.lang.Object
Replacement for java.lang.reflect.Array
-
-
Constructor Summary
Constructors Constructor Description ReplacementForArray()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static int
array_getLength(java.lang.Object obj)
Replacement of the native Java methods Array.getLength(x)private static java.lang.Object
array_newInstance(ReplacementForClass<?> componentClass, int length)
Replacement of the native Java methods Array.newInstance(c,l)private static int
getIntFromMemory(int pos)
WASM codeprivate static int
getVTable(java.lang.Object obj)
get the vtable value
-
-
-
Method Detail
-
getVTable
private static int getVTable(java.lang.Object obj)
get the vtable value- Parameters:
obj
- the instance- Returns:
- the vtable value
-
getIntFromMemory
private static int getIntFromMemory(int pos)
WASM codeLoad an i32 from memory. The offset must be aligned. Should be inlined from the optimizer.
- Parameters:
pos
- the memory position- Returns:
- the value from the memory
-
array_getLength
private static int array_getLength(java.lang.Object obj)
Replacement of the native Java methods Array.getLength(x)- Parameters:
obj
- the object- Returns:
- the length of the object
-
array_newInstance
private static java.lang.Object array_newInstance(ReplacementForClass<?> componentClass, int length)
Replacement of the native Java methods Array.newInstance(c,l)- Parameters:
obj
- the object- Returns:
- the length of the object
-
-