fix: wrong index calculation
This commit is contained in:
@@ -39,7 +39,7 @@ public final class VariableIndex {
|
|||||||
}
|
}
|
||||||
public final Instruction toSet(boolean keep) {
|
public final Instruction toSet(boolean keep) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case CAPTURES: return Instruction.storeVar(index, keep, false);
|
case CAPTURES: return Instruction.storeVar(~index, keep, false);
|
||||||
case CAPTURABLES: return Instruction.storeVar(index, keep, false);
|
case CAPTURABLES: return Instruction.storeVar(index, keep, false);
|
||||||
case LOCALS: return Instruction.storeVar(index, keep, false);
|
case LOCALS: return Instruction.storeVar(index, keep, false);
|
||||||
default: throw new UnsupportedOperationException("Unknown index type " + type);
|
default: throw new UnsupportedOperationException("Unknown index type " + type);
|
||||||
|
|||||||
Reference in New Issue
Block a user