From: John Rose <[EMAIL PROTECTED]> Date: May 23, 2008 10:18:40 AM PDT To: Jeroen Frijters <[EMAIL PROTECTED]> Cc: Da Vinci Machine Project <[EMAIL PROTECTED]> Subject: Re: invokedynamic question
On May 23, 2008, at 5:02 AM, Jeroen Frijters wrote: > I hope it is appropriate to ask a question here about the > invokedynamic EDR. Yes. There are three actually places where comments can be sent: 1. A JCP comments alias which is merely a one-way pipe to the EG. 2. This list mlvm-dev, which is set up for Da Vinci Machine implementation conversations. 3. The jvm-languages group, on which many interested people will interact with your comment. The third venue seems to work the best, and I have cross-posted there; let's follow up there. > Rémi Forax inspired me to actually try to implement my > invokedynamic PoC in IKVM and while doing that I realized that I > don't understand how the receiver object is typed. Thanks! That exercises the spec. the way it needs to be exercised. > When the VM calls the bootstrap method, what should it pass as > CallSite.staticContext().type().parameterType()[0]? If the type descriptor of the invocation is of the form (TUV...)W, then type[0] is T. The receiver (formally typed as Dynamic) is always typed as Object, but that type does not appear in the descriptor. In your POC example, the type descriptor would be (II)V, and the value 'obj' is typed as Object, even though the verifier can prove it is in fact a string. > I assume it's the type that the verifier computed for the receiver > object on the stack, but I would like to be sure. No, that type is always Object, and implicitly assumed. This is a great question about the EDR, because it points out a need in the spec. for clarification. Best wishes, -- John --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---