3 ms·
An indictment of VMs in general, then. They're almost universally targeted at supporting a particular language, and cause problems when more advanced concepts (
by Ralith 14y ago
An indictment of VMs in general, then. They're almost universally targeted at supporting a particular language, and cause problems when more advanced concepts (such as cutting-edge type systems) must be implemented.
- bascule 14y agoWith InvokeDynamic the JVM is pretty much the first to open up its full set of compiler optimizations to any language that implements its method dispatch semantics using InDy's set of tools. InDy allows language implementers to define their own method dispatch semantics, polymorphic inline caches, and deoptimization in the event that assumptions change e.g. the class hierarchy has been modified.
- Ralith 14y agoThere is rather more to type systems than method dispatch.
- bascule 14y agoType checking at method dispatch is the only part of the equation (literally, in the case of Fortress) where the JVM would come into play. Everything else happens ahead of time in the compiler. With InDy, the JVM can do a one-time check, verifying whatever security invariants the language has put in place, and after that, the MethodHandle is in InDy's polymorphic inline cache and the security checks can be skipped on subsequent calls. All subsequent calls dispatch at Java speed and can be inlined by HotSpot just like any other Java method. Writing your compiler on top of the JVM using InDy might help make this clearer!
- michaelcampbell 14y ago> that would be every currently available VM, not just JVM Perhaps of just the current VM's, and not some intrinsic limitation of VM's in general.