News for hackers. Stuff that matters.
Re:Porffor: A from-scratch ahead-of-time JS engine by cowsandmilk on Wednesday July 31, 2024 @05:43AM (#41117663)
JavaScript doesn’t make the guarantee you are claiming here
Re:Porffor: A from-scratch ahead-of-time JS engine by fwip on Wednesday July 31, 2024 @10:00AM (#41119239)
What do you mean? Does JavaScript allow the `then` of a promise to execute before the contents of the promise?
Re:Porffor: A from-scratch ahead-of-time JS engine by jitl on Wednesday July 31, 2024 @11:36AM (#41120126)
Yes, it does. Promise continuations always run in the micro task queue per the standard. I guess if someone mutates the promise prototype it’s not guaranteed, but the spec does guarantee this order