mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-15 02:44:47 +01:00
Add a field for the HashCode to any object.
This commit is contained in:
parent
83188e87e6
commit
853ee503e7
@ -52,6 +52,11 @@ public class TypeManager {
|
||||
/** name of virtual function table, start with a point for an invalid Java identifier */
|
||||
static final String VTABLE = ".vtable";
|
||||
|
||||
/**
|
||||
* Name of field with system hash code, start with a point for an invalid Java identifier.
|
||||
*/
|
||||
static final String HASHCODE = ".hashcode";
|
||||
|
||||
/**
|
||||
* The reserved position on start of the vtable:
|
||||
* <li>offset of interface call table (itable)
|
||||
@ -339,6 +344,7 @@ public class TypeManager {
|
||||
listStructFields( superClassName, functions, types, classFileLoader, allNeededFields );
|
||||
} else {
|
||||
fields.add( new NamedStorageType( ValueType.i32, className, VTABLE ) );
|
||||
fields.add( new NamedStorageType( ValueType.i32, className, HASHCODE ) );
|
||||
}
|
||||
|
||||
for( FieldInfo field : classFile.getFields() ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user