Skip to content

Commit

Permalink
toString() for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Horcrux7 committed Jun 5, 2022
1 parent 56f46fc commit 3d5543f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/de/inetsoftware/jwebassembly/module/WasmStructInstruction.java
Original file line number Diff line number Diff line change
Expand Up @@ -321,4 +321,18 @@ AnyType[] getPopValueTypes() {
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();
}
}

0 comments on commit 3d5543f

Please sign in to comment.