[DGD] hooking jit into the dgd system and modularity

Carter Cheng cartercheng at gmail.com
Wed Apr 12 20:47:01 CEST 2017


Thanks but that isn't quite what I am trying to ask. The question is it bad
for control.cpp via ctrl_construct() and load_control() in sdata.cpp to be
"dependent" on the jit module?

On Thu, Apr 13, 2017 at 2:26 AM, Raymond Jennings <shentino at gmail.com>
wrote:

> As long as you decouple the generation of LLVM from the parsing of LPC
> source you should be fine.
>
> My advice, is to generate the JIT as needed on a per function+control
> block basis, and to invalidate the associated JIT when a control block
> is recompiled.
>
> Some caveats to be aware of:
>
> 1.  It is possible to have DGD bytecode without corresponding LPC
> source code (think warm booting)
> 2.  LPC-side error handling often makes use of line number information
> extracted from call_trace() kfun
>
> A possible option is to stuff the code in question in a separate .cpp file.
>
> On Wed, Apr 12, 2017 at 11:05 AM, Carter Cheng <cartercheng at gmail.com>
> wrote:
> > I actually looking for some advice as to how best to do this since I am a
> > rather inexperienced programmer. To just get it to the point where it is
> > working my first take is to include some call code to the llvm code cache
> > of the jit to update in sdata.cpp and in the compiler code whenever code
> is
> > loaded from disk or when code is freshly compiled respectively. The
> problem
> > with this is it seems to generate an odd dependency between the
> > compiler/sdata code and the jit which is not really "semantically"
> > necessary I suspect.
> >
> > My thoughts on this is to perhaps create two new functions that each
> handle
> > the separate cases of the compiler hook and the sdata hook and have that
> > invoke the compiler code and sdata control block loading individually.
> But
> > where do should these functions be placed to avoid creating the
> artificial
> > dependency?
> >
> > Regards,
> >
> > Silenus
> > ____________________________________________
> > https://mail.dworkin.nl/mailman/listinfo/dgd
> ____________________________________________
> https://mail.dworkin.nl/mailman/listinfo/dgd



More information about the DGD mailing list