[LLVMdev] Researching alternative for home-grown VM
renny.koshy at rubixinfotech.com
renny.koshy at rubixinfotech.com
Tue Mar 7 20:51:05 PST 2006
I'm researching an alternative to our home-grown VM that is used for a
telecomm system. LLVM sounds like it fits the bill... however, one of the
primary reasons for developing our home-grown VM was the concept of
continuation.
Basically, the code that folks write can call certain built-in functions of
our "language". These functions cause the VM to stop execution and save a
"context". Later on an event arriving at the VM and pick up the context,
and continue execution of the code.
=> Is there a way to do this LLVM (i.e has anyone done this or something
similar)?
=> If not, can I implement it as a new op-code? We basically have
implemented a "WAIT" opcode in our VM, which tells it to stop execution of
this code, and wait for external events.
Let met give a more concrete example:
The code may say:
status = sql_exec("Server1", Timeout, "select subscriberid from
tblSubscriber where ANI='"+ani+"';", subscriberid);
In this case, the sql_exec() is a built-in function of our language which
sends a DB query, and then issues a "WAIT". This allows the VM to then
process another event which may execute some completely un-related code.
Then when a db-response event arrives, since there is a mapping for that
event, it will then startup processing of the sql_exect() at the point
where it had issued the WAIT.
Thanks & Regards,
Renny Koshy
President & CEO
--------------------------------------------
RUBIX Information Technologies, Inc.
www.rubixinfotech.com
More information about the llvm-dev
mailing list