[Sablevm-user] JIT integration (was RE: bug report -- cannot run 'HelloWorld' test)
Brought to you by:
egagnon
From: Purtell, A. <And...@NA...> - 2000-07-28 02:04:57
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > "Etienne M. Gagnon" wrote: > You mean that the "re-implemented" version would be GPLed (+ JNI > exception, like SableVM), right? Yes. > 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;-) Yes, that is the idea. > 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). You mentioned that another individual has approached you about integrating a JIT with SableVM. The only work required on the SableVM side for supporting any JIT is the integration of a generic interface that 1) allows the JIT a means for substituting native code for bytecodes, e.g. a simple protocol for letting the interpreter know native code has been generated from bytecode and a means for insuring that subsequent method invocations transfer control to that native code 2) extends the runtime with a few native methods for accessing internal state normally not exposed, such as the constant pool Note that having a JIT implemented mostly in Java means that the JIT, generated code, and associated state are first-class Java objects. There would certainly be the expectation that this would be my work, and at various milestones patches would be submitted for consideration. If SourceForge CVS can be accessed by another protocol than pserver, then I could instead check in the work under a branch. Unfortunately our firewall blocks pserver, though rsh and ssh are allowed. > [e.g. SableVM object instances can move in memory (copying > collection), so the JIT must cope with this]. > Will JIT compiled code use JNI local/global refs? (it should. > Even SableVM uses them internally) I expect that JIT compiled code can adhere to the requirements of the runtime environment, whatever they are. Whether or not there are performance losses because of them depends on how clever the JIT implementor is. :) > What's the protocol for passing arguments and results back > and forth? (does it also require ffi?) Presumably a JIT would use the same convention and glue that is in place for invoking native methods. There is nothing that ties it to a particular library or convention, so those can change as need be. I develop on both the x86 and Alpha platforms. If this effort were to take off, I would eventually like to see a SableVM/JIT combination running on both. Andrew Purtell NAI Labs at Network Associates, Inc. Los Angeles, CA PGP Fingerprint: 5A21 10DB 92B0 CE20 80B4 90D7 A89C D464 AA0A A616 The difference between theory and practice in practice is larger than the difference between theory and practice in theory. -- Steve Crocker -----BEGIN PGP SIGNATURE----- Version: PGP 6.5.1 Comment: Crypto Provided by Network Associates <http://www.nai.com> iQA/AwUBOYDp2aic1GSqCqYWEQLOLQCgh2R8Adu6NGI8HN5mp52UD1o5yPkAoKpK vycB1Cpv9ZIEUL6qwHFzXeP8 =5Hsh -----END PGP SIGNATURE----- |