Re: [Sablevm-developer] reflection classes for constant pool andbytecode data
Brought to you by:
egagnon
From: Etienne M. G. <eg...@j-...> - 2000-08-19 15:03:21
|
Hi all! First, a small detail I've learned lately: we are not talking of a JVM, but a Jvm;-) What's the difference? Big. A Java Virtual Machine is a virtual machine for the Sun's Java platform (trademarked). On the other hand, a Java virtual machine is an interpreter for the "Java language" (not platform!). I certainly do not claim SableVM to be a JVM! In fact, I prefer to stick to unambiguous terms like "vm, interpreter, ..." which do not even remotely relate to the trademark. It is accepted the the "Java language" is the name of a programming language, so might be freely used. But you must be careful to make clear that you really mean "the language" whenever you use the term "Java". Other uses might be restricted. John Leuner wrote: > I was wondering if this interface needs to be sablevm specific? All JVMs > will be able to provide the information you're asking for here, and > probably in exactly the same format. I'm thinking here of cloning this > work with my JVM, ultimately I would like to have whatever JIT framework > we develop here running on both JVMs. The interpreter could simply make public the raw bytes of the class file. This should be suitable for all interpreters, and could easily be provided by any vm. > > Of course there are things that might differ, eg the > > > public org.sablevm.vm.Class clazz; // class containing this method > > > public int access_flags; The difficult part is not gathering class information, but hooking back with the vm. E.g., how does the jit hook back to the right runtime_package/class? How does the jit handle exceptions that should be forwarded beyond the compiled methods, etc. I doubt these things could be really done in a vm independant way, but you're allowed to surprize me;-) > I want to point you guys to some papers ( I read some of these last > weekend and they gave me lots of food for thought): > > http://www-4.ibm.com/software/developer/library/jalapeno/index.html > > Is an excellent overview of Jalapeno, it discusses locking (which I want > to reimplement on my JVM), has a good high-level description of the whole > Optimiser. > > An article on the optimiser itself: > > "THe Jalapeno Dynamic optimizing compiler for Java" - > http://www.research.ibm.com/jalapeno/publication.html#grande99 > > And on runtime selection of methods to optimise: > > "An empirical study of Selective optimisation" - > http://www.research.ibm.com/jalapeno/publication.html#lcpc00 > Thanks for these additional pointers. Keep in mind that, althought IBM's work is impressive, it often depends on very machine/OS specific features. There's much assembly level things involved in building Jalapeno (even if it is written in Java, it generates machine code). This is something a jit can't avoid, I agree. But, SableVM (the interpreter) tries to achieve efficiency without being too machine/OS dependent, e.g.: very little dependency, which should be relatively easy to adapt, like a max of 2~10 assembly lines in the whole interpreter (light locks), very little OS dependency beyond POSIX compliance, mostly ANSI C (+ GNU C labels as values)... A jit could try to fit its interface within this framework, and thus could be quite different fom Jalapeno. Mainly: just keep your mind open and try to push beyond what you see other have done! But, I agree: it is important to know about what others have done;-) I have been working on SableVM's exception framework, lately, which turns out difficult to avoid for interpreting HelloWorld. (The JNI interface is too much dependent on it...) Have fun with the JIT! Etienne -- ---------------------------------------------------------------------- Etienne M. Gagnon, M.Sc. e-mail: eg...@j-... Author of SableVM: http://www.sablevm.org/ ---------------------------------------------------------------------- |