[DGD] question about I_SWITCH

Carter Cheng cartercheng at gmail.com
Sat Jun 26 12:25:32 CEST 2010


Hi,

I have been working on a prototype for the JIT for dgd-osr but ran
into a few issues with some of the opcodes that I am still trying to
resolve. In particular I_SWITCH does not translate well into LLVM
bitcode since a function that returns a program counter is not useful
in this context. I am curious if this data can be decoded internally
by the interpreter and converted into a series of jumps (or if this
could be done by the dgd compiler).

The other two opcodes I am having some problems with are I_CATCH and
I_RLIMITS. These two seem to recusrively call i_interpret and I cannot
really do this in llvm. I suspect the correct strategy is to replace
this recursive call with a series of basic blocks with an exception
block in the case of I_CATCH and work with compiling perhaps two
versions of every function at some point one with rlimit type counters
and one without.

But at least I have the basic block deduction "done". Though at this
point everything has to go through a debug cycle :P.

Sil.



More information about the DGD mailing list