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() ) { if( options.useGC() ) {
instructions.add( new WasmArrayInstruction( op, type, types, javaCodePos, lineNumber ) ); instructions.add( new WasmArrayInstruction( op, type, types, javaCodePos, lineNumber ) );
} else { } else {
if( type.getCode() >= 0 ) { if( type.getCode() >= 0 || type.getCode() == ValueType.anyref.getCode() ) {
type = ValueType.anyref; type = ValueType.anyref; // handle all not native types as anyref
} }
String api = "array_" + op.toString().toLowerCase() + "_" + type; String api = "array_" + op.toString().toLowerCase() + "_" + type;
FunctionName name = getNonGC( api, lineNumber ); FunctionName name = getNonGC( api, lineNumber );