Simple idea: we have op_next for for-of statement. And op_next usually works as similar to `call` to the next() function. But it records the iterator/generator (IC). In DFG / FTL tiers, if we can ensure that this op_next still calls the same generator functions, we can skip Generator.prototype.next() function. Generator.prototype.next() is costly because all the generators use this one function. It is inherently polymorphic. But if we can skip this and if the IC tells DFG which generator function is called, we can inline the generator function in the call site! If it is done in FTL layer, we have a chance to drop the lexical environment creation for the generators by using object allocation sinking.
This would be sweet. It'd make iterating Map/Set really fast
Let's make sure this also speeds up array destructuring. See Joe's example program in: https://bugs.webkit.org/show_bug.cgi?id=155146
*** Bug 155146 has been marked as a duplicate of this bug. ***