mozilla/rhino — pull request #70 by anba (2012-07-28 10:18:07+00:00)
Title: Patch for Bug 757410

Generators save and later restore the current stack when processing the 'yield' operation. Our current implementation for restoring the stack unfortunately confuses the Java classfile verifier, so at class load time a VerifierError is thrown. This happens because the verifier can no longer ensure that the proper types are placed on the stack, since the stack-state is saved in a simple Object[]. Re-ordering a few operations is necessary so the verifier will accept the generated class again. But this is only done for generators because it creates slightly less efficient code compared to the standard case.