You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I assume this is a point that is known internally - but it wasn't in the issue log on Github. Currently Generator functions and async functions are always run only in the interpreter.
I stumbled upon this whilst working on #5834 there are a few TODOs and equivalent notes in comments about this all dating back to the initial GitHub commit 3 years ago.
I've tried to investigate how to fix this but I'm a bit out of my depth in the Jit code.
The text was updated successfully, but these errors were encountered:
I’m kind of curious myself what the concrete challenge for jitting here is - I suppose a big source of difficulty would be that the JIT in general assumes it can store local state on the stack but coroutines violate that assumption...
Basic JIT isn't trivial, but shouldn't be too hard. Optimizing well in the presence of generators is much harder, much like it is for optimizing within a try block.
We had someone take a stab at it a while back as you pointed out, but there were a lot of problems with the design. We decided to shelve it and focus on optimizing other ES6 features first. We'll get back to it hopefully at some point, but not in the short term.
I assume this is a point that is known internally - but it wasn't in the issue log on Github. Currently Generator functions and async functions are always run only in the interpreter.
There is a flag -Jites6Generators to enable jitting them - but using this always results in a crash in the Jit - it encounters an unallocated register the first time it tries to Jit a ResumeYield op. src10pnd is set to a nullptr by this and it goes wrong from there: https://github.com/Microsoft/ChakraCore/blob/8527dc23954bdf77b17d25e472857f58a3b03f8a/lib/Backend/IRBuilder.cpp#L1875
I stumbled upon this whilst working on #5834 there are a few TODOs and equivalent notes in comments about this all dating back to the initial GitHub commit 3 years ago.
I've tried to investigate how to fix this but I'm a bit out of my depth in the Jit code.
The text was updated successfully, but these errors were encountered: