-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 #16771 (swap js); improve tsystem_misc.nim; test in js too #16778
Conversation
This is a hack/workaround, instead |
how so? What are benefits of |
Then please use a temporary instead of this approach; related: https://web.archive.org/web/20151229220921/http://jsperf.com/swap-array-vs-variable/34 |
Instead of adding more hacks to poor |
This comment was marked as outdated.
This comment was marked as outdated.
Well without a corresponding bugfix for vmgen, nobody knows how many hacks it involves. |
the remaining vm issue (2nd half of #16779) is a separate pre-existing issue, and fixing jsgen.genSwap instead of the (simpler) approach I took here would not have helped with that VM bug. This PR fixes 2 issues (and simplifies js code), so IMO is a net improvement; future work can fix the remaining vm issue which will probably involve unrelated code changes. |
So we need to fix both vmgen and jsgen without hacks. I fail to see the disadvantage, still better than a hack inside system.nim that stays for good. |
No activity, closing. Sorry. |
Succeeded by #23473 |
swap
silently broken for objects inside functions (js target) #16771future work
lists
(RFC #303) #16536(EDIT) links