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

[Compiler+VM PoC] Refactor instruction encoding/decoding #3714

Merged
merged 5 commits into from
Dec 12, 2024

Conversation

turbolent
Copy link
Member

Description

  • Introduce an Instruction interface and define concrete types for all instructions
  • Refactor the encoding functions to use the instruction type as an input (receiver)
  • Refactor the decoding functions to output the instruction types
  • Refactor the printing function into separate methods on the instruction types
  • Refactor the compiler to emit instruction types
  • Add a code gen that gathers the emitted instructions as-is, without encoding them to bytecode

  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@turbolent turbolent requested a review from jsproz December 11, 2024 23:25
@turbolent turbolent self-assigned this Dec 11, 2024
@turbolent turbolent requested a review from SupunS as a code owner December 11, 2024 23:25
Copy link
Member

@SupunS SupunS left a comment

Choose a reason for hiding this comment

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

👌

bbq/opcode/emit.go Outdated Show resolved Hide resolved
@turbolent turbolent merged commit 4a7a40a into supun/vm-cadence-1.0 Dec 12, 2024
@turbolent turbolent deleted the bastian/refactor-instruction-decoding branch December 12, 2024 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants