mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-15 18:44:47 +01:00
ignore redefinition replacements
This commit is contained in:
parent
41d45af53d
commit
4f40976019
@ -26,6 +26,7 @@ import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import de.inetsoftware.classparser.MethodInfo;
|
||||
import de.inetsoftware.jwebassembly.JWebAssembly;
|
||||
|
||||
/**
|
||||
* Manage the required function/methods
|
||||
@ -256,7 +257,10 @@ public class FunctionManager {
|
||||
* the new implementation
|
||||
*/
|
||||
void addReplacement( FunctionName name, MethodInfo method ) {
|
||||
getOrCreate( name ).method = method;
|
||||
FunctionState state = getOrCreate( name );
|
||||
if( state.method == null ) { // ignore redefinition replacements and use the first instance in the library path
|
||||
state.method = method;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user