mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 23:47:51 +01:00
only set a function index if method is used
This commit is contained in:
parent
4b581dd969
commit
ee5b3ce326
@ -494,9 +494,11 @@ public class TypeManager {
|
|||||||
// if a new needed method then add it
|
// if a new needed method then add it
|
||||||
methods.add( funcName );
|
methods.add( funcName );
|
||||||
}
|
}
|
||||||
|
if( idx < methods.size() ) {
|
||||||
functions.setFunctionIndex( funcName, idx + VTABLE_FIRST_FUNCTION_INDEX );
|
functions.setFunctionIndex( funcName, idx + VTABLE_FIRST_FUNCTION_INDEX );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
@ -565,6 +567,9 @@ public class TypeManager {
|
|||||||
* source for function IDs
|
* source for function IDs
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* should never occur
|
* should never occur
|
||||||
|
* @see TypeManager#TYPE_DESCRIPTION_INTERFACE_OFFSET
|
||||||
|
* @see TypeManager#TYPE_DESCRIPTION_INSTANCEOF_OFFSET
|
||||||
|
* @see TypeManager#TYPE_DESCRIPTION_TYPE_NAME
|
||||||
*/
|
*/
|
||||||
public void writeToStream( ByteArrayOutputStream dataStream, ToIntFunction<FunctionName> getFunctionsID ) throws IOException {
|
public void writeToStream( ByteArrayOutputStream dataStream, ToIntFunction<FunctionName> getFunctionsID ) throws IOException {
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user