mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-15 02:44:47 +01:00
only set a function index if method is used
This commit is contained in:
parent
4b581dd969
commit
ee5b3ce326
@ -494,7 +494,9 @@ public class TypeManager {
|
||||
// if a new needed method then add it
|
||||
methods.add( funcName );
|
||||
}
|
||||
functions.setFunctionIndex( funcName, idx + VTABLE_FIRST_FUNCTION_INDEX );
|
||||
if( idx < methods.size() ) {
|
||||
functions.setFunctionIndex( funcName, idx + VTABLE_FIRST_FUNCTION_INDEX );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -564,7 +566,10 @@ public class TypeManager {
|
||||
* @param getFunctionsID
|
||||
* source for function IDs
|
||||
* @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 {
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user