hg: valhalla/valhalla/jdk: Initial implementation of metacircular interpreter

Brian Goetz brian.goetz at oracle.com
Sun Aug 23 15:12:02 UTC 2015


> my guess, let say you want to prototype the u-opcodes of John's talk at JVMLS.

Yep, that's basically the motivation.  (Plus, it was fun.)  If we want 
to experiment with new bytecodes, its orders of magnitude cheaper to do 
the initial experiments in javac + metacircular interpreter than to do 
it in HotSpot.

> Btw, there is a complementary approach which is to use the existing bytecode interpreter and encode for every u-opcode a cascade of if/else on the type, the bytecode verifier will bark but you can deactivate it (the JIT may also crash if it is too curious a look the code of never executed branches).

Yes.  This might end up being a "Phase II" experimental strategy, after 
the MCE-based Phase I experiment runs its course.  But we don't want to 
start there, in part for the reasons you cite (must disable verifier, 
etc.)



More information about the valhalla-dev mailing list