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 delta #2857

Closed
wants to merge 2 commits into from
Closed

Fix delta #2857

wants to merge 2 commits into from

Conversation

Denneisk
Copy link
Member

Fixes #2841

@Vurv78
Copy link
Contributor

Vurv78 commented Nov 15, 2023

This is not how you should go about fixing it. Delta vars should be initialized by the chip. Also need test cases

@Vurv78
Copy link
Contributor

Vurv78 commented Nov 15, 2023

Also is this not just reverting the behavior to the new compiler behavior? Which people still had issues with?

@Denneisk
Copy link
Member Author

Denneisk commented Nov 15, 2023

This is not how you should go about fixing it. Delta vars should be initialized by the chip.

I was referencing older commits to see what could have caused the change and didn't realize you had set up a different system in place for that.

Also is this not just reverting the behavior to the new compiler behavior? Which people still had issues with?

Is old functionality for $Var to initially be 0 or initially be current value?

Haha never mind I'm a bit clueless.

@Vurv78
Copy link
Contributor

Vurv78 commented Nov 15, 2023

I don't think the variables being initialized was the bug anyway, that would cause lua errors if so. I still haven't had the chance to look into it myself (on mobile)

end ---@cast ident Token # Know it isn't nil from above check

else ---@cast ident Token # Know it isn't nil from above check
if v[1] == "$" then self.delta_vars[ident.value] = true end
Copy link
Contributor

Choose a reason for hiding this comment

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

This behavior was moved from the parser to compiler. This shouldn't be fixing anything and if it is, whatever was depending on it should be moved to use the compiler's output

Copy link
Contributor

Choose a reason for hiding this comment

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

Was partially wrong about this part, kept it in the parser only because we still don't have an analyzer pass, and compiler needs to know if a variable is ever used with $ even before the $ operator is used.. think I'll just stick with the parser for now until I get to said analyzer..

@Vurv78
Copy link
Contributor

Vurv78 commented Nov 15, 2023

Think I'll just make my own PR so you don't have to make these changes. Also just fyi iirc regression tests are linked to issues not PRs.

@Denneisk
Copy link
Member Author

Right, well, if it's any help, the code executes in a way that delta_vars is accessed before it gets set.

Also just fyi iirc regression tests are linked to issues not PRs.

Thanks

@Denneisk Denneisk closed this Nov 15, 2023
@Denneisk Denneisk deleted the delta-fun branch April 14, 2024 05:33
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.

Tracking issue for old broken E2s: BFW / ALXPC
2 participants