mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 07:27:52 +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 );
|
dataStream.write( functIdx >>> 24 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( !options.useGC() ) {
|
||||||
|
return ValueType.anyref.getCode();
|
||||||
|
}
|
||||||
|
|
||||||
int typeId = functionTypes.size();
|
int typeId = functionTypes.size();
|
||||||
functionTypes.add( new StructTypeEntry( type.getFields() ) );
|
functionTypes.add( new StructTypeEntry( type.getFields() ) );
|
||||||
return typeId;
|
return typeId;
|
||||||
|
@ -207,7 +207,7 @@ public class TypeManager {
|
|||||||
methods = new ArrayList<>();
|
methods = new ArrayList<>();
|
||||||
HashSet<String> allNeededFields = new HashSet<>();
|
HashSet<String> allNeededFields = new HashSet<>();
|
||||||
listStructFields( name, functions, types, libraries, allNeededFields );
|
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 );
|
dataStream.write( functIdx >>> 24 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( !options.useGC() ) {
|
||||||
|
return ValueType.anyref.getCode();
|
||||||
|
}
|
||||||
|
|
||||||
int oldInset = inset;
|
int oldInset = inset;
|
||||||
inset = 1;
|
inset = 1;
|
||||||
newline( output );
|
newline( output );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user