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

Compound bugfix #96

Merged
merged 3 commits into from
Jun 5, 2023
Merged

Conversation

arichard4
Copy link

Fix for #93

This does fix the repro case I found, and it seems technically better. That said, the failure case was extremely basic, so I'm still a bit concerned; but this is definitely an improvement. Changes:
(1) Most places that check against "Set" also need to check against "OpSet"
(1a) When I changed set_variables to check OpSet too, I need to make it note that OpSet also accesses the variable's original value
(1b) This is fine, it won't improperly detect accesses because the later circular reference checker will filter them out... except the circular reference was improperly not detecting OpSet's as circular.
(2) I changed the representation of the OpSet node produced by the parser to match the Set node, such that they can be used by shared code. In particular, OpSet now passes out the lhs/rhs as tables of values rather than single values, even though OpSet doesn't support multiple assignment. Also, I changed the order from {operator, lhs, rhs} to {lhs, rhs, operator} to allow using OpSet nodes wherever Set nodes are used. (Set nodes are {lhs, rhs}.)

I still don't have access to a large crashing codebase, thus the lack of confidence. The first few repos I tested this on, e.g. https://github.com/NobleRobot/NobleEngine, didn't crash even under the previous version.

…at checks against Set also check against OpSet, (2) makes OpSet have the same format (lhs and rhs are tables of assignments, same over node order with the operator on the end) as Set so that it's usable where Set is used
@arichard4 arichard4 merged commit f7712ed into lunarmodules:master Jun 5, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants