mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 23:47:51 +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 javax.annotation.Nullable;
|
||||||
|
|
||||||
import de.inetsoftware.classparser.MethodInfo;
|
import de.inetsoftware.classparser.MethodInfo;
|
||||||
|
import de.inetsoftware.jwebassembly.JWebAssembly;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manage the required function/methods
|
* Manage the required function/methods
|
||||||
@ -256,7 +257,10 @@ public class FunctionManager {
|
|||||||
* the new implementation
|
* the new implementation
|
||||||
*/
|
*/
|
||||||
void addReplacement( FunctionName name, MethodInfo method ) {
|
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