mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-15 02:44:47 +01:00
improvements for getComponentType()
This commit is contained in:
parent
a0d56ddcc3
commit
56c38bbc63
@ -69,16 +69,22 @@ public class TypeManager {
|
||||
static final int TYPE_DESCRIPTION_INSTANCEOF_OFFSET = 4;
|
||||
|
||||
/**
|
||||
* Byte position in the type description that contains the offset to class name idx. Length 4 bytes.
|
||||
* Byte position in the type description that contains the offset to class name idx in the string constant table. Length 4 bytes.
|
||||
*/
|
||||
static final int TYPE_DESCRIPTION_TYPE_NAME = 8;
|
||||
|
||||
/**
|
||||
* Byte position in the type description that contains the type of the array (component type). Length 4 bytes.
|
||||
*/
|
||||
static final int TYPE_DESCRIPTION_ARRAY_TYPE = 12;
|
||||
|
||||
/**
|
||||
* The reserved position on start of the vtable:
|
||||
* <li>offset of interface call table (itable)
|
||||
* <li>offset of instanceof list
|
||||
* <li>offset of class name idx in the string constant table
|
||||
*/
|
||||
private static final int VTABLE_FIRST_FUNCTION_INDEX = 3;
|
||||
private static final int VTABLE_FIRST_FUNCTION_INDEX = 4;
|
||||
|
||||
private static final FunctionName CLASS_CONSTANT_FUNCTION = new FunctionName( "java/lang/Class.classConstant(I)Ljava/lang/Class;" );
|
||||
|
||||
@ -833,6 +839,9 @@ public class TypeManager {
|
||||
// header position TYPE_DESCRIPTION_TYPE_NAME
|
||||
header.writeInt32( classNameIdx ); // string id of the className
|
||||
|
||||
// header position TYPE_DESCRIPTION_ARRAY_TYPE
|
||||
header.writeInt32( -1 );
|
||||
|
||||
data.writeTo( dataStream );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user