Byte code or branching method handle?
Alexander Turner
nerdscentral at gmail.com
Sun May 27 11:49:35 PDT 2012
HI Dain,
I would suggest using byte code for everything that byte code and falling
back to invoke dynamic only if there is no alternative.
- AJ
On 27 May 2012 19:12, Dain Sundstrom <dain at iq80.com> wrote:
> Hi all,
>
> I have a general strategy question about using invoke dynamic. Say I have
> a dynamic language that has null safe property chaining where "a.b.c.d"
> results in null if a null is encountered anywhere in the chain. I could
> implement this two ways, 1) generate byte code that checks for nulls or 2)
> use a guarded method handle at each step that takes care of the nulls.
> Either option is ok with me, but I'd rather not write both versions to and
> then try to figure out which one will make the JVM angry.
>
> As a broader question, there are lots of places where I can make this type
> of decision (e.g., pass by value parameters, copy on assignment value
> classes), is there a rule of thumb for going with traditional byte code
> over branching method handles?
>
> Thanks,
>
> -dain
> _______________________________________________
> mlvm-dev mailing list
> mlvm-dev at openjdk.java.net
> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20120527/3a034a49/attachment-0001.html
More information about the mlvm-dev
mailing list