mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 07:27:52 +01:00
Use the GC type for strings and classes table.
This commit is contained in:
parent
2e3b1fc311
commit
672aca29a7
@ -154,14 +154,16 @@ public class TextModuleWriter extends ModuleWriter {
|
|||||||
textOutput.append( "(table $functions 0 funcref)" );
|
textOutput.append( "(table $functions 0 funcref)" );
|
||||||
}
|
}
|
||||||
newline( textOutput );
|
newline( textOutput );
|
||||||
textOutput.append( "(table $strings " ).append( Integer.toString( stringCount ) ).append( " externref)" );
|
String tableTypeName = options.useGC() && types.contains( "java/lang/String" ) ? "$java/lang/String" : "externref";
|
||||||
|
textOutput.append( "(table $strings " ).append( Integer.toString( stringCount ) ).append( ' ' ).append( tableTypeName ).append( ')' );
|
||||||
}
|
}
|
||||||
|
|
||||||
// table with classes
|
// table with classes
|
||||||
int typeCount = options.types.size();
|
int typeCount = options.types.size();
|
||||||
if( typeCount > 0 ) {
|
if( typeCount > 0 ) {
|
||||||
newline( textOutput );
|
newline( textOutput );
|
||||||
textOutput.append( "(table $classes " ).append( Integer.toString( typeCount ) ).append( " externref)" );
|
String tableTypeName = options.useGC() && types.contains( "java/lang/Class" ) ? "$java/lang/Class" : "externref";
|
||||||
|
textOutput.append( "(table $classes " ).append( Integer.toString( typeCount ) ).append( ' ' ).append( tableTypeName ).append( ')' );
|
||||||
}
|
}
|
||||||
|
|
||||||
int dataSize = dataStream.size();
|
int dataSize = dataStream.size();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user