Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Node from stream backrefs optimisation #532
base: main
Are you sure you want to change the base?
Node from stream backrefs optimisation #532
Changes from 45 commits
438e2df
fdeef9f
bdeea87
a9b3351
47e41b8
5d38c06
99b0c1d
ddceeba
8060a47
d394e0b
f8f1e08
de2b748
3d35f09
5231929
791030b
675ab2c
982498f
3b86c79
423dd73
64340f1
bd93d2a
49e26e2
25cf07c
d322960
fcc634e
8b31b55
55085d0
e7bb047
9e96280
880d7f6
97f6f0f
0ce9f50
31e4fb4
b2946db
1ef2bc7
14d1de5
c469103
d3986f9
e7a8b5c
864ef16
d6d8cd4
0a00f77
85a9785
e8f3f2a
1a30940
1f790fe
e2fed6c
eb9f678
62c4a82
c6a4071
55cdb7f
437f493
08dd203
948712f
11ad810
90bb3de
bf09050
24abb5a
11fb7f6
a82e47f
e1d0b32
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need this step. Also, you may loose interesting cases by "filtering" the tree when you re-encode it. It won't necessarily round-trip.
Is there a good reason to do this rather than using
data
directly?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a pretty big function for not having a unit test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a unit test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you explore making this two loops, one for the
Vec
stack and one for traversing theSExp
tree?I think it would be easier to follow. partly because you wouldn't need two loop bodies separated by the
parsing_sexp
check. It would also place the tail of this function in between those loops. If we exit after having pointed to a stack node