mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-15 02:44:47 +01:00
Scan also the types of used imports
This commit is contained in:
parent
11f338eea8
commit
b251141f45
@ -47,6 +47,7 @@ import de.inetsoftware.jwebassembly.wasm.FunctionType;
|
||||
import de.inetsoftware.jwebassembly.wasm.NamedStorageType;
|
||||
import de.inetsoftware.jwebassembly.wasm.StructOperator;
|
||||
import de.inetsoftware.jwebassembly.wasm.ValueType;
|
||||
import de.inetsoftware.jwebassembly.wasm.ValueTypeParser;
|
||||
import de.inetsoftware.jwebassembly.watparser.WatParser;
|
||||
|
||||
/**
|
||||
@ -512,7 +513,13 @@ public class ModuleGenerator {
|
||||
try {
|
||||
Map<String,Object> annotationValues;
|
||||
if( (annotationValues = method.getAnnotation( JWebAssembly.IMPORT_ANNOTATION )) != null ) {
|
||||
functions.markAsImport( new FunctionName( method ), annotationValues );
|
||||
FunctionName name = new FunctionName( method );
|
||||
functions.markAsImport( name, annotationValues );
|
||||
|
||||
// Scan also the types of used imports
|
||||
for( Iterator<AnyType> it = new ValueTypeParser( name.signature, types ); it.hasNext(); ) {
|
||||
it.next();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
code = method.getCode();
|
||||
|
Loading…
x
Reference in New Issue
Block a user