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

JS Backend generates invalid assignments on LHS #11331

Closed
dom96 opened this issue May 25, 2019 · 0 comments · Fixed by #14158
Closed

JS Backend generates invalid assignments on LHS #11331

dom96 opened this issue May 25, 2019 · 0 comments · Fixed by #14158

Comments

@dom96
Copy link
Contributor

dom96 commented May 25, 2019

Don't have a small example, but hopefully someone can repro:

game.particleAdjustments[id].sizeDelta += -sizeDiff

generates:

(Tmp15 = (Tmp14 = HEX5BHEX5D_346700(game_366300.sim.particles, id_370614), Tmp14)[0][Tmp14[1]].size, Tmp15) = addInt(Tmp15, size_diff_370622);

Expanding it does fix the problem:

game.particleAdjustments[id].sizeDelta =
      game.particleAdjustments[id].sizeDelta - sizeDiff
Araq pushed a commit that referenced this issue Apr 29, 2020
* many bugfixes for js

fixes #12672, fixes #14153, closes #14123, closes #11331, fixes #11783, fixes #13966, fixes #14087, fixes #14117, closes #12256.

mostly fixes the fact that it was allowed to assign to newly created temp variables. additionally attempts to get rid of null initialized seqs/strings (though they might pop up here and there); this simplifies a lot of things and makes code size smaller. even if null seqs/strings pop up here and there it's still better than all those bugs existing.

* formatting fixes

* CI fixes

* more CI fixes
EchoPouet pushed a commit to EchoPouet/Nim that referenced this issue Jun 13, 2020
* many bugfixes for js

fixes nim-lang#12672, fixes nim-lang#14153, closes nim-lang#14123, closes nim-lang#11331, fixes nim-lang#11783, fixes nim-lang#13966, fixes nim-lang#14087, fixes nim-lang#14117, closes nim-lang#12256.

mostly fixes the fact that it was allowed to assign to newly created temp variables. additionally attempts to get rid of null initialized seqs/strings (though they might pop up here and there); this simplifies a lot of things and makes code size smaller. even if null seqs/strings pop up here and there it's still better than all those bugs existing.

* formatting fixes

* CI fixes

* more CI fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant