Re: Re: [Beanshell-users] Aborting Interpretting
Patrick Niemeyer <[email protected]> Mon, 14 Feb 2005 14:14:13 -0600
| Newsgroups | gmane.comp.java.beanshell.devel |
|---|---|
| Message-ID | <[email protected]> |
On Feb 14, 2005, at 1:54 PM, Archie Cobbs wrote: > Patrick Niemeyer wrote: >> implement the job control in the enhancement. We can do this simply >> by >> adding checkpoints in the main loop and control structures of >> BeanShell. While we can never guarantee that user code that BeanShell >> invokes will do the same, but at least then our scripts will do the >> right thing when they have control. (See various previous threads on >> this topic). > > Dumb/ignorant question... could BeanShell use bytecode generation > via CGLIB and insert checks at all backward branches? In theory you could instrument all of the application code in some way... allowing it to be interruptable. It's not something we could do routinely in BeanShell (even with the new classloading hook in Java 5.0 it requires special JVM boot arguments), but it could be an interesting experiment as an add-on. The ASM bytecode library provides a visitor pattern API that makes it easy to read code, modify it, and write it back out... If anyone wants to experiment with this let me know and I will help. Pat ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click