A few questions on implementation.

My old prototype looks like:
                private RtObject[] _mDicts = new RtObject[8]; // array of method dicts
                private MethodHandle[] _methods = new MethodHandle[8]; // the code MH
                MethodHandle lookupSelf(RtObject rcvr, RtCallSite site)
                        RtObject methodDict = rcvr.classField();
                        if(_mDicts[0] == methodDict) return _methods[0];
                        if(_mDicts[1] == methodDict) return _methods[1];....

If I fill the arrays I treat them as a circular buffer and overwrite the existing contents.

You mention the need for the last element in the arrays to be null.  Why?

If the arrays are declared 'Stable'  does this mean that when I fill them I cannot reuse them?  Would
I just replace the arrays with new ones?

You also mention a concern if the test items are Objects vs MethodHandles.  My test MH does the same
object reference compare and I was trying to avoid executing the rcvr.classField() for each test.  Would
I be better off if I used a test MH instead?

thanks for the ideas
mark



_______________________________________________
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

Reply via email to