proof-systems
proof-systems copied to clipboard
Unify logic for increasing instruction pointer by 4
Given that this operation keeps happening over and over again, perhaps it makes sense to create a wrapper for it.
Originally posted by @querolita in https://github.com/o1-labs/proof-systems/pull/1365#discussion_r1411959202
When all of the instructions are in, we shouldn't even need a wrapper. The end of the each function can do
env.set_instruction_pointer(next_instruction_pointer.clone());
env.set_next_instruction_pointer(next_instruction_pointer + Env::constant(4));
and then any jump instruction can just do an early return to avoid that logic.