I could attach a javap dump of the example - which is long (at least too long for this forum) - but it's very easy to generate - after running the JUnit tests all class files have been instrumented.

The resulting code is similar to the "standard Java example" on the website - except that the state is not stored as member variables - to allow for recursive calls - but instead in a thread local instance of the Stack class which is managed by the Coroutine class.

The bytecode gets more complex if you have exception handling using finally in your methods - even to the point where it will be impossible to write it using Java itself (without duplicating a lot of code).

Riven: Look at the possibilities that bytecode instrumentation offers ....

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org