Skip to content
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

refactor(jump-processing): simplifies the jump encoding! much better #282

Merged
merged 2 commits into from
Mar 13, 2023

Conversation

Alexangelj
Copy link
Contributor

Description

  • Changes jump encoding to be much more simple. All instructions have their respective length's added in front of the instruction data, which is then serialized as a single bytes array via bytes().concat. Decoding requires an accumulator, which we call the "pointer" to sum the starting index with the length of the next instruction to get to the next index that holds the next next instruction's length data.
  • Adds a jump decoding function to make it easier to decode!

@Alexangelj Alexangelj marked this pull request as ready for review March 13, 2023 20:07
@Alexangelj Alexangelj merged commit 64efc43 into main Mar 13, 2023
@Alexangelj Alexangelj deleted the fix/jump-encoding branch March 15, 2023 03:17
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.

1 participant