On Aug 6, 12:07 pm, Stephan Beal <
sgb...@googlemail.com> wrote:
> On Thu, Aug 6, 2009 at 10:38 AM, ionlupascu <
ionlupa...@gmail.com> wrote:
>
> > About performance is when I run same JavaScript code more than one
> > time, this save time on parsing source code and compilation process
> > (this process will be only one time). In this case I can save virtual
> > memory too, in complex systems, by loading only needed blocks of
> > compiled code.
>
> One of the big problems with this is that arbitrary code can have references
> to arbitrary OTHER code, and when you deserialize your code it is not
> generically possible to recreate any references which point to objects not
> defined directly in your code. e.g. if i serialize:
>
> "v=8"
>
> that can be serialized assuming "v" is a real object. However, during
> partial binary deserialization the old reference we saved now has no
> context/no meaning because "v" is not defined in our JS snippet and
> therefore we cannot re-build a reference to it in a pre-existing JS engine.
>
In that binary data need to save the header data which will include
functions and variables names and references. Another way, programmer
need manual manage with inter blocks parameters. in both case v8 need
save header data that describe functions and variables names and
references.
> Partial deserialization/execution is, abstractly speaking, very similar to
> loading a DLL and executing it, and it's doubtful that JS will ever have
> such a feature natively (it's extremely insecure, for one thing).
>
DLL have it own header data that describe global parameters, function
references and others.
> > Actual, My goal is to create an application that can integrate c/c++
> > interface plugins with JavaScript code. For the first I want to
> > automate accounting process but not limited on this.
>
> > Maybe it is realized and didn't found this? If yes, where can I found
> > a description or/and a simple example?
>
> > I tried to find a to do list of this project, but without success.
>
> Several people on this list have created frameworks to assist in binding
> native code to JS. For example:
>
>
http://code.google.com/p/v8-juice/http://code.google.com/p/cproxyv8/http://code.google.com/p/v8cgi/
Thanks for suggest. this projects I already founded. Another project
is really interesting integration OpenGL with JavaScript.
Another suggestions?