mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-15 10:44:47 +01:00
write memory/data section also with nonGC polyfill
This commit is contained in:
parent
c8e8c09a8e
commit
6ddf5b1c85
@ -458,6 +458,10 @@ public class BinaryModuleWriter extends ModuleWriter implements InstructionOpcod
|
||||
dataStream.write( functIdx >>> 24 );
|
||||
}
|
||||
|
||||
if( !options.useGC() ) {
|
||||
return ValueType.anyref.getCode();
|
||||
}
|
||||
|
||||
int typeId = functionTypes.size();
|
||||
functionTypes.add( new StructTypeEntry( type.getFields() ) );
|
||||
return typeId;
|
||||
|
@ -207,7 +207,7 @@ public class TypeManager {
|
||||
methods = new ArrayList<>();
|
||||
HashSet<String> allNeededFields = new HashSet<>();
|
||||
listStructFields( name, functions, types, libraries, allNeededFields );
|
||||
code = types.options.useGC() ? writer.writeStructType( this ) : ValueType.anyref.getCode();
|
||||
code = writer.writeStructType( this );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -180,6 +180,10 @@ public class TextModuleWriter extends ModuleWriter {
|
||||
dataStream.write( functIdx >>> 24 );
|
||||
}
|
||||
|
||||
if( !options.useGC() ) {
|
||||
return ValueType.anyref.getCode();
|
||||
}
|
||||
|
||||
int oldInset = inset;
|
||||
inset = 1;
|
||||
newline( output );
|
||||
|
Loading…
x
Reference in New Issue
Block a user