Hi,

I have library implemented in javascript. I use that library in c++ apps. 
So what i do now, is to use v8, create a context, then read the js files, 
and run the js codes inside the context. Then find the js function in c++. 
Then use the function from c++. But this approach comes with a performance 
cost. 

So i want to include my javascript files and use the mksnapshot feature of 
v8. When compiling vs makes snapshot of runtime.js array.js string.js 
........., How can i add my js files to this list.

I tried this so far, opened runtime.js and added this line to the end.

runtime.js:function sarim() { return "i'm awesome";};

Then i compiled v8 (make native -j 4 library=shared werror=no) and run the 
shell, (out/native/shell)

> sarim
(shell):1: ReferenceError: sarim is not defined
sarim
^
ReferenceError: sarim is not defined
    at (shell):1:1



So my code in is not getting included.

How to include my code ?

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to