cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ovidiu Predescu <ovi...@cup.hp.com>
Subject Re: Fwd: "Preserving" Rhino State
Date Tue, 05 Mar 2002 22:11:37 GMT
Hi Jason,

Thank you for the pointer, I've downloaded Oliver's code and I'm
playing with it right now.

By looking at the code it appears easy to extend the code to add full
continuations support in Rhino. I'll investigate some more and come
back with more thoughts and ideas on it.

If continuations are added in Rhino, I think I'll go down this path,
instead of using Scheme, as it makes things much easier to implement
and, as Sylvain pointed out, be accepted by users. But let me spend
some time with Oliver's code first.

Greetings,
Ovidiu

On Mon, 4 Mar 2002 19:49:41 -0500, Jason Foster <retsofaj@mac.com> wrote:

> I sent a message to the Mozilla JavaScript newsgroup and got the following 
> reply...
> 
> > It's not currently possible to serialize the execution state of the Rhino 
> > interpreter, if that's what you're requesting. However there has been 
> > some work on this by Christopher Oliver, see
> >
> > http://groups.google.com/groups?q=group:netscape.public.mozilla.jseng+author:
> > Christopher+author:Oliver&hl=en&selm=3BB3A10D.D7B1DE48%40mminternet.com&rnum=
> > 4
> >
> > Rhino 1.5R3 introduced serialization for the first time, but I was 
> > hesitant to add the ability to serialize execution state. Perhaps it is 
> > worth considering for 1.5R4.
> 
> If you take a look at the URL, you get the following nice tidbit...
> 
> > >function foo(level) {
> > >    var now = new java.util.Date();
> > >    if(level > 5) {
> > >         print("run the file foo.jss");
> > >         capture("foo.jss");
> > >    } else {
> > >         print("next level");
> > >         foo(level + 1);
> > >    } print("restarted("+level+"): " + now)
> > >}
> > >
> > >foo(1);
> > >
> > >//c/rhinoSer/rhino1_5R3pre> date
> > >Thu Sep 27 09:44:30  2001
> > >//c/rhinoSer/rhino1_5R3pre> java -cp jss.jar 
> > org.mozilla.javascript.tools.shell.Main -opt -1 foo.js
> > >next level
> > >next level
> > >next level
> > >next level
> > >next level
> > >run the file foo.jss
> > >//c/rhinoSer/rhino1_5R3pre> date
> > >Thu Sep 27 09:44:37  2001
> > >//c/rhinoSer/rhino1_5R3pre> java -cp jss.jar
> > >org.mozilla.javascript.tools.shell.Main -opt -1 foo.jss
> > >restarted(6): Thu Sep 27 09:44:33 PDT 2001
> > >restarted(5): Thu Sep 27 09:44:33 PDT 2001
> > >restarted(4): Thu Sep 27 09:44:33 PDT 2001
> > >restarted(3): Thu Sep 27 09:44:33 PDT 2001
> > >restarted(2): Thu Sep 27 09:44:33 PDT 2001
> > >restarted(1): Thu Sep 27 09:44:33 PDT 2001
> 
> Maybe I'm just feeling optimistic, but this looks almost exactly like what 
> would be needed for Cocoon.  Granted that this code is experimental, but 
> if the nice man from Mozilla is willing to incorporate it into Rhino 1.5, 
> then we'll be set.
> 
> Comments?
> 
> Jason Foster
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message