toString() for debugging

This commit is contained in:
Volker Berlin 2022-06-05 19:16:33 +02:00
parent 56f46fcbe6
commit 3d5543fa38
No known key found for this signature in database
GPG Key ID: 988423EF815BE4CB

View File

@ -321,4 +321,18 @@ class WasmStructInstruction extends WasmInstruction {
throw new WasmException( "Unknown array operation: " + op, -1 );
}
}
/**
* Only used for debugging
*/
@Override
public String toString() {
switch( op ) {
case GET:
return "struct.get " + fieldName.getName();
case SET:
return "struct.set " + fieldName.getName();
}
return super.toString();
}
}