Skip to content

test: program invoking all OpCodes #1647

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Dec 14, 2024

Conversation

lorenzogentile404
Copy link
Collaborator

No description provided.

@lorenzogentile404 lorenzogentile404 linked an issue Dec 12, 2024 that may be closed by this pull request
private Bytes getAllOpCodesProgram() {
BytecodeCompiler program = BytecodeCompiler.newProgram();
for (OpCodeData opCodeData : opCodeToOpCodeDataMap.values()) {
if (opCodeData.instructionFamily() != InstructionFamily.HALT) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should also remove the JUMP family

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

}
program.op(opCode);
for (int i = 0; i < nPops; i++) {
program.op(OpCode.POP);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alpha is either 0 or 1. So the natural thing isn't a for loop, it's

if (opCodeData.stackSettings().alpha() != 0) program.op(OpCode.POP);

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@lorenzogentile404 lorenzogentile404 enabled auto-merge (squash) December 13, 2024 17:23
@OlivierBBB OlivierBBB self-requested a review December 14, 2024 04:03
@lorenzogentile404 lorenzogentile404 merged commit 417d7c8 into arith-dev Dec 14, 2024
7 checks passed
@lorenzogentile404 lorenzogentile404 deleted the 1646-test-program-invoking-all-opcodes branch December 14, 2024 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test: program invoking all OpCodes
2 participants