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

Fix three issues related to deepcopying elements #1446

Merged
merged 5 commits into from
Nov 27, 2023
Merged

Conversation

tbennun
Copy link
Collaborator

@tbennun tbennun commented Nov 25, 2023

This PR fixes #1439 and #1443 by adapting fields and the deepcopy operation for states:

  1. Skips derived field parent being set if a state is deepcopied on its own
  2. Does not add a new field to AST nodes during preprocessing. That parent-pointing field outlives preprocessing and ends up copying the entire original AST for short codeblocks.
  3. Does not add a new field to states during state propagation.

Copy link
Collaborator

@phschaad phschaad left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@tbennun tbennun enabled auto-merge (squash) November 27, 2023 14:58
@tbennun tbennun changed the title Fix two issues related to deepcopying elements Fix three issues related to deepcopying elements Nov 27, 2023
@tbennun tbennun merged commit 4b5e2c2 into master Nov 27, 2023
11 checks passed
@tbennun tbennun deleted the ast-deepcopy-fix branch November 27, 2023 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants