simplify cast like GC milestone 3

This commit is contained in:
Volker Berlin 2021-03-27 14:42:25 +01:00
parent 43ae520d5a
commit b755f6fd08
2 changed files with 4 additions and 3 deletions

View File

@ -1445,8 +1445,8 @@ public class BinaryModuleWriter extends ModuleWriter implements InstructionOpcod
break;
case CAST:
codeStream.writeOpCode( REF_CAST );
codeStream.writeValueType( options.types.valueOf( "java/lang/Object" ) );
codeStream.writeValueType( type );
// codeStream.writeValueType( options.types.valueOf( "java/lang/Object" ) );
// codeStream.writeValueType( type );
return;
default:
throw new Error( "Unknown operator: " + op );

View File

@ -954,7 +954,8 @@ public class TextModuleWriter extends ModuleWriter {
operation = "struct.new_with_rtt";
break;
case CAST:
operation = "ref.cast $java/lang/Object";
operation = "ref.cast";
type = null;
break;
default:
throw new Error( "Unknown operator: " + op );