fix non gc array operations

This commit is contained in:
Volker Berlin 2020-04-10 12:15:53 +02:00
parent 128ac19242
commit ea2a179161

View File

@ -636,8 +636,8 @@ public abstract class WasmCodeBuilder {
if( options.useGC() ) {
instructions.add( new WasmArrayInstruction( op, type, types, javaCodePos, lineNumber ) );
} else {
if( type.getCode() >= 0 ) {
type = ValueType.anyref;
if( type.getCode() >= 0 || type.getCode() == ValueType.anyref.getCode() ) {
type = ValueType.anyref; // handle all not native types as anyref
}
String api = "array_" + op.toString().toLowerCase() + "_" + type;
FunctionName name = getNonGC( api, lineNumber );