Closed GraxCode closed 3 years ago
Modifying instructions can only be done via swapping it out with the applicable methods in MutableMethodImplementation. (e.g. swapInstruction). This ensures the state in MutableMethodImplementation can be kept up to date when an instruction changes.
It makes sense that ImmutableInstructions are not changeable, but the fields of BuilderInstructions retrieved from a MutableMethodImplementation should be editable. This would allow an easier editor implementation instead of recreating a BuilderInstruction object each time.