In keeping with the recent coincidental trend of releasing a development snapshot every ten days, here's the next one. This time a got a little side tracked and decided to do some optimizations.
A cute one is that Object.getClass() is now an intrinsic in two specific scenarios. The first scenario is trivial, when it is used to do a null reference check (javac uses this pattern, both in its source and in the code it generates), the second scenario is a little more interesting:
boolean equals(Object other){ if (other.getClass() != this.getClass()) return false; ...}
Is now compiled into:
boolean equals(Object other){ if (Type.GetTypeHandle(other).Value != Type.GetTypeHandle(this).Value) return false; ...}
This removes the need to create (and lookup) the System.Type and java.lang.Class objects entirely.
Changes:
As always with a development snapshot, don't use this in production, but please do try it out and let me know about it. The sources are available in cvs and the binaries here: ikvmbin-0.39.3348.zip
Powered by: newtelligence dasBlog 2.3.12105.0
© Copyright 2021, Jeroen Frijters
E-mail