Re: [Sablevm-user] bug report -- cannot run 'HelloWorld' test
Brought to you by:
egagnon
From: Etienne M. G. <eg...@j-...> - 2000-07-28 01:11:07
|
Hi Andrew, "Purtell, Andrew" wrote: >... OpenJIT itself is not GPLed, so this work would > be a bottom-up reimplementation, anyway. You mean that the "re-implemented" version would be GPLed (+ JNI exception, like SableVM), right? > About how far away from running HelloWorld is SableVM? I would say a week (or two). But, you never really know before you're there... > More importantly, is this something that fits into the design of SableVM? It could. I use SableVM for my Ph.D. research. My goal is to get as efficient a vm as possible without resorting to assembly language. So, as far as my Ph.D. goes, a JIT is not a necessity. But, I have no objection to allow (optionally) a JIT to operate within SableVM, as long as I do not have to compromise its data structure design. [e.g. SableVM object instances can move in memory (copying collection), so the JIT must cope with this]. Also, I won't have much time to work on the JIT integration (at least, until I get my diploma;-) > E.g. there would need to be a few hooks in the interpreter to support a > JIT, especially a self-bootstrapping one. Just for purposes of example, > this could be something as simple as: > > /* invoke method code */ > (*obj->method->invoke)(args); > > where normally 'invoke' points to 'int interpret_method (...)', but once > a native method has been compiled, this pointer would be changed to 'int > native_method (void * code, ...)'. Also, the JIT would need to store some > per-method state, presumably hanging off a 'void * jit_priv' member in > the appropriate struct. Etc. You're talking about many things... It's ok for additional per method data. SableVM could even encode JIT method calls using its own internal bytecodes (much like it does for native calls). The problem is: what's the protocol for vm<->JIT communication? The vm does precise stack scanning (for precise gc). Will JIT compiled code use JNI local/global refs? (it should. Even SableVM uses them internally) What's the protocol for passing arguments and results back and forth? (does it also require ffi?)... As I said, I think it is feasible, but my requirement is that I do not have to change the structure of SableVM; the JIT has to adapt, and you get to do the work (I can help answering questions, though;-) There's also John Leuner <je...@pi...> who talked to me about porting his JIT to SableVM. You might want to talk with him about that. Maybe you two could help each other. Ideally, I should get Hello World working before we get into deep discussions, because once it works, you will be able to explore the code and get a better idea of SableVM's design. Etienne -- ---------------------------------------------------------------------- Etienne M. Gagnon, M.Sc. e-mail: eg...@j-... Author of SableVM: http://www.sablevm.org/ ---------------------------------------------------------------------- |