Skip to content

Commit

Permalink
Fix bug in Sista bytecode decoder
Browse files Browse the repository at this point in the history
Add missing number of extension bytes to relevant bytecode nodes.
  • Loading branch information
fniephaus committed Dec 22, 2023
1 parent 987da07 commit 6e01aa2
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,11 @@ yield switch (primitiveIndex) {
default -> new MiscellaneousBytecodes.UnknownBytecodeNode(code, index, 3, b);
};
}
case 0xF9 -> PushBytecodes.AbstractPushFullClosureNode.createExtended(code, index, 3, extA, bytecode[indexWithExt + 1], bytecode[indexWithExt + 2]);
case 0xF9 -> PushBytecodes.AbstractPushFullClosureNode.createExtended(code, index, 3 + extBytes, extA, bytecode[indexWithExt + 1], bytecode[indexWithExt + 2]);
case 0xFA -> PushBytecodes.PushClosureNode.createExtended(code, index, 3 + extBytes, extA, extB, bytecode[indexWithExt + 1], bytecode[indexWithExt + 2]);
case 0xFB -> PushBytecodes.PushRemoteTempNode.create(code, index, 3, bytecode[indexWithExt + 1], bytecode[indexWithExt + 2]);
case 0xFC -> new StoreBytecodes.StoreIntoRemoteTempNode(code, index, 3, bytecode[indexWithExt + 1], bytecode[indexWithExt + 2]);
case 0xFD -> new StoreBytecodes.PopIntoRemoteTempNode(code, index, 3, bytecode[indexWithExt + 1], bytecode[indexWithExt + 2]);
case 0xFB -> PushBytecodes.PushRemoteTempNode.create(code, index, 3 + extBytes, bytecode[indexWithExt + 1], bytecode[indexWithExt + 2]);
case 0xFC -> new StoreBytecodes.StoreIntoRemoteTempNode(code, index, 3 + extBytes, bytecode[indexWithExt + 1], bytecode[indexWithExt + 2]);
case 0xFD -> new StoreBytecodes.PopIntoRemoteTempNode(code, index, 3 + extBytes, bytecode[indexWithExt + 1], bytecode[indexWithExt + 2]);
case 0xFE, 0xFF -> new MiscellaneousBytecodes.UnknownBytecodeNode(code, index, 3, b);
default -> throw SqueakException.create("Not a bytecode:", b);
};
Expand Down

0 comments on commit 6e01aa2

Please sign in to comment.