-
-
Notifications
You must be signed in to change notification settings - Fork 656
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] analyzer-optimize can re-order api (extern) calls what can cause a mess #9943
Comments
This happens because both I think we need to support |
Maybe even with support for separate get and set purity setting, because also in DOM API there is some "interesting" tricks to trigger layout recalculation by reading some specific fields. |
Not sure how to express that though. I think it's fair to be pessimistic in such cases and just consider both access kinds impure. |
IMHO access to external fields should always considered as impure by default. |
Haxe ver: 4.1.4, 3.4.4
Sample code:
https://try.haxe.org/index.php#8888E
Bad result with analyzer-optimize:
a=10, h=10, m=10
Part of js code:
Good result w/o analyzer-optimize:
a=14, h=18, m=10
Part of js code:
The text was updated successfully, but these errors were encountered: