Your experience is the same as mine. The Rhino core needs to be refactored to be extensible in order to allow multiple interpreters such as the one that supports continuations.
Ouch. :-/ Do you envision other needs for extended interpreters? I doubt that the Rhino guys will extend that stuff just for us.
I have seen the BEA XML scripting code and they simply hacked their stuff right into the Rhino core (not even as a separate package), so I doubt that it will ever be integrated into the Mozilla cvs either.
I understand actually that ECMAScript has been updated already, so eventually they'll have to find a way to integrate those functionalities (it doesn't have to be BEA's implementation though).
I'm willing to help, but to make this happen we really need to work closely with the Rhino developers and redesign the core interfaces to allow pluggability.
OK... I spent some more time with the code and did some steps forward. Now, unfortunately, I'm stuck due to my ignorance: any further step would be just a wild bet from my part, and it would take me a lot of time to get acquainted with all the technologies involved (core javascript and hard-core continuation inners).
Let's see if we can strike a deal, while we try to find a better solution with the Rhino guys (something that ATM seems unlikely to me, given also that they are in RC phase):
1. I made all the boring stuff: from the CVS version of Rhino I changed and refactored all the Rhino core stuff I could spot. I have a patchset if you're interested in it;
2. I'm willing to set up some kind of monitoring system that will update the Rhino CVS regularily and try to apply the required patches (think FreeBSD ports), possibly running some unit tests to spot regressions (I'll start right away bugging the Gump gurus :-));
3. I guarantee from my part a serious commitment in learning the hard stuff and understand how to help you with it once we are back in sync (but please keep in mind I'm a lawyer ;-)).
4. I'll be with you in talks with the Rhino community to find a common solution to this quite big issue;
5. You help me fix the remaining ~20 errors for which I don't have a clue as well as see if I did right until now or if I caused some serious mess. :-)
How does it sound?
-- Gianugo Rabellino Pro-netics s.r.l. - http://www.pro-netics.com Orixo, the XML business alliance - http://www.orixo.com (Now blogging at: http://blogs.cocoondev.org/gianugo/)