Saving the state of a javascript virtual machine

Discussion in 'Javascript' started by Daniele (Dan) Mazzini, Jun 6, 2009.

  1. Hello everybody

    I was wondering if there was any js virtual machine out there which
    supports saving its current state to disk, so that you could resume
    that same state at a later time (smalltalk implementations for example
    have this feature, they call it saving an image). It could be very
    useful for debugging and other situations.

    I did some search on the internet but didn't find anything about this
    topic... does anybody know more?

    Thanks

    Dan
     
    Daniele (Dan) Mazzini, Jun 6, 2009
    #1
    1. Advertising

  2. In comp.lang.javascript message <ded96d65-bc97-4d7f-890c-decad6f108c5@k8
    g2000yqn.googlegroups.com>, Sat, 6 Jun 2009 15:14:31, "Daniele (Dan)
    Mazzini" <> posted:

    >I was wondering if there was any js virtual machine out there which
    >supports saving its current state to disk, so that you could resume
    >that same state at a later time (smalltalk implementations for example
    >have this feature, they call it saving an image). It could be very
    >useful for debugging and other situations.


    If there is, it would be so useful that it should have been included in
    the FAQ.

    For some applications, it would be possible to have each cycle of a
    moderately-inner loop initiated by a short timeout, which should enable
    a changed checkbox to be read before after the timeout (my js-tourn.htm
    (and/or js-pairs.htm) does similar, to enable continual display update
    in IE4).

    Then, if the checkbox was checked, the application could write all its
    state variables to a textarea, for copy'n'paste to save on disc. On
    start-up it would read the textarea to [re-]initialise itself
    appropriately. UNTESTED.

    Also, perhaps the application can be run in Windows Script Host, when it
    has access to the disc and can automate the essence of that. Or it
    could perhaps be run as an HTA.

    Debugging limited to the Microsoft Script Engine cannot find everything;
    but getting an application working in IE is a good start if the problems
    are substantially with the algorithm rather than with linguistic
    subtleties.

    It's a good idea to read the newsgroup c.l.j and its FAQ. See below.

    --
    (c) John Stockton, nr London UK. ?@merlyn.demon.co.uk IE7 FF3 Op9 Sf3
    news:comp.lang.javascript FAQ <URL:http://www.jibbering.com/faq/index.html>.
    <URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
    <URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
     
    Dr J R Stockton, Jun 7, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Lamb
    Replies:
    1
    Views:
    682
  2. Weng Tianxiang
    Replies:
    7
    Views:
    1,109
    Mike Treseler
    Nov 25, 2003
  3. Weng Tianxiang
    Replies:
    3
    Views:
    1,407
    Weng Tianxiang
    Jul 25, 2006
  4. Grumps
    Replies:
    2
    Views:
    690
    Grumps
    Feb 13, 2008
  5. fenster
    Replies:
    3
    Views:
    1,162
    jeppe
    Dec 23, 2011
Loading...

Share This Page