John Rose schrieb: > On Sep 11, 2008, at 12:25 PM, Jochen Theodorou wrote: > >> if I remember correctly, then invokedynamic won't allow calls on null. > > You do remember correctly; the EDR says: >> It makes no requirements on its receiver argument, except that it be a >> non-null object reference. > > But while prototyping the RI I saw no reason to forbid nulls in the > HotSpot prototype, hence Charlie's experience. I'm hoping that the > other JVM vendors will feel the same, so we can lift the restriction.
it is a serious issue for me, because I would have to mask null everywhere if that restriction would not be lifted. I would either have to test the result of each method call of being null and each argument of being NullObject.instance. (Currently I have to test only he receiver) Or I would have to write an additional method that replaces the receiver when the receiver is put on the stack. My feeling is telling me that if I can do the null check in the MethodHandle HotSpot will produce better code... for example inline the method more early... but maybe that thought is not right. bye blackdrag -- Jochen "blackdrag" Theodorou The Groovy Project Tech Lead (http://groovy.codehaus.org) http://blackdragsview.blogspot.com/ http://www.g2one.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "JVM Languages" group. To post to this group, send email to jvm-languages@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jvm-languages?hl=en -~----------~----~----~----~------~----~------~--~---