Webassembly only know i16 and not u16.

This commit is contained in:
Volker Berlin 2021-01-03 14:52:19 +01:00
parent 536fe8385f
commit 2e3b1fc311

View File

@ -322,7 +322,8 @@ public class TextModuleWriter extends ModuleWriter {
*/
private void writeTypeName( Appendable output, AnyType type ) throws IOException {
if( !type.isRefType() ) {
output.append( type.toString() );
String name = type == ValueType.u16 ? "i16" : type.toString();
output.append( name );
} else if( options.useGC() ) {
//output.append( ValueType.eqref.toString() );
output.append( "(ref null " ).append( normalizeName( type.toString() ) ).append( ')' );