Hi,
What are you using to call C functions in a dynamic library?
I need to define&execute (windows) OS API calls, defined and
executed on the fly in javascript (running on top on
V8 executable) without external compilation machinery
involved.
please don't tell me you are writing/generating a module...,
compiling, waiting, and restarting the system! :-)
Is there any implementation I am missing or a place to
look in V8 sources to guide me in the task of solving
the problem or implementing my own solution?
thanks in advance,
Ale.
p.d.: I mean something like is used to do api calls in
Smalltalk platforms from decades ago. e.g.
api methods (of a library model e.g. aKernelDLL or aMyDLL)
that store in header a literal with api name and argument
types; then when the method is result of lookup,
it is NOT activated (no context involved for api calls),
and native code is generated (on jitted vms)
to adapt stack, make native call(address catched)
and restore native stack after call, adapting result...
(in simpler implementation, no code generation is
involved, and the literal is an object that resolve
nativelly the call)
In smalltalk implementations, if the call fails, the method
is activated as usual, to handle the problem at upper level.
I have used and implemented that for some st platforms
in the past and want to know if I am missing something
because I have not seen uses of dynamic definition+call of
raw C functions; and uses for C++ calls requires
as I understood writing/compiling cycle.
----- Original Message -----
From: "gqt65" <[email protected]>
To: "v8-users" <[email protected]>
Sent: Tuesday, March 29, 2011 7:46 PM
Subject: [v8-users] Re: Expanding the language
Thank you very much for the info, I do appreciate it very much, I'm
checking it out, I haven't read it very deeply yet, but it seams
helpful...
the data base to which I have to connect is proprietary (my own) , so
I need to write all the connection mechanism myself...
my wish at this point is to be able to write scripts like this:
var db = new database() // create the object
in memory
db.open("c:\databases\mylittlestore") // connect to the
database
var table = db.select("Invoice") // choose one of the
database's tables
table.view("customerId=='0001'") // filter the rows
while(!table.eof()){ // check for
the end of file
var nm = table.invoiceNumber // getting data from
the current row
var dt = table.invoiceDate
var ta = table.invoiceAmount
.
.
.
table.nextRow() // skip to the
next row
}
db.close() // close the
entire database
... and in case I have to connect to a SQL database I wish to do it in
the same fashion.
... On the other hand I also have some special needs referring to the
date data type... so I may need to modify it's internals, or create a
separated specialDate object type.
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users