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

Program serialization updates #1442

Merged
merged 6 commits into from
Aug 11, 2024
Merged

Program serialization updates #1442

merged 6 commits into from
Aug 11, 2024

Conversation

bobbinth
Copy link
Contributor

This PR consists of two main changes:

  • Adds ability to serialize the Program struct (this is needed in miden-base). As a part of this change AstSerdeOptions::serialize_imports was removed as it is no longer relevant.
  • Removes serialization of all AST-related structs. This is a much bigger change. From what I can tell, it should be fine - but want to make sure this is not used somehow in the compiler.

As a part of the second change, I also removed ability to serialize libraries "with options" (and as a result, removed AstSerdeOptions struct entirely). I think this is fine as the only option there was whether we want to serialize debug info or not, but this part wasn't really working anyways (e.g., it didn't affect how AsmOp decorators are serialized) and I also think we should rework debug info serialization as discussed in #1440.

@bobbinth bobbinth requested review from bitwalker and plafer August 10, 2024 09:42
Copy link
Contributor

@bitwalker bitwalker left a comment

Choose a reason for hiding this comment

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

The compiler doesn't need to encode the AST in binary form for anything at the moment, so that should be fine - the key thing is preserving the encoding of source locations in MAST as we evolve how debuginfo is handled. This PR doesn't change that, so I don't see any issues with removing all of this code.

@bobbinth bobbinth merged commit 9dd4cd6 into next Aug 11, 2024
9 checks passed
@bobbinth bobbinth deleted the bobbin-ast-serde branch August 11, 2024 01:19
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.

2 participants