Skip to content

Commit

Permalink
fix merging outputLocals when they are the same Local
Browse files Browse the repository at this point in the history
  • Loading branch information
swissiety committed Dec 22, 2023
1 parent bc81639 commit d453781
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ final class OperandMerging {
void mergeOutput(@Nonnull Operand outputOperand) {
if (output == null) {
output = outputOperand;
} else {
if (output.stackLocal != null) {
assert outputOperand.stackLocal == null;
outputOperand.changeStackLocal(output.stackLocal);
} else if (output.stackLocal != null) {
if (output.stackLocal != outputOperand.stackLocal && outputOperand.stackLocal != null) {
throw new IllegalStateException("Incompatible StackLocals. There already exists more than one StackLocal (" + outputOperand.stackLocal + " != " + output.stackLocal+").");
}
outputOperand.changeStackLocal(output.stackLocal);
}
}

Expand Down

0 comments on commit d453781

Please sign in to comment.